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
Section titled “Common Flags”All Bingo templates support the following set of CLI flags.
--directory
Section titled “--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
Section titled “--help”Type:
boolean
Prints help text.
npx create-typescript-app --helppnpx create-typescript-app --helpyarn dlx create-typescript-app --help--mode
Section titled “--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
Section titled “--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--skip-files
Section titled “--skip-files”Type:
boolean
Whether to skip creating files on disk.
This can be useful if you’d like to only run scripts such as linter auto-fixing and update repository settings for a previously created repository.
For example, specifying updating all of repository except its files with create-typescript-app:
npx create-typescript-app --skip-filespnpx create-typescript-app --skip-filesyarn dlx create-typescript-app --skip-files--skip-requests
Section titled “--skip-requests”Type:
boolean
Whether to skip sending network requests as specified by templates. In setup mode, this includes creating a repository on GitHub.
For example, creating a repository using create-typescript-app without populating network requests, but with network installation of packages (pnpm install instead of pnpm install --offline):
npx create-typescript-app --skip-requestspnpx create-typescript-app --skip-requestsyarn dlx create-typescript-app --skip-requests--skip-requests effectively defaults to true if --offline is provided.
However, it does not prevent network requests from being sent by other parts of templates.
For example, templates may run package installation scripts that don’t include their own --offline flag when Bingo’s --offline is not provided.
--skip-scripts
Section titled “--skip-scripts”Type:
boolean
Whether to skip running local scripts as specified by templates.
For example, creating a repository using create-typescript-app without running scripts such as pnpm format --write:
npx create-typescript-app --skip-scriptspnpx create-typescript-app --skip-scriptsyarn dlx create-typescript-app --skip-scripts--version
Section titled “--version”Type:
boolean
Prints the Bingo and template package versions.
npx create-typescript-app --versionpnpx create-typescript-app --versionyarn dlx create-typescript-app --versionTemplate Flags
Section titled “Template 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.