cli-developer

Implements command-line tools with argument parsing, prompts, and shell completions across Node.js, Python, and Go.

1|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/filippolmt/skills --skill cli-developer-filippolmt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-developer
Source: https://github.com/filippolmt/skills/tree/main/skills/cli-developer
Command: npx skills add https://github.com/filippolmt/skills --skill cli-developer-filippolmt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a well-behaved CLI requires juggling argument parsing, subcommand hierarchies, interactive prompts, progress indicators, shell completions, and cross-platform quirks like TTY detection and SIGINT handling. This Skill provides structured workflows and framework-specific reference guides so the generated CLI follows established conventions instead of ad-hoc patterns. ## Core Features & Use Cases - Framework-specific implementation guides: Detailed references for commander/yargs/inquirer (Node.js), click/typer/argparse/rich (Python), and cobra/viper/bubbletea (Go). - CLI design patterns: Command hierarchies, flag conventions, layered configuration, exit codes, plugin architecture, and error handling patterns. - UX patterns: Progress bars, spinners, semantic colors, help text structure, and interactive prompt guidelines with CI/CD non-interactive fallbacks. - Use Case: Ask the assistant to scaffold a Go CLI with cobra that has nested subcommands, viper-based config loading, and graceful Ctrl+C handling, and it produces the full command structure with proper exit codes. ## Quick Start Ask the assistant to build a CLI tool with subcommands, flags, and shell completions using your preferred framework such as commander, typer, or cobra.

Frequently Asked Questions about cli-developer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a CLI with subcommands in Node.js?

Use commander to define a root program with .command() for each subcommand, attaching options and action handlers. Nested subcommands are created by calling .command() on a subcommand object, and program.parse() processes argv.

Typer vs click: which Python CLI framework should I use?

Typer is built on click and adds type-hint-driven argument definitions with automatic help generation, making it more concise for modern Python. Click offers explicit decorators and is widely used when you need fine-grained control or compatibility with older codebases.

How do I add shell completions to a cobra CLI in Go?

Cobra has built-in completion generation for bash, zsh, and fish via the completion command it adds automatically. Users run 'mycli completion bash' and source the output, with no extra code required beyond standard cobra setup.

Why does my CLI show color codes when output is piped?

Color libraries emit ANSI codes unless they detect a TTY. Check process.stdout.isTTY in Node.js, sys.stdout.isatty() in Python, or term.IsTerminal() in Go, and also respect the NO_COLOR environment variable and CI environments.

How do I handle Ctrl+C gracefully in a CLI application?

Register a SIGINT handler that prints a cancellation message and exits with code 130. In Node.js use process.on('SIGINT'), in Python catch KeyboardInterrupt, and in Go use signal.Notify with os.Interrupt.

How should a CLI behave in CI/CD environments?

Detect non-interactive environments via the CI environment variable or missing TTY, then require all inputs as flags or environment variables instead of prompts. Fail fast with clear errors when required values are missing rather than blocking on input.