Aller au contenu
Skillpedia
Programmation générale20k · #10418

CreateCLI

Ce qu’il fait

Crée des outils en ligne de commande prêts à l'emploi en TypeScript, avec documentation et codes de sortie appropriés. Il s'adresse aux développeurs qui veulent un petit outil qui encapsule une API ou automatise une tâche.

Quand l’utiliser

  • ✓Quand vous voulez un outil en ligne de commande qui encapsule une API que vous utilisez.
  • ✓Quand vous avez besoin d'un petit outil d'automatisation avec quelques commandes simples.
  • ✓Quand un outil en ligne de commande existant a grandi et doit être découpé en sous-commandes.

Lien du skill

https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/CreateCLI/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/CreateCLI/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Peux-tu me construire un outil en ligne de commande en TypeScript qui exporte mes données d'API au format JSON ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Le skill choisit l'un de trois modèles selon le nombre de commandes nécessaires, de l'analyse simple des arguments à un cadre de travail pour les outils plus importants. Il génère ensuite le code, le README, le fichier de paquet et une configuration TypeScript stricte.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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.argv by 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 json flag 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 --help that 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 tsc clean 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; --json stdout and fixed exit codes; a help --json catalog; RateLimit headers with per-key and per-IP limits; /docs/cli rendered 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

Questions fréquentes

Quand un outil a-t-il besoin du modèle plus complet ?

Lorsqu'il a besoin de nombreuses commandes regroupées, de sous-commandes de type git, d'une architecture à extensions ou de plusieurs formats de sortie, il passe à un modèle de cadre de travail.

Que contient l'outil généré ?

Le code complet, un README avec démarrage rapide, un fichier de paquet et une configuration TypeScript stricte.

Peut-il ajouter une commande à un outil existant ?

Oui. Le skill sait ajouter une commande et migrer un outil vers un modèle plus complet.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
20k
Position au classement
#10418
Licence
MIT
Mis à jour
28/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires