Quick Start
Scaffold a new CLI project in seconds.
Prerequisites
- Node.js >= 20
- pnpm >= 9 (recommended) or npm
Create a New Project
bash
npx create-cli my-toolThe interactive wizard will guide you through:
- Project name — your CLI binary name
- Package manager — npm, pnpm, or yarn
- Language — TypeScript or JavaScript
- Template — basic, subcommands, or full-featured
Start Developing
bash
cd my-tool
pnpm devYour CLI is ready. Try it:
bash
node dist/index.js helloProject Structure
my-tool/
├── src/
│ ├── commands/ # Your commands live here
│ │ └── hello.ts # Auto-discovered command
│ └── index.ts # Entry point
├── package.json
├── tsconfig.json
└── .my-tool.yml # Config fileYour First Command
ts
// src/commands/hello.ts
import { defineCommand } from '@cliffx/core';
export default defineCommand({
name: 'hello',
description: 'Say hello',
options: {
name: {
type: 'string',
default: 'World',
description: 'Who to greet',
},
},
async run({ options, ui }) {
ui.success(`Hello, ${options.name}!`);
},
});Next Steps
- Learn about Commands and how they work
- Explore the Options & Arguments system
- Check out the UI Components for rich terminal output