CLI
Bingo templates each provide a CLI to set up a new repository or transition an existing one. That CLI will interactively prompt you for any required options that can’t be inferred from disk.
For example, to run create-typescript-app:
npx create-typescript-apppnpx create-typescript-appyarn dlx create-typescript-app┌ ✨ create-typescript-app@2.0.0 ✨││ Learn more on: https://github.com/JoshuaKGoldberg/create-typescript-app││ Running with mode --setup for a new repository.Common Flags
All Bingo templates support the following set of CLI flags.
--directory
Type:
string
What local directory path to run under.
If not provided:
- If the current directory is empty, defaults to it (
.) - Otherwise, you’ll be prompted to input one
For example, creating a new repository in a subdirectory:
npx create-typescript-app --directory my-fancy-projectpnpx create-typescript-app --directory my-fancy-projectyarn dlx create-typescript-app --directory my-fancy-project--help
Type:
boolean
Prints help text.
npx create-typescript-app --helppnpx create-typescript-app --helpyarn dlx create-typescript-app --help--mode
Type:
string
Which Execution Mode to run in.
If not provided, it will be inferred based on whether Bingo is being run in an existing repository.
For example, specifying creating a new repository with create-typescript-app:
npx create-typescript-app --mode setuppnpx create-typescript-app --mode setupyarn dlx create-typescript-app --mode setup--offline
Type:
boolean
Whether to run in an “offline” mode that skips network requests.
If provided, templates will be hinted to not make any network requests. That often means they will install from offline caches, skip creating a repository on GitHub, and skip sending GitHub API requests. The repository will roughly be a local-only creation.
For example, specifying creating a new repository offline with create-typescript-app:
npx create-typescript-app --offlinepnpx create-typescript-app --offlineyarn dlx create-typescript-app --offline--version
Type:
boolean
Prints the Bingo package version.
npx create-typescript-app --versionpnpx create-typescript-app --versionyarn dlx create-typescript-app --versionTemplate Flags
The template being generated from will likely add in additional flags. Templates generally add in a CLI flag for each of the options they support.
For example, if a template defines a title option, --title will be type string:
npx create-typescript-app --title 'My New App'pnpx create-typescript-app --title 'My New App'yarn dlx create-typescript-app --title 'My New App'Any required options that are not provided will be prompted for by the template’s CLI.