skillfed

django-click

Build Django management commands using the click CLI package.

django-click v2.5.0 114.0K downloads/30d#12,316 on PyPI298
Permissive license MIT Active released

What it is and what it does

django-click is a thin adapter layer that lets you write Django management commands using click's decorator-based syntax instead of Django's traditional class-based command structure. It handles the integration so your command functions work seamlessly within Django's management system.

The package is useful when you prefer click's simpler, more functional approach to CLI building. Instead of subclassing Django's Command class and defining arguments and options through class attributes, you decorate a function with @click.command() and @click.argument() or @click.option(). It supports Django 4.2, 5.2, and 6.0 across Python 3.10 through 3.14.

Use it for:

  • Build Django admin scripts with click's cleaner decorator syntax instead of Django's class-based command pattern.
  • Add colored output and formatted help text to management commands using click's built-in utilities.
  • Create complex multi-level command hierarchies with click's group and subcommand decorators.
  • Write management commands that share code with standalone click applications.
  • Simplify migration of existing click CLI tools into Django projects.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Wraps the click command-line library to let you write Django management commands using click's decorator syntax instead of Django's class-based approach.

Yes. Low install friction, active maintenance, permissive MIT license, no known vulnerabilities, and a straightforward single dependency on click make this a safe choice. Install it if you prefer click's functional decorator style for Django management commands; skip it if you're comfortable with Django's class-based command API.

Install

django-click on PyPI

pip

pip install django-click

uv

uv add django-click

poetry

poetry add django-click

Installing django-click

Before you install

Low install friction with a single runtime dependency on click. Active maintenance with a recent release in January 2026 and last commit in August 2026; part of Django Commons and maintained by established contributors.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.

Quickstart

pip install django-click

# In /management/commands/helloworld.py:
import click

@click.command()
@click.argument('name')
def command(name):
    click.secho(f'Hello, {name}', fg='red')

# Then run: ./manage.py helloworld django-click

Requires Python 3.10+; Django 5.2 and above require Python 3.10+, Django 6.0 requires Python 3.12+.

Verify before relying

  • Whether the package provides an alias import (djclick) or uses click directly in management commands.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — click
Maintenance actively maintained — 216 days since the last release
Last repo commit
First released
Downloads 114,026/month — #12,316 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_click-2.5.0-py3-none-any.whl

Development Status :: 4 - BetaFramework :: Django :: 4.2Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

django management commands clickclick-based django commandsdjango cli decorator syntaxdjango command line toolsclick for django management
django-integrationcli-framework

More Application Frameworks packages