Inspect and run Django Commands in a text-based user interface (TUI), built with Textual.
Type a command and its arguments, like in your shell, or fill in the form. Your project's commands are listed first.
Run ORM queries with your models and common Django helpers already imported.
Run django-tui with uv in your project's directory, or any directory inside it:
uvx django-tuiIt finds your project's manage.py, loads the .env files in the project's directory and its parents (variables that are already set win), and uses the project's virtual environment: the active one, or a .venv, venv or env directory in the project or its parents. Arguments work like they do for python manage.py tui, e.g. uvx django-tui --shell or uvx django-tui --settings=mysite.settings.local.
If your virtual environment is somewhere else, like with Poetry, activate it first, e.g. poetry run uvx django-tui.
pip install django-tuiAdd "django_tui" to your INSTALLED_APPS setting in settings.py like this:
INSTALLED_APPS = [
...,
"django_tui",
]Now you can run the TUI with:
python manage.py tuiType a command at the $ python manage.py prompt at the top, just like in your shell, e.g. migrate myapp --plan. The command name filters the list of commands and the arguments fill in the form below it. Changing the form updates the command too.
Press enter to run the command. It runs inside the TUI's process, so Django doesn't have to start up again for each one. When the command finishes, press enter to go back to the TUI.
Open the interactive shell directly with python manage.py tui --shell. Press ctrl+r to run your code; the value of the last expression is shown in the output.
You need uv and just. just lists the tasks: just check lints and runs the tests, just test-all runs them on every supported Python and Django, and just tui opens the TUI in the test project. just screenshots and just demo save the images above for the next version, in docs/images/<version>/, and point this README at them. Keep the old images: PyPI shows each release's README with that release's images. Releases are described in RELEASING.md.
django-tui is distributed under the terms of the MIT license.
Checkout @valberg's django-admin-tui project!



