Typer
raw JSON → 0.25.1 verified Tue May 12 auth: no python install: verified quickstart: stale
Typer is a library for building CLI applications based on Python type hints, created by the author of FastAPI. It leverages type hints for argument parsing and integrates with Rich for beautiful output. The current version is 0.25.1, released in 2025, with a release cadence of several minor and patch versions per year. It requires Python >=3.10.
pip install typer Common errors
error ModuleNotFoundError: No module named 'typer_cli' ↓
cause The 'typer-cli' package was deprecated and is no longer maintained.
fix
Run
pip install typer and import as import typer instead of import typer_cli. error ImportError: cannot import name 'run' from 'typer_cli' ↓
cause Using the old deprecated 'typer-cli' import path.
fix
Change import to
from typer import run. error TypeError: __init__() got an unexpected keyword argument 'rich_markup_mode' ↓
cause Using an older Typer version that does not support `rich_markup_mode` (added in v0.4.0).
fix
Update Typer with
pip install --upgrade typer. Warnings
deprecated The packages 'typer-cli' and 'typer-slim' are deprecated since v0.24.1; use only 'typer'. ↓
fix Replace `pip install typer-cli` with `pip install typer` and change imports from `typer_cli` to `typer`.
breaking Dropped support for Python 3.9 in v0.24.0. Python >=3.10 is required. ↓
fix Upgrade to Python 3.10 or higher.
gotcha Typer uses Click internally, so you can use Click decorators, but mixing them can cause unexpected behavior. Prefer pure Typer patterns. ↓
fix Avoid mixing @click.command() and @app.command() in the same app.
gotcha Rich traceback formatting may not show local variables by default since v0.23.0. Set `rich_markup_mode='rich'` or use `typer.run(main, use_rich=True)` to control. ↓
fix To show locals, set `TYPER_RICH_SHOW_LOCALS=1` environment variable or pass `show_locals=True` to `Typer()`.
Install compatibility verified last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) - - 0.12s 31.4M
3.10 slim (glibc) - - 0.08s 32M
3.11 alpine (musl) - - 0.21s 34.7M
3.11 slim (glibc) - - 0.17s 35M
3.12 alpine (musl) - - 0.17s 26.3M
3.12 slim (glibc) - - 0.16s 27M
3.13 alpine (musl) - - 0.15s 26.0M
3.13 slim (glibc) - - 0.15s 26M
3.9 alpine (musl) - - 0.13s 30.6M
3.9 slim (glibc) - - 0.10s 31M
Imports
- typer wrong
from typer_cli import typercorrectimport typer - run wrong
from typer_cli import runcorrectfrom typer import run - Typer wrong
from typer_cli import Typercorrectfrom typer import Typer
Quickstart stale last tested: 2026-04-23
import typer
def main(name: str):
typer.echo(f"Hello {name}")
if __name__ == "__main__":
typer.run(main)