Skip to content

FAQs

Bingo 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 Bingo?

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

If you want to build your own template, see Building Templates.

What else can Bingo 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

Bingo is targeting being a fully complete solution for:

  • Repository management: creating repositories with templates and migrating existing repositories to new versions of templates
  • Templates: allowing straightforward templates and scaling to complex multi-faceted ones

Bingo templates go beyond just file system copying. They also support network requests, shell commands, and versioned migrations.

Comparisons Table

Tool

EcosystemProject CouplingFile DescriptionsScale
In-MemoryTemplate FilesInitializing RepositoriesManaged TransitionsReusable Components
BingoWebDecoupled

#39

CookiecutterPythonDecoupled

#1004

#1172

copierPythonDecoupled
degitWebDecoupled
GitHub(all)Decoupled
HygenWebDecoupled
PlopWebConfig File
projenWebCoupled
YeomanWebDecoupled

#474

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

Bingo 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, Bingo 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.

Bingo has several key differences from what Cookiecutter supports:

  • Cookiecutter is a wrapper around a Jinja file templates; Bingo allows for full JavaScript logic to generate contents based on provided options
  • Cookiecutter always operates at the scale of one template; Bingo’s Stratum engine provides more granular APIs for areas of features (Blocks and Presets)
  • Cookiecutter supports file changes and execution hooks; Bingo 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. Bingo 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.

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

  • Copier is a wrapper around a straightforward file templates; Bingo allows for dynamic logic for generating contents based on provided options
  • Copier only supports file templates; Bingo allows for sending network requests and running shell scripts
  • Copier always operates at the scale of one template; Bingo’s Stratum engine 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. Bingo 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.

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

  • degit is a wrapper around a straightforward git clone; Bingo allows for dynamic logic for generating contents based on provided options
  • degit only supports limited post-clone actions; Bingo allows for sending network requests and running shell scripts
  • degit always operates at the scale of a full repository; Bingo’s Stratum engine 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.

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

  • Template Repositories are a wrapper around a straightforward git clone; Bingo allows for changing generated file contents based on provided options
  • Template Repositories don’t support post-clone actions; Bingo allows for sending network requests and running shell scripts
  • Template Repositories always operate at the scale of a full repository; Bingo’s Stratum engine 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.

Bingo takes a different architectural approach than Hygen:

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

Plop

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

Bingo has several key differences from Plop:

  • Plop is built around an imperative “actions” API for adding files, as opposed to Bingo’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 Bingo’s more type-safe Zod schema options

In other words, Bingo 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 Bingo in that it is a flexible underlying engine that allows developers define and manage project configurations through code.

Bingo has several large differences from projen:

  • Bingo 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 Bingo differing from projen
  • Ecosystem targets:
    • Bingo 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:
    • Bingo 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:
    • Bingo 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:
    • Bingo 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.

See JoshuaKGoldberg/create-typescript-app#1181 📝 Documentation: Long-term project vision#issuecomment-2428303689

Yeoman

Yeoman is an 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 Bingo
  • Persistent options are provided in a raw .yo-rc.json JSON file rather than type-safe schema definitions

Template Development

Building Templates covers how to develop templates for Bingo.

See Building Templates > FAQs for FAQs on template development.

Made with 💝 in Boston by Josh Goldberg.