cli_developer

Builds cross-platform command-line tools with argument parsing, subcommands, and shell completions.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill cli-developer-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli_developer
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/cli_developer
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill cli-developer-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building command-line tools that feel professional requires handling argument parsing, subcommand hierarchies, configuration precedence, output formatting, and shell completions across multiple languages and platforms, which is error-prone without established patterns. ## Core Features & Use Cases - Framework Guidance: Select and implement CLIs with Typer or Click for Python, Cobra for Go, and clap for Rust, with working code examples for each. - CLI Design Patterns: Structure arguments, options, flags, and subcommand hierarchies following conventions like configuration precedence (CLI args > env vars > config files > defaults). - UX and Distribution: Add progress bars, interactive prompts, TTY-aware colored output, shell completions, and package for PyPI, Homebrew, or Cargo. - Use Case: You need to build a deployment tool in Go with nested subcommands, Viper-based configuration, and zsh completions; this Skill provides the Cobra scaffolding, config layering, and completion generation patterns. ## Quick Start Ask the agent to scaffold a Python CLI with Typer that has two subcommands, a config file, and shell completion support.

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 tool in Python with Typer?

Install typer with the rich extras, define commands as decorated functions with type-annotated parameters, and call the app in the main block. Typer auto-generates help text and validation from type hints with minimal boilerplate.

Cobra vs urfave/cli for Go command-line tools?

Cobra is the industry standard for enterprise tools like Kubernetes and the GitHub CLI, offering subcommand architecture, POSIX-compliant flags, and Viper config integration. urfave/cli is a lighter alternative suited for simple CLIs.

How do I generate shell completions for my CLI?

Cobra provides GenBashCompletion and GenZshCompletion methods, Typer exposes completion scripts via environment variables, and Rust's clap uses the clap_complete crate to generate completions for bash, zsh, and fish.

What is the correct configuration precedence for CLI tools?

The standard order is CLI arguments first, then environment variables, then local config file, user config file, system config file, and finally built-in defaults. Document this precedence in help text and offer a flag to print effective configuration.

Why should CLI output avoid colors when piped?

Color escape codes corrupt machine-readable output when stdout is piped to another program or file. Detect whether stdout is a TTY and disable colors and progress indicators in non-interactive mode, writing logs to stderr instead.