cli-dev

Implements CLI applications with Typer, Click, and Rich following argument parsing and output formatting best practices.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/Dazlarus/karl-code --skill cli-dev-dazlarus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cli-dev
Source: https://github.com/Dazlarus/karl-code/tree/main/.agents/skills/cli-dev
Command: npx skills add https://github.com/Dazlarus/karl-code --skill cli-dev-dazlarus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building command-line applications often leads to inconsistent argument parsing, unformatted plain-text output, missing error handling, and poor help documentation. This Skill provides structured guidance and code patterns for building well-organized, user-friendly CLI tools in Python. ## Core Features & Use Cases - Modern CLI Frameworks: Patterns for Typer and Click including commands, options, flags, and subcommand groups. - Rich Output Formatting: Tables, progress bars, and colored console output using the Rich library. - Error Handling & Configuration: Graceful error messages with exit codes and TOML-based configuration file loading. - Use Case: When scaffolding a new Python CLI tool with database subcommands, apply this Skill to structure the Typer app, add a Rich-formatted status table, validate input files, and support a config file. ## Quick Start Review my Python CLI script and refactor it to use Typer with Rich-formatted output and proper error handling.

Frequently Asked Questions about cli-dev

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

FAQPage Schema
How do I build a CLI application in Python with Typer?▼

Create a typer.Typer() app instance and register commands with the @app.command() decorator, using typer.Argument and typer.Option for parameters. Typer automatically generates help text from type hints and docstrings.

Typer vs Click: which Python CLI framework should I use?▼

Typer is built on top of Click and adds type-hint-based parameter declaration with less boilerplate. Click offers a mature decorator API with groups and is a solid alternative when you need its explicit style or broader compatibility.

How do I add tables and progress bars to CLI output?▼

Use the Rich library: rich.table.Table renders formatted tables with styled columns, and rich.progress.track wraps iterables to display progress bars. The Console class handles colored output.

Should I use argparse for Python command-line tools?▼

This Skill recommends against using argparse directly. Typer or Click provide cleaner APIs, automatic help generation, and better support for subcommands, options, and input validation.

How do I support configuration files in a CLI tool?▼

Load a TOML config file with tomli, merge it over a dictionary of default values, and validate the file exists before parsing. Pass the config path as a CLI option so users can override defaults.