Build professional command-line interfaces in Python, Go, and Rust using modern frameworks like Typer, Cobra, and clap. Use when creating developer tools, automation scripts, or infrastructure management CLIs with robust argument parsing, interactive features, and multi-platform distribution.
View on GitHubancoleman/ai-design-components
backend-ai-skills
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/ancoleman/ai-design-components/blob/main/skills/building-clis/SKILL.md -a claude-code --skill building-clisInstallation paths:
.claude/skills/building-clis/# Building CLIs Build professional command-line interfaces across Python, Go, and Rust using modern frameworks with robust argument parsing, configuration management, and shell integration. ## When to Use This Skill Use this skill when: - Building developer tooling or automation CLIs - Creating infrastructure management tools (deployment, monitoring) - Implementing API client command-line tools - Adding CLI capabilities to existing projects - Packaging utilities for distribution (PyPI, Homebrew, binary releases) Common triggers: "create a CLI tool", "build a command-line interface", "add CLI arguments", "parse command-line options", "generate shell completions" ## Framework Selection ### Quick Decision Guide **Python Projects:** - **Typer** (recommended): Modern type-safe CLIs with minimal boilerplate - **Click**: Mature, flexible CLIs for complex command hierarchies **Go Projects:** - **Cobra** (recommended): Industry standard for enterprise tools (Kubernetes, Docker, GitHub CLI) - **urfave/cli**: Lightweight alternative for simple CLIs **Rust Projects:** - **clap v4** (recommended): Type-safe with derive API or builder API for runtime flexibility For detailed framework comparison and selection criteria, see [references/framework-selection.md](references/framework-selection.md). ## Core Patterns ### Arguments vs. Options vs. Flags **Positional Arguments:** - Primary input, identified by position - Use for required inputs (max 2-3 arguments) - Example: `convert input.jpg output.png` **Options:** - Named parameters with values - Use for configuration and optional inputs - Example: `--output file.txt`, `--config app.yaml` **Flags:** - Boolean options (presence = true) - Use for switches and toggles - Example: `--verbose`, `--dry-run`, `--force` **Decision Matrix:** | Use Case | Type | Example | |----------|------|---------| | Primary required input | Positional Argument | `git commit -m "message"` | | Optional configuration | Option | `--config app.ya