Change Log

v4.1.0 (2026-09-05)

  • Support Typer 0.27+

  • Help output follows Typer 0.27’s metavar rendering (e.g. <str> instead of TEXT and {arg} instead of ARG in usage lines)

  • Model field parser metavars are lowercase to match Typer’s (e.g. <int>, <txt>)

v4.0.0 (2026-09-05)

Migrating from 3.x to 4.x

  • Python 3.10 is no longer supported, 4.x requires Python 3.11 or later.

  • Typer 0.26.8 or later is required and Click is no longer a dependency of django-typer. Typer now vendors Click, so the click package may not be installed in your environment and even when it is, its classes are not the ones Typer uses. If your commands import from click:

    • Import the types used to write completers from django_typer.completers:

      # 3.x
      from click import Context, Parameter
      from click.shell_completion import CompletionItem
      
      # 4.x
      from django_typer.completers import CompletionItem, Context, Parameter
      
    • Import the types used to write parsers from django_typer.parsers:

      # 3.x
      from click import Context, Parameter, ParamType
      
      # 4.x
      from django_typer.parsers import Context, Parameter, ParamType
      
    • Use typer.Exit, typer.Abort and typer.BadParameter in place of their click counterparts. Raising CommandError remains the recommended way to report errors from a command.

    • Replace calls to click.get_current_context() with a parameter annotated as Context on the command, group or callback that needs it, Typer will pass the active context in. get_current_command() continues to provide the running command instance.

    • isinstance checks against click classes will no longer match.

    • The click_type parameter to typer.Option and typer.Argument was removed upstream, pass the type to parser instead. Parsers already passed through parser are unaffected: plain callables and ParamType subclasses, including ones derived from a separately installed Click, continue to work.

  • Options declared with prompt=True, prompt_required=False no longer prompt when the flag is passed without a value, doing so is now a usage error. Omit the flag to be prompted or pass the value explicitly.

  • If you document your commands with the typer directive from sphinxcontrib-typer, upgrade it to 0.10 or later. Earlier releases drive the real Click package and fail against Typer 0.26+.

  • The program name shown in the Usage: line of command help (and used when installing shell completions) is now the bare command name whenever that name resolves on the path, including when the script was launched through a shim or wrapper of the same name or through a relative path to the same script. Previously the full path was shown in these cases. Set DT_MANAGE_SCRIPT to pin the name if you need a specific value, see Configure the Manage Script Name.

  • typer.Exit, typer.Abort and KeyboardInterrupt leaving a command now follow one policy. From the command line the process exits with the status (Abort prints Aborted! and exits 1, an interrupt exits 130) and nothing else is printed. From call_command(), a non-zero Exit and an Abort raise CommandError with returncode set, and Exit(0) returns None. Command functions called directly from Python are plain calls and whatever they raise propagates unchanged. Previously Exit was returned (and printed) as the command’s output when executed and ended the process when the command object was called directly. See Exit Codes, Errors and Aborts.

  • Return values are no longer printed. In 3.x a truthy value returned from a command was written to stdout, mirroring BaseCommand. In 4.x nothing is printed unless the command sets print_result = True or the project sets DT_PRINT_RESULT = True - see Toggle on/off result printing. If a command’s return value doubled as its output, set one of those or write the output explicitly.

  • Starting with 4.1 (Typer 0.27+), help output renders type metavars in lowercase angle brackets (<str>, <int>, <path>) instead of TEXT, INTEGER and PATH, and usage lines show required arguments as {arg} and optional arguments as [arg] instead of ARG. The provided model field parsers follow suit (<int>, <txt>, …). Update any tests that assert on help text.

  • No changes are required for chained groups (chain=True), finalizers, the provided completers and parsers, custom shell completer classes registered with register_completion_class() or the shellcompletion command. These were reimplemented or adapted internally and behave as before.

v3.9.0 (2026-09-02)

  • Support Click 8.5.x

v3.8.0 (2026-08-04)

v3.7.4 (2026-07-31)

  • Support Django 6.1

v3.7.3 (2026-05-23)

v3.7.2 (2026-04-26)

v3.7.1 (2026-03-31)

v3.7.0 (2026-03-19)

  • Results returned from groups are now included in the result sets passed to finalize().

v3.6.6 (2026-03-18)

  • Duraton parser now supports Y, M, and W.

v3.6.5 (2026-03-16)

v3.6.4 (2026-03-02)

  • Add typed classifier/badge.

v3.6.3 (2026-02-25)

  • Add badges to docs.

v3.6.2 (2026-02-16)

  • Support typer 0.24

v3.6.1 (2026-02-14)

v3.6.0 (2026-02-12)

  • Support typer 0.22.0.

    • typer-slim has been made an alias for typer. This means rich is installed automatically now.

    • If you want to disable rich:

      1. At runtime: you can set the environment variable TYPER_USE_RICH to 0 or false.

      2. In code (for all invocations): you can set the class variable rich_markup_mode to None on your command class or any parent group. This will disable rich for that command and all subcommands.

  • You may also run into an error like this:

    Traceback (most recent call last):
      File "/home/user/code/myproject/main.py", line 1, in <module>
        import typer
    ModuleNotFoundError: No module named 'typer'
    

    If this happens just reinstall your virtual environment.

v3.5.1 (2026-01-13)

v3.5.0 (2025-11-21)

v3.4.0 (2025-10-20)

v3.3.2 (2025-09-27)

  • Early support release for Django 6.0 (tested against 6.0a1)

v3.3.1 (2025-09-22)

v3.3.0 (2025-08-31)

v3.2.2 (2025-07-17)

v3.2.1 (2025-07-16)

v3.2.0 (2025-05-31)

v3.1.1 (2025-04-30)

v3.1.0 (2025-04-02)

v3.0.0 (2025-02-16)

Migrating from 2.x to 3.x

  • Imports from the django_typer namespace have been removed. You should now import from django_typer.management.

  • The name parameter has been removed from django_typer.management.initialize() and django_typer.management.Typer.callback(). This change was forced by upstream changes in Typer that will allow django_typer.management.Typer.add_typer() to define commands across multiple files.

  • Rich tracebacks will not include local variables by default. To replicate the old behavior you will need to add this to your settings:

    RICH_TRACEBACK_CONFIG={"show_locals": True}
    

    –show-locals and –hide-locals common parameters are added to toggle local variables on and off in the stack trace output.

Shell Completions

Some imports have changed in the django_typer namespace!

old

new

management.model_parser_completer

utils.model_parser_completer

parsers.ModelObjectParser

parsers.model.ModelObjectParser

parsers.parse_app_label

parsers.apps.app_config

completers.complete_app_label

completers.apps.app_labels

completers.commands

completers.cmd.commands

completers.databases

completers.db.databases

completers.ModelObjectCompleter

completers.model.ModelObjectCompleter

completers.complete_path

completers.path.paths

completers.complete_directory

completers.path.directories

completers.complete_import_path

completers.path.import_paths

  • If you are using shell tab completions you will need to reinstall the completion scripts. Using the shellcompletion install command. To be extra safe you may want to uninstall the old scripts before updating, using the v2.x shellcompletion remove command.

  • The interface to shellcompletion has changed. --shell is now an initialization option and remove was renamed to uninstall.:

    # old interface
    manage shellcompletion complete --shell zsh "command string"
    manage shellcompletion remove
    
    # new interface
    manage shellcompletion --shell zsh complete "command string"
    manage shellcompletion uninstall
    
  • The function signature for shellcompletion fallbacks has changed. The fallback signature is now:

    import typing as t
    from click.shell_complete import CompletionItem
    
    def fallback(args: t.List[str], incomplete: str) -> t.List[CompletionItem]:
        ...
    

v2.6.0 (2024-12-03)

v2.5.0 (2024-11-29)

v2.4.0 (2024-11-07)

v2.3.0 (2024-10-13)

v2.2.2 (2024-08-25)

v2.2.1 (2024-08-17)

v2.2.0 (2024-07-26)

v2.1.3 (2024-07-15)

v2.1.2 (2024-06-07)

v2.1.1 (2024-06-06)

v2.1.0 (2024-06-05)

Warning

Imports from django_typer have been deprecated and will be removed in 3.0! Imports have moved to django_typer.management:

# old way
from django_typer import TyperCommand, command, group, initialize, Typer

# new way!
from django_typer.management import TyperCommand, command, group, initialize, Typer

v2.0.2 (2024-06-03)

v2.0.1 (2024-05-31)

v2.0.0 (2024-05-31)

This major version release, includes an extensive internal refactor, numerous bug fixes and the addition of a plugin-based extension pattern.

v1.1.2 (2024-04-22)

v1.1.1 (2024-04-11)

v1.1.0 (2024-04-03)

v1.0.9 (yanked)

v1.0.8 (2024-03-26)

v1.0.7 (2024-03-17)

v1.0.6 (2024-03-14)

v1.0.5 (2024-03-14)

v1.0.4 (2024-03-13)

v1.0.3 (2024-03-08)

v1.0.2 (2024-03-05)

v1.0.1 (2024-02-29)

v1.0.0 (2024-02-26)

  • Initial production/stable release.

v0.6.1b (2024-02-24)

  • Incremental beta release - this is also the second release candidate for version 1.

  • Peg typer version to 0.9.x

v0.6.0b (2024-02-23)

  • Incremental beta release - this is also the first release candidate for version 1.

v0.5.0b (2024-01-31)

  • Incremental Beta Release

v0.4.0b (2024-01-08)

  • Incremental Beta Release

v0.3.0b (2024-01-06)

  • Incremental Beta Release

v0.2.0b (2024-01-04)

  • Incremental Beta Release

v0.1.0b (2023-12-05)

  • Initial Release (Beta)