Generate production-ready TypeScript CLIs using a 3-tier template system: Tier 1 llcli-style manual arg parsing (zero deps, Bun + TypeScript, ~300-400 lines — 80% of cases), Tier 2 Commander.js (subcommands, nested options, auto-help — 15%), Tier 3 oclif reference only (enterprise scale — 5%). Every generated CLI includes full implementation, README + QUICKSTART docs, package.json with Bun, tsconfig strict mode, type-safe throughout, JSON output, exit code compliance. Workflows: CreateCli (from scratch), AddCommand (extend existing), UpgradeTier (migrate Tier 1 → 2). Outputs go to ~/.claude/Bin/ or ~/Projects/. Tier 1 (llcli pattern — 327 lines, zero deps) suits API clients, data transformers, simple automation — 2-10 commands, JSON output. Tier 2 (Commander.js) for 10+ commands, nested options, or plugin architecture. Tier 3 (oclif) is documentation-only reference for Heroku/Salesforce scale. Output tree: {name}.ts + package.json + tsconfig.json (strict) + .env.example + README.md + QUICKSTART.md. Quality gates: zero TypeScript errors, exit codes 0/1, --help comprehensive, JSON output pipes to jq/grep. USE WHEN create CLI, build CLI, command-line tool, wrap API, add command, upgrade tier, TypeScript CLI, generate CLI, CLI for API, command-line wrapper. NOT FOR PAI skill scaffolding (use CreateSkill). NOT FOR Python or npm-based tooling.
effort
medium
Customization
Before executing, check for user customizations at:~/.claude/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
🚨 MANDATORY: Voice Notification (REQUIRED BEFORE ANY ACTION)
You MUST send this notification BEFORE doing anything else when this skill is invoked.
Send voice notification:
curl -s -X POST http://localhost:31337/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow in the CreateCLI skill to ACTION"}' \
> /dev/null 2>&1 &
Output text notification:
Running the **WorkflowName** workflow in the **CreateCLI** skill to ACTION...
This is not optional. Execute this curl command immediately upon skill invocation.
CreateCLI
Automated CLI Generation System
Generate production-ready TypeScript CLIs with comprehensive documentation, type safety, error handling, and CLI-First Architecture principles.
Workflow Routing
Route to the appropriate workflow based on the request.
When executing a workflow, output this notification directly:
Running the **WorkflowName** workflow in the **CreateCLI** skill to ACTION...
Create a new CLI tool from scratch → Workflows/CreateCli.md
Add a new command to existing CLI → Workflows/AddCommand.md
Upgrade CLI to higher tier → Workflows/UpgradeTier.md
🚀 WHEN TO ACTIVATE THIS SKILL
Activate when you see these patterns:
Direct Requests
"Create a CLI for [API/service/tool]"
"Build a command-line interface for X"
"Make a CLI that does Y"
"Generate a TypeScript CLI"
"I need a CLI tool for Z"
Context Clues
User describes repetitive API calls → Suggest CLI
User mentions "I keep typing this command" → Suggest CLI wrapper
User has bash script doing complex work → Suggest TypeScript CLI replacement
User working with API that lacks official CLI → Suggest creating one
Examples
✅ "Create a CLI for the GitHub API"
✅ "Build a command-line tool to process CSV files"
✅ "Make a CLI for my database migrations"
✅ "Generate a CLI that wraps this API"
✅ "I need a tool like llcli but for Notion API"
💡 CORE CAPABILITIES
Three-Tier Template System
Tier 1: llcli-Style (DEFAULT - 80% of use cases)
Manual argument parsing (process.argv)
Zero framework dependencies
Bun + TypeScript
Type-safe interfaces
~300-400 lines total
Perfect for: API clients, data transformers, simple automation
When to use Tier 1:
✅ 2-10 commands
✅ Simple arguments (flags, values)
✅ JSON output
✅ No subcommands
✅ Fast development
Tier 2: Commander.js (ESCALATION - 15% of use cases)
Replace WORKFLOW_USED with the workflow executed, 8_WORD_SUMMARY with a brief input description, and SECONDS with approximate wall-clock time. Log status: "error" if the workflow failed.