Generates production-ready TypeScript CLIs via a 3-tier template system (manual arg parsing, Commander.js, oclif), each shipping full implementation, docs, pack
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-createcli-510e90ead3bd ,按照其中的说明把「CreateCLI」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Before executing, check for user customizations at:
~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/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.
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.
Generates production-ready TypeScript CLIs. Every CLI ships with full implementation, README and QUICKSTART, a Bun package.json, strict tsconfig, JSON output, and correct exit codes. A three-tier template system picks the right complexity: Tier 1 manual arg parsing with zero deps (most cases), Tier 2 Commander.js for subcommands, Tier 3 oclif as a reference for enterprise scale.
People build the same CLI from scratch over and over. It starts as a bash script, then needs error handling, then help text, then type safety, and ends up rewritten in TypeScript with docs bolted on at the end. Each round repeats the same boilerplate and the same mistakes. This skill takes that whole arc and produces a clean, typed, documented CLI in one pass, at the tier the job actually needs.
Generate production-ready TypeScript CLIs with documentation, type safety, error handling, and CLI-First Architecture principles.
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...
| Workflow | Trigger | File |
|---|---|---|
| CreateCli | Create a new CLI tool from scratch | Workflows/CreateCli.md |
| AddCommand | Add a new command to existing CLI | Workflows/AddCommand.md |
| UpgradeTier | Upgrade CLI to higher tier | Workflows/UpgradeTier.md |
Activate when you see these patterns:
Tier 1: llcli-Style (DEFAULT - 80% of use cases)
When to use Tier 1:
Tier 2: Commander.js (ESCALATION - 15% of use cases)
When to use Tier 2:
Tier 3: oclif (REFERENCE ONLY - 5% of use cases)
1. Complete Implementation
2. Comprehensive Documentation
3. Development Setup
4. Quality Standards
Generated CLIs follow LifeOS standards:
Generated CLIs go to:
~/.claude/LIFEOS/TOOLS/[cli-name]/ - Personal CLIs (like llcli)~/Projects/[project-name]/ - Project-specific CLIs${PROJECTS_DIR}/LIFEOS/Examples/clis/ - Example CLIs (PUBLIC repo)SAFETY: Always verify repository location before git operations
Every generated CLI follows:
For detailed information, read these files:
Workflows/CreateCli.md - Main CLI generation workflow (decision tree, 10-step process)Workflows/AddCommand.md - Add commands to existing CLIsWorkflows/UpgradeTier.md - Migrate simple → complexFrameworkComparison.md - Manual vs Commander vs oclif (with research)Patterns.md - Common CLI patterns (from llcli analysis)TypescriptPatterns.md - Type safety patterns (from tsx, vite, bun research)User Request: "Create a CLI for the GitHub API that can list repos, create issues, and search code"
Generated Structure:
~/.claude/LIFEOS/TOOLS/ghcli/
├── ghcli.ts # 350 lines, complete implementation
├── package.json # Bun + TypeScript
├── tsconfig.json # Strict mode
├── .env.example # GITHUB_TOKEN=your_token
├── README.md # Full documentation
└── QUICKSTART.md # Common use cases
Usage:
ghcli repos --user exampleuser
ghcli issues create --repo myrepo --title "Bug fix"
ghcli search "typescript CLI"
ghcli --help
User Request: "Build a CLI to convert markdown files to HTML with frontmatter extraction"
Generated Structure:
~/.claude/LIFEOS/TOOLS/md2html/
├── md2html.ts
├── package.json
├── README.md
└── QUICKSTART.md
Usage:
md2html convert input.md output.html
md2html batch *.md output/
md2html extract-frontmatter post.md
User Request: "Create a CLI for data transformation with multiple formats, validation, and analysis commands"
Generated Structure:
~/.claude/LIFEOS/TOOLS/data-cli/
├── data-cli.ts # Commander.js with subcommands
├── package.json
├── README.md
└── QUICKSTART.md
Usage:
data-cli convert json csv input.json
data-cli validate schema data.json
data-cli analyze stats data.csv
data-cli transform filter --column=status --value=active
Every generated CLI must pass these gates:
any types except justifiedDevelopers repeatedly create CLIs for APIs and tools. Each time:
This skill automates steps 1-7.
The llcli CLI (Limitless.ai API; retired 2026-07-15 when the backend moved to Bee — the pattern it proved lives on here) demonstrated this pattern works:
This skill replicates that success.
This skill turns "I need a CLI for X" into production-ready tools in minutes, following proven patterns from llcli and CLI-First Architecture.
After completing any workflow, append a single JSONL entry:
echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"CreateCLI","workflow":"WORKFLOW_USED","input":"8_WORD_SUMMARY","status":"ok|error","duration_s":SECONDS}' >> ~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl
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.