{"id":378,"library":"typer","title":"Typer","description":"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.","status":"active","version":"0.25.1","language":"python","source_language":"en","source_url":"https://github.com/fastapi/typer","tags":["cli","type-hints","fastapi","click-wrapper"],"install":[{"cmd":"pip install typer","lang":"bash","label":"Standard installation"}],"dependencies":[{"reason":"Required for pretty console output and tracebacks","package":"rich","optional":false},{"reason":"Required for shell completion detection","package":"shellingham","optional":false},{"reason":"Core dependency, Typer is built on top of Click","package":"click","optional":false}],"imports":[{"note":"'typer-cli' is a deprecated package, use 'typer' directly","wrong":"from typer_cli import typer","symbol":"typer","correct":"import typer"},{"note":"The 'typer-cli' package was discontinued in 0.24.1; use 'typer'","wrong":"from typer_cli import run","symbol":"run","correct":"from typer import run"},{"note":"Same as above","wrong":"from typer_cli import Typer","symbol":"Typer","correct":"from typer import Typer"}],"quickstart":{"code":"import typer\n\ndef main(name: str):\n    typer.echo(f\"Hello {name}\")\n\nif __name__ == \"__main__\":\n    typer.run(main)","lang":"python","description":"Creates a simple CLI that greets a user. Run with `python script.py World`."},"warnings":[{"fix":"Replace `pip install typer-cli` with `pip install typer` and change imports from `typer_cli` to `typer`.","message":"The packages 'typer-cli' and 'typer-slim' are deprecated since v0.24.1; use only 'typer'.","severity":"deprecated","affected_versions":">=0.24.1"},{"fix":"Upgrade to Python 3.10 or higher.","message":"Dropped support for Python 3.9 in v0.24.0. Python >=3.10 is required.","severity":"breaking","affected_versions":">=0.24.0"},{"fix":"Avoid mixing @click.command() and @app.command() in the same app.","message":"Typer uses Click internally, so you can use Click decorators, but mixing them can cause unexpected behavior. Prefer pure Typer patterns.","severity":"gotcha","affected_versions":"all"},{"fix":"To show locals, set `TYPER_RICH_SHOW_LOCALS=1` environment variable or pass `show_locals=True` to `Typer()`.","message":"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.","severity":"gotcha","affected_versions":">=0.23.0"}],"env_vars":null,"last_verified":"2026-05-12T13:25:12.092Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install typer` and import as `import typer` instead of `import typer_cli`.","cause":"The 'typer-cli' package was deprecated and is no longer maintained.","error":"ModuleNotFoundError: No module named 'typer_cli'"},{"fix":"Change import to `from typer import run`.","cause":"Using the old deprecated 'typer-cli' import path.","error":"ImportError: cannot import name 'run' from 'typer_cli'"},{"fix":"Update Typer with `pip install --upgrade typer`.","cause":"Using an older Typer version that does not support `rich_markup_mode` (added in v0.4.0).","error":"TypeError: __init__() got an unexpected keyword argument 'rich_markup_mode'"}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.12,"mem_mb":6.6,"disk_size":"31.4M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.08,"mem_mb":6.6,"disk_size":"32M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.21,"mem_mb":7.4,"disk_size":"34.7M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.17,"mem_mb":7.4,"disk_size":"35M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.17,"mem_mb":7.4,"disk_size":"26.3M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.16,"mem_mb":7.4,"disk_size":"27M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.15,"mem_mb":7.6,"disk_size":"26.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.15,"mem_mb":7.6,"disk_size":"26M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.13,"mem_mb":6.6,"disk_size":"30.6M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.1,"mem_mb":6.6,"disk_size":"31M"}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":2},{"runtime":"python:3.10-slim","exit_code":2},{"runtime":"python:3.11-alpine","exit_code":2},{"runtime":"python:3.11-slim","exit_code":2},{"runtime":"python:3.12-alpine","exit_code":2},{"runtime":"python:3.12-slim","exit_code":2},{"runtime":"python:3.13-alpine","exit_code":2},{"runtime":"python:3.13-slim","exit_code":2},{"runtime":"python:3.9-alpine","exit_code":2},{"runtime":"python:3.9-slim","exit_code":2}]}}