
Create CLI
FreeGenerate production-ready TypeScript command-line tools.
Free Β· Opens the source repo
What Create CLI does
Create CLI is a powerful skill designed for developers who need to quickly generate command-line interfaces (CLIs) in TypeScript. This skill utilizes a three-tier template system that allows users to create CLIs tailored to their specific needs, whether they require simple argument parsing or more complex command structures. With this skill, you can avoid the repetitive and error-prone process of building CLIs from scratch, as it automatically generates a fully functional CLI complete with documentation, type safety, and error handling.
The skill is particularly useful for those who frequently interact with APIs or have existing bash scripts that could benefit from a more robust TypeScript implementation. By providing a structured approach to CLI development, Create CLI ensures that all generated tools adhere to best practices, including proper exit codes and JSON output. This not only streamlines the development process but also enhances the maintainability and usability of the resulting CLI tools.
Each generated CLI includes comprehensive documentation, such as a README and QUICKSTART guide, allowing users to get up and running quickly. Additionally, the generated code is designed to be clean, deterministic, and composable, making it easy to integrate with other tools and workflows. Whether you're building a simple tool for personal use or a more complex CLI for enterprise applications, Create CLI simplifies the process and ensures high-quality output.
In summary, Create CLI is an essential tool for developers looking to efficiently create TypeScript CLIs that are production-ready. Its tiered approach allows for flexibility in complexity while maintaining a focus on quality and usability, making it a valuable addition to any developer's toolkit.
When to use it
Use this skill when you need to create a new CLI tool, add commands to existing CLIs, or upgrade the complexity of a CLI.
When not to use it
This skill is not suitable for scaffolding LifeOS skills; for that purpose, use the CreateSkill instead.
What you can build with it
Creating a CLI for an API
Use Create CLI to quickly generate a command-line interface for any API, simplifying repetitive tasks.
Upgrading an existing CLI
Easily upgrade your existing CLI to a higher tier with more advanced features and better documentation.
Adding commands to a CLI
Leverage Create CLI to add new commands to your existing command-line tool without starting from scratch.
How to install Create CLI
View source1. Install with the skills CLI
npx skills add danielmiessler/lifeos/CreateCLI --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by danielmiesslerCustomization
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.
π¨ 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
What It Does
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.
The Problem
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.
How It Works
Generate production-ready TypeScript CLIs with 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...
| 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 |
π 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)
- Framework-based parsing
- Subcommands + nested options
- Auto-generated help
- Plugin-ready
- Perfect for: Complex multi-command tools
When to use Tier 2:
- β 10+ commands needing grouping
- β Complex nested options
- β Plugin architecture
- β Multiple output formats
Tier 3: oclif (REFERENCE ONLY - 5% of use cases)
- Documentation only (no templates)
- Enterprise-grade plugin systems
- Perfect for: Heroku CLI, Salesforce CLI scale (rare)
What Every Generated CLI Includes
1. Complete Implementation
- TypeScript source with full type safety
- All commands functional and tested
- Error handling with proper exit codes
- Configuration management
2. Comprehensive Documentation
- README.md with philosophy, usage, examples
- QUICKSTART.md for common patterns
- Inline help text (--help)
- API response documentation
3. Development Setup
- package.json (Bun configuration)
- tsconfig.json (strict mode)
- .env.example (configuration template)
- File permissions configured
4. Quality Standards
- Type-safe throughout
- Deterministic output (JSON)
- Composable (pipes to jq, grep)
- Error messages with context
- Exit code compliance
ποΈ INTEGRATION WITH LifeOS
Technology Stack Alignment
Generated CLIs follow LifeOS standards:
- β Runtime: Bun (NOT Node.js)
- β Language: TypeScript (NOT JavaScript or Python)
- β Package Manager: Bun (NOT npm/yarn/pnpm)
- β Testing: Vitest (when tests added)
- β Output: Deterministic JSON (composable)
- β Documentation: README + QUICKSTART (llcli pattern)
Repository Placement
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
CLI-First Architecture Principles
Every generated CLI follows:
- Deterministic - Same input β Same output
- Clean - Single responsibility
- Composable - JSON output pipes to other tools
- Documented - Comprehensive help and examples
- Testable - Predictable behavior
π EXTENDED CONTEXT
For detailed information, read these files:
Workflow Documentation
Workflows/CreateCli.md- Main CLI generation workflow (decision tree, 10-step process)Workflows/AddCommand.md- Add commands to existing CLIsWorkflows/UpgradeTier.md- Migrate simple β complex
Reference Documentation
FrameworkComparison.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)
π EXAMPLES
Example 1: API Client CLI (Tier 1)
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
Example 2: File Processor (Tier 1)
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
Example 3: Data Pipeline (Tier 2)
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
β QUALITY STANDARDS
Every generated CLI must pass these gates:
1. Compilation
- β TypeScript compiles with zero errors
- β Strict mode enabled
- β
No
anytypes except justified
2. Functionality
- β All commands work as specified
- β Error handling comprehensive
- β Exit codes correct (0 success, 1 error)
3. Documentation
- β README explains philosophy and usage
- β QUICKSTART has common examples
- β --help text comprehensive
- β All flags/options documented
4. Code Quality
- β Type-safe throughout
- β Clean function separation
- β Error messages actionable
- β Configuration externalized
5. Integration
- β Follows LifeOS tech stack (Bun, TypeScript)
- β CLI-First Architecture principles
- β Deterministic output (JSON)
- β Composable with other tools
π― PHILOSOPHY
Why This Skill Exists
Developers repeatedly create CLIs for APIs and tools. Each time:
- Starts with bash script
- Realizes it needs error handling
- Realizes it needs help text
- Realizes it needs type safety
- Rewrites in TypeScript
- Adds documentation
- Now has production CLI
This skill automates steps 1-7.
The llcli Pattern
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:
- 327 lines of TypeScript
- Zero dependencies (no framework)
- Complete error handling
- Comprehensive documentation
- Production-ready immediately
This skill replicates that success.
Design Principles
- Start Simple - Default to Tier 1 (llcli-style)
- Escalate When Needed - Tier 2 only when justified
- Complete, Not Scaffold - Every CLI is production-ready
- Documentation First - README explains "why" not just "how"
- Type Safety - TypeScript strict mode always
π RELATED SKILLS
- development - For complex feature development (not CLI-specific)
- mcp - For web scraping CLIs (Bright Data, Apify wrappers)
- a lifelog skill - Example of a skill built on an official vendor CLI (bee)
This skill turns "I need a CLI for X" into production-ready tools in minutes, following proven patterns from llcli and CLI-First Architecture.
Gotchas
- Always use bun, never npm/npx. Zero exceptions per system prompt.
- TypeScript only. Never generate Python CLIs unless the user explicitly approves.
- 3-tier system: Start with the simplest tier that fits. Don't over-engineer a Tier 3 CLI when Tier 1 suffices.
Execution Log
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.
Frequently asked questions about Create CLI
Similar skills
Rhino 3D Scripting
Streamline your Rhinoceros 3D scripting tasks.
MVVM Toolkit
Streamline ViewModel development with source generators.
FreeCAD Scripts
Generate Python scripts for FreeCAD automation and modeling.
Azure Architecture Builder
Design and deploy Azure infrastructure using natural language.
Command Development
Streamline your command creation for Claude Code.
Create Cowork Plugin
Easily build and package plugins through guided sessions.
