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.8 or higher
  • Django 3.2 or higher

Compatibility

This package is tested with:

  • Python: 3.8, 3.9, 3.10, 3.11, 3.12
  • Django: 3.2, 4.0, 4.1, 4.2, 5.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 - tim@timonweb.com

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.0.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.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: easy_django_cli-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 9ddcf6991aef71e7f9baaab7763d49648bfb1fb170533193524702778af67dad
MD5 abd95a98825459483f68174bbfa77b15
BLAKE2b-256 8848d5642c83fba747b4970d529d3c547fc3c83d5bd49abdeb2585ea25bac79a

See more details on using hashes here.

Provenance

The following attestation bundles were made for easy_django_cli-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_django_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f63c0ab3dcc863c94d583633a6fbc7c78bd688416b625e98079974dfd3a19721
MD5 35b2cd3bbf5460f71edefc327c568c01
BLAKE2b-256 7e97ac094494c6fc4ca4b9fa675db27678c004f1241a7c23aa3f6be33c59c74a

See more details on using hashes here.

Provenance

The following attestation bundles were made for easy_django_cli-0.1.0-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