CreateCLI
What it does
Creates ready-to-use command-line tools in TypeScript, with documentation and proper exit codes. It is for developers who want a small tool that wraps an API or automates a task.
When to use it
- ✓When you want a command-line tool that wraps an API you use.
- ✓When you need a small automation tool with a few simple commands.
- ✓When an existing command-line tool has grown and needs subcommands.
Skill link
https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/CreateCLI/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Build me a command-line tool in TypeScript that exports my API data to JSON.”
5 new skills a week. 1 minute to read.
How it works
The skill picks one of three templates based on how many commands the tool needs, from simple argument parsing to a framework for larger tools. It then generates the code, README, package file and strict configuration.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
CreateCLI
Contents: Ideal State · Intent Routing · Data & Config · Gotchas · Examples
Generates production-ready TypeScript CLIs, from agent-first CLIs for public web apps (API-key auth, browser device login) to personal and project tools. 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.
Shared facts the intents rely on:
- Tiers. Tier 1 parses
process.argvby hand with zero framework dependencies, Bun + TypeScript and type-safe interfaces in ~300-400 lines, in four sections: configuration, command functions, help documentation, main entry point. It fits API clients, data transformers and simple automation with 2-10 commands, simple arguments, JSON output and no subcommands. Tier 2 (Commander.js) is the escalation when any Tier 2 indicator holds, the same list for CreateCli and UpgradeTier: 10+ commands that need grouping, git-style subcommands (cli convert json csv/cli convert csv json), a plugin architecture, complex nested option combinations, or multiple output format engines (a--format jsonflag alone is standard Tier 1 output control). A long list of simple, ungrouped commands is not an indicator. Tier 3 (oclif) is reference only, documentation and no templates, for Heroku CLI or Salesforce CLI scale. - Stack. Runtime and package manager are Bun, the language is TypeScript with a strict tsconfig, tests (when added) run under
bun test ./<path>, output is deterministic JSON that pipes to jq and grep, and documentation is README + QUICKSTART. - Placement.
~/.claude/LIFEOS/TOOLS/[cli-name]/holds personal CLIs and~/Projects/[project-name]/project-specific ones. The two sit in different git repositories, so confirm which repository a CLI directory belongs to before any git operation in it. - CLI-First Architecture (
LIFEOS/DOCUMENTATION/Tools/CliFirstArchitecture.md): every generated CLI is deterministic (same input → same output), clean (single responsibility), composable (JSON output pipes to other tools), documented (comprehensive help and examples) and testable (predictable behavior).
Ideal State
- Every CLI the skill creates or changes ships whole: typed source, README.md and QUICKSTART.md, a Bun package.json, a strict tsconfig.json, an .env.example, and
--helpthat lists every command with real examples. - Output follows one contract across intents: JSON to stdout, errors with context to stderr, exit code 0 on success and 1 on error, and strict
tscclean before the work is reported done. - A CLI for a public-facing app meets the agent-first contract (OPERATIONAL_PREFERENCES § Deployment): a browser device login that mints a scoped, expiring API key;
--jsonstdout and fixed exit codes; ahelp --jsoncatalog; RateLimit headers with per-key and per-IP limits;/docs/clirendered from the CLI's own catalog; and a self-hosted, SHA-checked install.Intents/CreateCli.md§ Ideal State itemizes it, and Config.md names the reference implementation to match when one is configured. Where that contract and the output contract above differ, the agent-first contract governs. - The tier fits the need: Tier 1 unless a Tier 2 indicator holds, oclif never generated, and a CLI moves up a tier only when it has outgrown the one it is on.
- A change to an existing CLI keeps every command it already had working.
Intent Routing
| Intent | Trigger | File |
|---|---|---|
| CreateCli | "create CLI", "build a CLI", "wrap this API in a command-line tool" | Intents/CreateCli.md |
| AddCommand | "add a command to <cli>" | Intents/AddCommand.md |
| UpgradeTier | "upgrade tier", "move this CLI to Commander" | Intents/UpgradeTier.md |
| File | Read when |
|---|---|
FrameworkComparison.md |
choosing or justifying a framework: Manual vs Commander vs oclif, plus cleye, citty, Yargs and Ink |
Tools/CheckCli.ts |
proving a CLI meets the output contract: strict tsc, --help names every command, --version, unknown command exits 1, --json-args stdout parses as JSON |
Setup.md |
first-time setup: the optional Reference CLI: key in Config.md |
Data & Config
User customizations live at `<configRoot>/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Creat
FAQ
When does a tool need the bigger template?
When it needs many grouped commands, git-style subcommands, a plugin design or several output formats, it moves up to a framework template.
What comes with the generated tool?
The full code, a README and quickstart, a package file and a strict TypeScript config.
Can it add a command to a tool I already have?
Yes. The skill has ways to add a command and to upgrade a tool to a larger template.
Details
Original description by the author
Generates production-ready TypeScript CLIs via a 3-tier template system (manual arg parsing, Commander.js, oclif), each shipping full implementation, docs, package.json, strict config, JSON output, and exit-code compliance. USE WHEN create CLI, build CLI, command-line tool, wrap API, add command, upgrade tier, TypeScript CLI. NOT FOR LifeOS skill scaffolding (use CreateSkill).
repo: danielmiessler/LifeOS
Popularity
- GitHub stars
- 20k
- Ranking position
- #10418
- License
- MIT
- Updated
- 10/28/2026
Comments
- …
More skills from this repository
LifeOS
20kHelps your agent set up LifeOS, a personal system that maps your current state to your ideal state through an interview and a dashboard.
AnnualReports
20kHelps your agent find and compare cybersecurity annual reports from major vendors, such as breach and ransomware trends, with a source for every figure.
ApertureOscillation
20kTeaches your agent to test one design question at a narrow scope and a wide scope, then name where the two answers clash before you build.
Aphorisms
20kLets your agent find, match, and track attributed quotes from a curated collection, avoiding ones recently used in your newsletter.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.