django-typer
Use Typer to define the CLI for your Django management commands.
What it is and what it does
django-typer bridges Typer's modern, type-hint-driven CLI framework with Django's management command system. Instead of writing argparse boilerplate, you define command parameters as typed function arguments and let Typer handle parsing, validation, and help generation. The package provides TyperCommand, a drop-in replacement for Django's BaseCommand that inherits all standard Django command features while adding Typer's capabilities—or you can use Typer's own decorator-based interface directly.
You get automatic CLI validation through type hints, hierarchical command groups with shared initializers, beautiful help output, and optional shell tab-completion for bash, zsh, fish, and powershell. The package is actively maintained, supports current Python and Django versions, and carries no known vulnerabilities. It's particularly useful when you want to avoid writing repetitive argparse code or when you need complex command hierarchies with validation.
Use it for:
- Build a Django management command with typed parameters and automatic validation instead of manual argparse setup.
- Create hierarchical command groups (e.g., `manage.py admin users create --name=...`) with shared initialization logic.
- Add shell tab-completion to your custom Django commands without writing completion handlers by hand.
- Port an existing Django management command to use type hints while keeping the same class-based interface.
- Define multiple subcommands in a single command class with clear, DRY parameter definitions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Builds type-safe Django management command CLIs using Typer's static typing and parameter validation, with support for subcommands, command groups, and shell tab-completion.
Yes. django-typer is actively maintained, carries no known vulnerabilities, has low install friction, and solves a real pain point—replacing Django's argparse boilerplate with modern type-safe CLI definitions. It's production-stable (Development Status 5), works with current Django and Python versions, and is permissively licensed. Install it if you're building or maintaining Django management commands.
Install
django-typer on PyPI
pip
pip install django-typeruv
uv add django-typerpoetry
poetry add django-typerInstalling django-typer
Before you install
Low friction: pure Python wheel with three straightforward runtime dependencies (click, django, typer). Active maintenance with a release 6 days ago. Supports Python 3.10 through 3.15 and Django 5.2, 6.0, 6.1.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install django-typer
from django_typer.management import TyperCommand
class Command(TyperCommand):
def handle(self, name: str, count: int = 1):
"""A basic command."""
for _ in range(count):
print(f"Hello {name}")
Requires Django to be installed and configured; command must be placed in a Django app's management/commands/ directory.
Verify before relying
- Whether rich traceback rendering is installed automatically or requires explicit configuration beyond adding django_typer to INSTALLED_APPS.
- Performance characteristics when handling large numbers of subcommands or deeply nested command hierarchies.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — click, django, typer |
| Maintenance | actively maintained — 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 235,282/month — #9,005 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_typer-3.8.0-py3-none-any.whl
Keywords: CLI, Typer, commands, django, management
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
typer-cliThis package is a deprecated migration shim…
permissive · top 15,000 on PyPI
typer-slimtyper-slim is a deprecated migration shim that…
permissive · top 5,000 on PyPI
typer-injectorAdds FastAPI-style dependency injection to…
permissive · top 15,000 on PyPI
django-richIntegrates Rich's terminal formatting and…
permissive · top 15,000 on PyPI
typer-configAdds configuration-file support to typer CLI…
permissive · top 15,000 on PyPI
colcon-argcompleteAdds shell command-line completion to colcon…
permissive · top 15,000 on PyPI
sphinxcontrib-typerA Sphinx extension that auto-generates…
permissive · top 15,000 on PyPI
decliDecli wraps argparse to let you define…
permissive · top 5,000 on PyPI
DjangoDjango is a high-level Python web framework for…
permissive · top 1,000 on PyPI