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-app@beta
pnpx create-typescript-app@beta
yarn dlx create-typescript-app@beta
┌ ✨ 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@beta --directory my-fancy-project
pnpx create-typescript-app@beta --directory my-fancy-project
yarn dlx create-typescript-app@beta --directory my-fancy-project
--help
Type:
boolean
Prints help text.
npx create-typescript-app@beta --help
pnpx create-typescript-app@beta --help
yarn dlx create-typescript-app@beta --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@beta --mode setup
pnpx create-typescript-app@beta --mode setup
yarn dlx create-typescript-app@beta --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@beta --offline
pnpx create-typescript-app@beta --offline
yarn dlx create-typescript-app@beta --offline
--version
Type:
boolean
Prints the Bingo package version.
npx create-typescript-app@beta --version
pnpx create-typescript-app@beta --version
yarn dlx create-typescript-app@beta --version
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@beta --title 'My New App'
pnpx create-typescript-app@beta --title 'My New App'
yarn dlx create-typescript-app@beta --title 'My New App'
Any required options that are not provided will be prompted for by the template’s CLI.