Skip to main content

A modern CLI tool that replaces 'python manage.py' and 'django-admin' with simpler 'django' or 'dj' commands

Project description

Easy Django CLI

A modern CLI tool that simplifies Django development by replacing python manage.py and django-admin commands with simpler django or dj commands.

CI PyPI version Python Versions Django Versions License: MIT

Features

  • Simpler commands: Use django or dj instead of python manage.py
  • Smart project detection: Automatically finds your manage.py file
  • Drop-in replacement: Works with all Django management commands
  • Zero configuration: Just install and use
  • Fast: No overhead compared to traditional Django commands

Installation

Using uv (recommended)

uv pip install easy-django-cli

Using pip

pip install easy-django-cli

Usage

After installation, you can use django or dj commands instead of python manage.py:

Before (traditional Django)

python manage.py runserver
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py shell

After (with easy-django-cli)

django runserver
django makemigrations
django migrate
django createsuperuser
django shell

Or use the even shorter dj alias:

dj runserver
dj makemigrations
dj migrate
dj createsuperuser
dj shell

How It Works

easy-django-cli automatically:

  1. Searches for manage.py in the current directory and up to 5 parent directories
  2. If found, executes commands through your project's manage.py
  3. If not found, falls back to django-admin for project creation and other admin commands

This means you can run Django commands from any subdirectory of your project!

Examples

Start the development server

django runserver
# or
dj runserver 0.0.0.0:8000

Create and apply migrations

django makemigrations
django migrate

Create a new Django project

django startproject myproject

Create a new app

django startapp myapp

Run tests

django test

Open Django shell

django shell
# or use IPython/bpython if installed
django shell -i ipython

Collect static files

django collectstatic --noinput

Development

Setting up development environment

  1. Clone the repository:
git clone https://github.com/timonweb/easy-django-cli.git
cd easy-django-cli
  1. Install dependencies using uv:
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
  1. Install pre-commit hooks:
pre-commit install

Running tests

# Run all tests
pytest

# Run with coverage
pytest --cov=easy_django_cli --cov-report=html

# Run specific test file
pytest tests/test_cli.py

# Run with tox (multiple Python/Django versions)
tox

Code quality

# Run linting
ruff check easy_django_cli tests

# Run formatting
ruff format easy_django_cli tests

# Run type checking
mypy easy_django_cli

# Run all checks with tox
tox -e lint,type

Requirements

  • Python 3.10 or higher
  • Django 4.2 or higher

Compatibility

This package is tested with:

  • Python: 3.10, 3.11, 3.12, 3.13, 3.14
  • Django: 4.2, 5.0, 5.1, 5.2, 6.0

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Tim Kamanin - A Freelance Django and Wagtail Developer

Links

Changelog

0.1.0 (2025)

  • Initial release
  • Basic functionality: django and dj commands
  • Automatic manage.py detection
  • Full compatibility with Django management commands
  • Comprehensive test suite
  • CI/CD with GitHub Actions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_django_cli-0.1.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_django_cli-0.1.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file easy_django_cli-0.1.2.tar.gz.

File metadata

  • Download URL: easy_django_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for easy_django_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 aa294292a6535c9b858d45ab3ad3b4c18e690424700128557aa6bddec97d3b0b
MD5 65bd9b592bacda59484ce9f40ef4bc74
BLAKE2b-256 eb61136a42a44aa720131b91043afe5f3fa93c46212d44e1fe91b1f511687547

See more details on using hashes here.

Provenance

The following attestation bundles were made for easy_django_cli-0.1.2.tar.gz:

Publisher: ci.yml on timonweb/easy-django-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easy_django_cli-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_django_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb652f24dbdf2d649f2c1d49394818cabfedeb0e89f8e2e4ce1954c2e98235a
MD5 57e68b74213d539eba8923b624ccfd0a
BLAKE2b-256 514a9f9ae8f0e483c92830bfce22dd01de545f6ae8da7c2647e04132fc52ea40

See more details on using hashes here.

Provenance

The following attestation bundles were made for easy_django_cli-0.1.2-py3-none-any.whl:

Publisher: ci.yml on timonweb/easy-django-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page