CreateCLI
Qué hace
Crea herramientas de línea de comandos listas para usar en TypeScript, con documentación y códigos de salida adecuados. Es para desarrolladores que quieren una herramienta pequeña que envuelva una API o automatice una tarea.
Cuándo usarla
- ✓Cuando quieres una herramienta de línea de comandos que envuelva una API que usas.
- ✓Cuando necesitas una herramienta de automatización pequeña con unos pocos comandos sencillos.
- ✓Cuando una herramienta de línea de comandos existente ha crecido y necesita subcomandos.
Link de la skill
https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/CreateCLI/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Constrúyeme una herramienta de línea de comandos en TypeScript que exporte los datos de mi API a JSON.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill elige una de tres plantillas según el número de comandos que necesite la herramienta, desde un análisis sencillo de argumentos hasta un marco de trabajo para herramientas más grandes. Después genera el código, el README, el archivo de paquete y una configuración estricta de TypeScript.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Cuándo necesita una herramienta la plantilla más grande?
Cuando necesita muchos comandos agrupados, subcomandos al estilo de git, un diseño de plugins o varios formatos de salida, pasa a una plantilla de marco de trabajo.
¿Qué incluye la herramienta generada?
El código completo, un README con inicio rápido, un archivo de paquete y una configuración estricta de TypeScript.
¿Puede añadir un comando a una herramienta que ya tengo?
Sí. La skill tiene formas de añadir un comando y de pasar una herramienta a una plantilla más grande.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 20 mil
- Posición en el ranking
- #10418
- Licencia
- MIT
- Actualizada
- 28/10/2026
Comentarios
- …
Más skills de este repositorio
LifeOS
20 milAyuda a tu agente a configurar LifeOS, un sistema personal que relaciona tu situación actual con tu situación ideal mediante una entrevista y un panel.
AnnualReports
20 milAyuda a tu agente a buscar y comparar informes anuales de ciberseguridad de grandes proveedores, como las tendencias de brechas y ransomware, con una fuente para cada cifra.
ApertureOscillation
20 milEnseña a tu agente a probar una pregunta de diseño con un alcance estrecho y otro amplio, y después señalar dónde chocan las dos respuestas antes de construir.
Aphorisms
20 milPermite que tu agente busque, encuentre y registre citas atribuidas de una colección seleccionada, evitando las que se usaron hace poco en tu boletín.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.