create-cli
The scaffolding tool for bootstrapping new CLI Framework projects.
Quick Start
bash
npx create-cli my-toolInteractive Flow
The wizard walks you through these steps:
- Project name — your CLI binary name (kebab-case)
- Package manager — npm, pnpm, or yarn
- Language — TypeScript (recommended) or JavaScript
- Template — choose from three options
Templates
Basic
A minimal CLI with a single command. Best for simple scripts.
my-tool/
├── src/
│ ├── commands/
│ │ └── hello.ts
│ └── index.ts
├── package.json
├── tsconfig.json
└── .my-tool.ymlSubcommands
A CLI with nested subcommands. Best for tools with multiple features.
my-tool/
├── src/
│ ├── commands/
│ │ ├── deploy.ts
│ │ ├── config.ts
│ │ └── deploy/
│ │ ├── status.ts
│ │ └── rollback.ts
│ └── index.ts
├── package.json
├── tsconfig.json
└── .my-tool.ymlFull
Everything included: commands, plugins, tests, CI config. Best for production tools.
my-tool/
├── src/
│ ├── commands/
│ │ ├── deploy.ts
│ │ ├── config.ts
│ │ └── deploy/
│ │ ├── status.ts
│ │ └── rollback.ts
│ └── index.ts
├── tests/
│ └── deploy.test.ts
├── .github/
│ └── workflows/
│ └── ci.yml
├── package.json
├── tsconfig.json
├── vitest.config.ts
└── .my-tool.ymlGenerated Files
Every template includes:
package.json— withbinfield and build scriptstsconfig.json— pre-configured for Node.js.my-tool.yml— default project configurationREADME.md— with usage instructions
After Scaffolding
bash
cd my-tool
pnpm install
pnpm devYour CLI is now running in development mode. Edit src/commands/ and changes are reflected immediately.