Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aiskillstore avatar

Python Cli Patterns

  • 2 installs
  • 404 repo stars
  • Updated August 5, 2026
  • aiskillstore/marketplace

python-cli-patterns is a Claude Code skill for building Python command-line applications with Typer and Rich.

About

python-cli-patterns is a Claude Code skill for building Python command-line applications with Typer and Rich. It covers basic Typer apps, command groups, arguments and options, Rich table and progress output, and CLI error handling, with a bundled full CLI template and reference files. A developer uses it when writing a terminal application in Python.

  • Modern Python CLI development with Typer and Rich
  • Covers commands, command groups, Rich tables/progress, and error handling
  • Bundles a full CLI template plus Typer, Rich, and configuration references

Python Cli Patterns by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #445 of 550 CLI & Terminal skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

python-cli-patterns capabilities & compatibility

Free; a pattern/template skill with no external service

Capabilities
cli development · terminal ui
Use cases
api development
Pricing
Free
From the docs

What python-cli-patterns says it does

Modern CLI development with Typer and Rich.
SKILL.md
CLI application patterns for Python. Triggers on: cli, command line, typer, click, argparse, terminal, rich, console, terminal ui.
SKILL.md
npx skills add https://github.com/aiskillstore/marketplace --skill python-cli-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars404
Last updatedAugust 5, 2026
Repositoryaiskillstore/marketplace

What it does

Build Python command-line apps with Typer and Rich, including commands, options, and formatted output.

Who is it for?

Writing modern Python CLIs with Typer commands and Rich formatted output

Skip if: Non-Python CLIs or GUI applications

When should I use this skill?

Building a Python CLI, or using typer, click, argparse, rich, or a terminal UI

What you get

A structured Python CLI with commands, options, formatted tables, and error handling.

  • Typer-based CLI application
  • Rich-formatted console output

By the numbers

  • requires Python 3.10+
  • bundles a full cli-template.py plus 3 reference files

Files

SKILL.mdMarkdownGitHub ↗

Python CLI Patterns

Modern CLI development with Typer and Rich.

Basic Typer App

import typer

app = typer.Typer(
    name="myapp",
    help="My awesome CLI application",
    add_completion=True,
)

@app.command()
def hello(
    name: str = typer.Argument(..., help="Name to greet"),
    count: int = typer.Option(1, "--count", "-c", help="Times to greet"),
    loud: bool = typer.Option(False, "--loud", "-l", help="Uppercase"),
):
    """Say hello to someone."""
    message = f"Hello, {name}!"
    if loud:
        message = message.upper()
    for _ in range(count):
        typer.echo(message)

if __name__ == "__main__":
    app()

Command Groups

import typer

app = typer.Typer()
users_app = typer.Typer(help="User management commands")
app.add_typer(users_app, name="users")

@users_app.command("list")
def list_users():
    """List all users."""
    typer.echo("Listing users...")

@users_app.command("create")
def create_user(name: str, email: str):
    """Create a new user."""
    typer.echo(f"Creating user: {name} <{email}>")

@app.command()
def version():
    """Show version."""
    typer.echo("1.0.0")

# Usage: myapp users list
#        myapp users create "John" "john@example.com"
#        myapp version

Rich Output

from rich.console import Console
from rich.table import Table
from rich.progress import track
from rich.panel import Panel
import typer

console = Console()

@app.command()
def show_users():
    """Display users in a table."""
    table = Table(title="Users")
    table.add_column("ID", style="cyan")
    table.add_column("Name", style="green")
    table.add_column("Email")

    users = [
        (1, "Alice", "alice@example.com"),
        (2, "Bob", "bob@example.com"),
    ]
    for id, name, email in users:
        table.add_row(str(id), name, email)

    console.print(table)

@app.command()
def process():
    """Process items with progress bar."""
    items = list(range(100))
    for item in track(items, description="Processing..."):
        do_something(item)
    console.print("[green]Done![/green]")

Error Handling

import typer
from rich.console import Console

console = Console()

def error(message: str, code: int = 1):
    """Print error and exit."""
    console.print(f"[red]Error:[/red] {message}")
    raise typer.Exit(code)

@app.command()
def process(file: str):
    """Process a file."""
    if not os.path.exists(file):
        error(f"File not found: {file}")

    try:
        result = process_file(file)
        console.print(f"[green]Success:[/green] {result}")
    except ValueError as e:
        error(str(e))

Quick Reference

FeatureTyper Syntax
Required argname: str
Optional argname: str = "default"
Optiontyper.Option(default, "--flag", "-f")
Argumenttyper.Argument(..., help="...")
Boolean flagverbose: bool = False
Enum choicecolor: Color = Color.red
Rich FeatureUsage
TableTable() + add_column/row
Progresstrack(items)
Colors[red]text[/red]
PanelPanel("content", title="Title")

Additional Resources

  • ./references/typer-patterns.md - Advanced Typer patterns
  • ./references/rich-output.md - Rich tables, progress, formatting
  • ./references/configuration.md - Config files, environment variables

Assets

  • ./assets/cli-template.py - Full CLI application template

---

See Also

Related Skills:

  • python-typing-patterns - Type hints for CLI arguments
  • python-observability-patterns - Logging for CLI applications

Complementary Skills:

  • python-env - Package CLI for distribution

Related skills

FAQ

Which libraries does python-cli-patterns use?

Typer for the CLI framework and Rich for tables, progress bars, and colored console output; it requires Python 3.10+.

What is bundled?

A full CLI application template (assets/cli-template.py) plus references for Typer patterns, Rich output, and configuration.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.