workflow-automation / library
Typer
Capability: Typer
Use it when
- You keep hand-rolling argparse boilerplate and help text for every internal Python script
- A team script needs to behave like a real CLI with automatic --help, subcommands, and shell completion for Bash, Zsh, Fish, and PowerShell
What it solves
Not the fit when
- Non-Python stacks
- Interactive full-screen terminal interfaces
- Packaging or distributing standalone binaries
- Assuming completion is active merely because the library is installed; packaged CLIs use `--install-completion`, while the companion `typer` command provides completion after the project environment is activated
- building web APIs
- interactive full-screen terminal UIs
- packaging or distributing binaries
Install
uv add typer (or pip install typer in a virtual environment)
Invoke
import typer; app = typer.Typer(); decorate functions with @app.command() and call app() - typed parameters become CLI arguments and options with automatic --help and shell completion; or run any script as a CLI with: typer main.py run
Alternatives
No reviewed alternatives recorded yet.