Skip to main content

django-tui

Inspect and run Django Commands in a text-based user interface (TUI), built with Textual.

PyPI - Version PyPI - Python Version

A demo of django-tui: filtering commands, filling in a command's options and running it, then querying models in the shell

Commands

Type a command and its arguments, like in your shell, or fill in the form. Your project's commands are listed first.

The command screen with the closepoll command and its options

Shell

Run ORM queries with your models and common Django helpers already imported.

The shell with a query and its result

Try it without installing

Run django-tui with uv in your project's directory, or any directory inside it:

uvx django-tui

It 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.

Installation

pip install django-tui

Add "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 tui

Type 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.

Key Action
enter Run the command
↑ ↓ Pick a command from the list
→ Accept the suggested command name
tab Complete the command name and edit its options
ctrl+r Run the command (while editing options)
ctrl+y Copy the command to the clipboard
esc Back to the command line, or clear it
ctrl+j Switch between commands and the shell
ctrl+c Copy the selected text, or press twice to quit

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.

Contributing

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.

License

django-tui is distributed under the terms of the MIT license.

Looking for Django Admin in your termain?

Checkout @valberg's django-admin-tui project!

Metadata

Release files for django-tui 26.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-tui 26.2
File Size Uploaded Provenance
django_tui-26.2.tar.gz 23.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-tui 26.2
File Interpreter ABI Platform
django_tui-26.2-py3-none-any.whl Python 3 none any Details

Total release size: 51.4 kB

Release files / django_tui-26.2.tar.gz

Download URL django_tui-26.2.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ad4f0887be003ddb1daf7c2fbe9df6476c3dad3cbc6eff4259b685233b9d43fc
BLAKE2b-256 checksum
How to use checksums
d8806ff2b5c5430a336cc164d9066a735b8074bc572441ba8a21ec2836063e17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / django_tui-26.2-py3-none-any.whl

Download URL django_tui-26.2-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1179a3ee19cc66614d2709b0d7ca1af7292ae64aac5597b3e058a097072098ad
BLAKE2b-256 checksum
How to use checksums
308988e508122e2e32491cb9238aaa9b93b1476725a07225518d4aeed7f8a334
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for django-tui 26.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_tui-26.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page