What problem does it solve?
Command-line interfaces are easy to get wrong: inconsistent flags, poor help text, fragile argument parsing, missing completions, and platform-specific behavior cause poor UX and maintenance burden. This skill provides patterns, framework-specific examples, and operational constraints to help teams design, implement, and test robust, cross-platform CLIs.
Core Features & Use Cases
- Command design & UX: plan subcommands, consistent flag names, help text, and command hierarchies to make tools discoverable and predictable.
- Framework-specific guidance: implementation recipes and best practices for Node.js (commander, yargs), Python (typer, click, argparse), and Go (cobra, viper, bubbletea).
- Polish & reliability: generate shell completions, detect TTY for colored output, handle SIGINT gracefully, add progress indicators and interactive prompts, and require cross-platform testing.
- Testing & distribution: guidance for snapshot and E2E tests, packaging (npm, pip, homebrew), and performance targets (startup <50ms) for production-grade CLIs.
- Use Case: implement a deploy command with robust flag validation, non-interactive CI fallbacks, and generated bash and zsh completions.
Quick Start
Create a CLI with a greet subcommand that accepts a name and a --loud flag, prints a greeting, supports --help and --version, and emits shell completion scripts for bash and zsh.