Skip to content

FAQs

create is early stage. It runs well but its APIs are still in flux. Please try it out and report any issues on GitHub! πŸ™

Consumption

How do I use create?

If you want to create or update a repository, see CLI for running the create command.

If you want to build your own template, see Templating Engine > About.

How do I remove part of a template?

Go ahead and change your repository! After you create a repository, you can customize it however you see fit.

If you’d like to keep a repository updated with a template, you can customize your tooling with a configuration file. See Configuration > Blocks for how to add or remove pieces of tooling.

What else can create do?

Soon, there will be higher-level scaffolding utilities that will allow packages such as create-typescript-app to:

  • Generate full documentation websites to describe their Blocks and Presets
  • Manage and keep updated sample repositories for their presets
  • Migrate repositories from external tools and/or older Preset or Template versions

See JoshuaKGoldberg/create-typescript-app#1181 πŸ“ Documentation: Long-term project vision for more history.

Ecosystem Comparisons

create is targeting being a fully complete solution for defining creating, migrating, and/or updating repositories to use flexible templates. Those templates are defined in a feature-by-feature (β€œBlock”) basis and with configurable β€œPresets” using create APIs. create templates go beyond just file system copying with network requests, shell commands, and versioned migrations.

Other ecosystem tools exist for part of that feature set. None target the full feature set of create.

In general, create’s approach is differentiated from previous projects by:

  • Allowing sub-templates that can be swapped individually and add to each other (Blocks)
  • Built-in support for onboarding existing out-of-template repositories (migration mode)
  • Producing outputs -including files and more- in a generalized format (Direct Creations)

Comparisons Table

Tool

EcosystemProject CouplingFile DescriptionsScale
In-MemoryTemplate FilesInitializing RepositoriesManaged MigrationsReusable Components
createWebDecoupled

#76

βœ…βœ…βœ…

#39

CookiecutterPythonDecoupledβœ…βœ…

#1004

#1172

copierPythonDecoupledβœ…βœ…βœ…
degitWebDecoupledβœ…βœ…
GitHub Template Repositories(all)Decoupledβœ…βœ…
HygenWebDecoupledβœ…βœ…βœ…
PlopWebConfig Fileβœ…βœ…βœ…
projenWebCoupledβœ…βœ…βœ…βœ…
YeomanWebDecoupledβœ…βœ…βœ…

#474

βœ…

create-next-app, create-react-app, create-typescript-app, etc

create is an engine that allows you to define repository templates. It itself is not a repository template; it instead provides APIs that you can use to build your own repository template.

In other words, create is a lower-level primitive that can be used to create higher-level create-*-app templates.

Cookiecutter

Cookiecutter is a library and CLI app for generating projects from templates. It allows taking in directories written as Jinja templates and running pre- and post-generation hooks.

create has several key differences from what Cookiecutter supports:

  • Cookiecutter is a wrapper around a Jinja file templates; create allows for full JavaScript logic to generate contents based on provided options
  • Cookiecutter always operates at the scale of one template; create provides more granular APIs for areas of features (Blocks and Presets)
  • Cookiecutter supports file changes and execution hooks; create additionally supports network calls and arbitrary shell scripts as outputs

Cookiecutter is also written in Python and is installed using tools in the Python ecosystem. create is written in TypeScript and is set up to work in the web ecosystem.

copier

Copier is a library and CLI app for generating projects from templates. It takes in a local path or Git URL and dynamically replaces values in text files.

create has several key additions on top of what Copier supports:

  • Copier is a wrapper around a straightforward file templates; create allows for dynamic logic for generating contents based on provided options
  • Copier only supports file templates; create allows for sending network requests and running shell scripts
  • Copier always operates at the scale of one template; create provides more granular APIs for areas of features (Blocks and Presets)

Copier is also written in Python and is installed using tools in the Python ecosystem. create is written in TypeScript and is set up to work in the web ecosystem.

degit

degit is a tool that makes copies Git of repositories. It allows for straightforward initialization of files, along with support for post-creation actions.

create has several key additions on top of what degit supports:

  • degit is a wrapper around a straightforward git clone; create allows for dynamic logic for generating contents based on provided options
  • degit only supports limited post-clone actions; create allows for sending network requests and running shell scripts
  • degit always operates at the scale of a full repository; create provides more granular APIs for areas of features (Blocks and Presets)

GitHub Template Repositories

GitHub Template Repositories are a GitHub feature allowing making a new repository as a clone of another. Created repositories appear on github.com with a generated from … notice.

create will include treating sources as templates, and additionally adds features:

  • Template Repositories are a wrapper around a straightforward git clone; create allows for changing generated file contents based on provided options
  • Template Repositories don’t support post-clone actions; create allows for sending network requests and running shell scripts
  • Template Repositories always operate at the scale of a full repository; create provides more granular APIs for areas of features (Blocks and Presets)

Hygen

Hygen is a web ecosystem tool for defining generators to automate common file system tasks. It encourages building your own generators that include templates built with the EJS embedded JavaScript templating engine. Hygen templates can have conditional rendering, embedded JavaScript, and injected shell scripts.

create takes a different architectural approach than Hygen:

  • Hygen templates are imperative descriptions of files and frontmatter; create groups areas into blocks
  • Hygen templates heavily build on EJS and do not have type-safe options; create has options explicitly defined with Zod schemas
  • create Blocks describe their own outputs and additions to other Blocks, allowing them to be individually toggled
  • Hygen prioritizes granular individual templates; create priotizes full repository templates

Plop

Plop is web ecosystem tool for defining repository templates. Like create, it allows defining templates for generated files.

create has several key differences from Plop:

  • Plop is built around an imperative β€œactions” API for adding files, as opposed to create’s managing of outputs
  • Plop only supports file creation, not other actions such as setting repository GitHub systems
  • Plop is built on the popular Inquirer.js and Handlebars libraries, rather than create’s more type-safe Zod schema options

In other words, create is a more broadly scoped project for full repository generation, whereas Plop is more finely targeted to applying Handlebars templates.

projen

projen is web ecosystem tool for defining repository templates. It is similar to create in that it is a flexible underlying engine that allows developers define and manage project configurations through code.

create has several large differences from projen:

  • create is a generalized, tooling-agnostic generator engine that can also keep repositories updated over time
  • projen generally targets tighter integration and management with created projects, including being used in its package scripts
More details on create differing from projen
  • Ecosystem targets:
    • create only includes packages in JavaScript/TypeScript; it only targets support for the web ecosystem.
    • projen includes packages in Go, Java, JavaScript/TypeScript, and Python; it can be generally used for those ecosystems.
  • Integration with generated repositories:
    • create does not add any tooling to generated repositories; it prioritizes inferring options from existing repositories on demand.
    • projen is used in generated repositories and integrates with the repository’s tasks.
  • Integration with ecosystem tooling:
    • create does not hardcode types of tasks or the tools used for them.
    • projen bundles its own understanding of ecosystem tools such as package managers and linters, and provides APIs for projects to choose from its preferred tools.
  • Low-level code design principles:
    • create uses lean functions. Output file structures are defined with raw objects and strings.
    • projen leans into classes in its architecture. It heavily uses jsii and defines output files with classes.

Yeoman

Yeoman is a much older tool in the web ecosystem for templating. Its architecture and APIs generally work with older, now-outdated JavaScript practices:

  • Project generators must extend yeoman-generator’s Generator and define methods that are dynamically discovered and called at runtime
  • System interactions such as installing dependencies and writing files are done by imperatively calling Yeoman APIs, as opposed to producing outputs that are managed by create
  • Persistent options are provided in a raw .yo-rc.json JSON file rather than type-safe schema definitions

Yeoman has not been actively maintained in several years.

Template Development

Templating Engine covers how to develop templates for create.

See Templating Engine > FAQs for FAQs on template development.

Made with πŸ’ in Boston by Josh Goldberg.