Professional Django scaffolder with Cyberpunk TUI
Project description
AJO
Professional Django Scaffolder with Cyberpunk TUI
๐ Explore the Interactive Showcase & Web Simulator
ajo is an interactive CLI tool that generates production-ready Django projects with a beautiful cyberpunk-themed terminal UI. Pick your architecture, database, and add-on modules โ ajo handles the rest.
ajo ย ยทย
ajo --headless --name myproject -p rest-api -d postgresql ย ยทย
ajo --theme dracula
Features
| Feature | ||
|---|---|---|
| ๐๏ธ | Multi-Database Support โ PostgreSQL, MySQL, SQLite | ๐ |
| GitHub Integration โ Auto repo creation & push | ๐ | |
| CI/CD with Ruff โ GitHub Actions pipeline | ๐ | |
| .env Security โ Auto-generated secrets | ๐ฆ | |
| Multiple Apps โ Scaffold any number of apps | ๐งช | |
| Testing โ pytest with coverage & factory-boy | ๐ณ | |
| Docker Support โ Dockerfile + Compose + Redis + Mailhog | ๐จ | |
| Bootstrap 5 Themes โ Pre-built UI themes | ๐ ๏ธ | |
| Django Shell Plus โ Enhanced shell | ๐ | |
| Debug Toolbar โ Dev debugging tools | ๐ |
๐ Interactive Showcase & Web Simulator
Experience AJO directly in your browser! We have built a dedicated single-page showcase website featuring:
- Interactive Terminal Simulator: Watch a live, animated simulation of the
ajoscaffolding workflow. - Live Diagnostics Simulator: Run a simulated scan of a Django project and watch the self-healing Diagnostic Engine fix issues with one click.
- Theme Switcher: Cycle the site's accent colors between
Cyberpunk Cyan,Dracula Purple, andMonochromaticto preview AJO's visual themes. - Tabbed Installation Guide: Easily copy installation commands for
pipx,uv,AUR, or source.
๐ Visit the Interactive Showcase Website
Architecture Presets
Choose the foundation that fits your stack:
| Preset | Key | Stack |
|---|---|---|
| Standard Monolith | monolith |
Django + Bootstrap 5 + HTMX |
| REST API Ready | rest-api |
DRF + JWT + CORS + Swagger/OpenAPI |
| Ninja API | ninja-api |
django-ninja + Pydantic + Swagger UI |
| GraphQL API | graphql-api |
Graphene + Relay + GraphiQL IDE |
| Docker | docker |
Multi-stage Dockerfile + Compose (PostgreSQL, Redis, Mailhog) |
Each preset generates a complete Django project with:
manage.py, settings, URLs, WSGI/ASGI.envwith auto-generatedSECRET_KEY.gitignorefor Django best practicespyproject.tomlwithuvdependency management
The REST API, Ninja API, and GraphQL API presets are model-aware โ they auto-generate serializers, viewsets, routers, and API endpoints by scanning your Django models via AST analysis.
Add-on Modules
Layer optional features on top of any preset:
| Add-on | Key | What it adds |
|---|---|---|
| Auth & Users | auth |
JWT auth (SimpleJWT), custom User model with bio/avatar, registration, login/signup templates, preset-aware REST or Ninja endpoints |
| Caching & Performance | cache |
Redis caching (django-redis), DB connection pooling (django-db-connection-pool), django-debug-toolbar, demo cached view |
| Security Hardening | security |
Brute-force protection (django-axes), TOTP 2FA (django-otp), CSP headers (django-csp), HSTS/XSS/CSRF hardening |
| Testing Infrastructure | testing |
pytest + pytest-django, coverage (fail-under 80%), factory-boy, per-app test directories, auto-generated model factories and API tests |
Select add-ons interactively with <space> during the scaffold flow, or pass them via --addons:
ajo --addons auth cache testing
Themes
AJO ships with three visual themes. Pass --theme to switch:
ajo --theme cyberpunk # Neon cyan (default)
ajo --theme dracula # Dracula purple/pink
ajo --theme monochromatic # Clean greyscale/blue
ajo --theme mono # Alias for monochromatic
Themes are applied to both the Rich terminal output and all InquirerPy interactive prompts. Terminal colour depth (TrueColor, 256, 16) is auto-detected.
Installation
pip / pipx (any OS)
# Recommended โ isolated environment
pipx install ajo-cli
# With uv (also isolated)
uv tool install ajo-cli
# With pip (global)
pip install ajo-cli
AUR (Arch Linux)
yay -S ajo-cli
paru -S ajo-cli
From source
git clone https://github.com/zaidejjo/ajo-cli.git
cd ajo-cli
uv sync
ajo --version
Quickstart
Create a new Django project (interactive)
ajo
Follow the prompts:
- Choose a project name
- Pick an architecture preset (Monolith, REST API, Ninja API, GraphQL API, Docker)
- Select a database (SQLite, PostgreSQL, MySQL)
- Optionally enable add-on modules (auth, cache, security, testing)
- Review the scaffold preview
- Confirm โ ajo creates the project, installs dependencies via
uv, initialises git, and optionally creates a GitHub repo
One-shot (headless)
ajo --headless --name myproject \
--preset rest-api \
--database postgresql \
--addons auth cache testing \
--no-github
Flags:
| Flag | Default | Description |
|---|---|---|
-n, --name |
โ | Project name |
-p, --preset |
monolith |
Architecture preset |
-d, --database |
sqlite |
Database type |
-y, --yes |
โ | Accept all defaults (implies --headless) |
--addons |
โ | Add-on modules (space-separated) |
--no-github |
โ | Skip GitHub repo creation |
--no-cicd |
โ | Skip CI/CD pipeline setup |
--output-dir |
. |
Parent directory for the project |
--theme |
cyberpunk |
Visual theme |
--headless |
โ | Non-interactive mode |
Smart CLI โ manage existing Django projects
Run ajo inside an existing Django project directory:
cd myproject
ajo
AJO detects your Django project and presents a context-aware menu of commands:
| Command | When it appears |
|---|---|
| Run Server | Always |
| Create Superuser | When no superuser exists (highlighted as urgent) |
| Run Tests | Always |
| Create App | Always |
| Django Shell | Always |
| Make Migrations | When model changes detected (highlighted as urgent) |
| Apply Migrations | When unapplied migrations exist (highlighted as urgent) |
| Fix Ruff Issues | When Ruff reports problems (highlighted as urgent) |
| Clear Cache | Always |
| Run Diagnostics | Always โ scans for misconfigurations with auto-fix |
The smart menu also shows a live dashboard with project metadata, branch, virtualenv status, server status, migration state, and Ruff lint status โ all updating in real time.
Persistent Configuration
On the first interactive run, AJO asks:
? Do you use a Nerd Font in your terminal? (y/N)
Your answer is saved to ~/.config/ajo/config.json:
{
"version": 1,
"nerd_fonts": true,
"theme": null,
"updated_at": "2026-06-17T12:00:00+00:00"
}
nerd_fonts: Controls whether Nerd Font icons or text fallbacks are used across the entire TUItheme: Reserved for future persistent theme preference
Override precedence:
$NERD_FONTSenvironment variable- Saved
config.jsonvalue - Auto-detection (terminal emulator heuristics)
- Default: text fallbacks
Docker
The Docker preset generates a production-ready container setup:
ajo --preset docker
Creates:
- Dockerfile โ Multi-stage build with uv caching,
python manage.py collectstatic - docker-compose.yml โ
webservice + PostgreSQL/MySQL + Redis + Mailhog - .dockerignore โ venv, cache, git
Optionally integrates with Celery worker.
Diagnostics
AJO includes a self-healing diagnostic engine that scans your Django project for common issues and offers one-click auto-fixes:
| Check | Auto-fix |
|---|---|
Missing contrib apps in INSTALLED_APPS |
Adds them |
Missing ALLOWED_HOSTS |
Appends ["*"] |
Hardcoded DEBUG=True in production |
Prompts to fix |
Missing or placeholder SECRET_KEY |
Generates a secure 50-char key |
| Missing admin URL in root URLconf | Wires admin/ path |
| Duplicate migration prefixes | Renames with next available number |
Run diagnostics from the smart CLI menu or directly.
Development
Setup
git clone https://github.com/zaidejjo/ajo-cli.git
cd ajo-cli
uv sync
Run tests
# All tests
uv run pytest
# With coverage
uv run pytest --cov=ajo
# Specific file
uv run pytest tests/test_config.py -v
Project structure
ajo/
โโโ cli.py # CLI parser, TUI, features, scaffold flow
โโโ core/
โ โโโ config.py # Persistent config manager (~/.config/ajo/)
โ โโโ constants.py # NF icons (Nerd Font + fallbacks), Theme, ThemeVariant
โ โโโ app.py # async_entry decorator
โ โโโ exceptions.py # AjoError hierarchy (5 subclasses)
โโโ ui/
โ โโโ theme.py # ThemeEngine (3 themes, colour-depth adapt), FileTreePreview
โ โโโ capabilities.py # Terminal detection (Nerd Fonts, TrueColor, Sixel, etc.)
โ โโโ fuzzy.py # Interactive fuzzy finder
โ โโโ keyboard.py # Keyboard event handling
โ โโโ progress.py # Async progress manager
โโโ presets/
โ โโโ monolith.py # Standard Monolith preset
โ โโโ rest_api.py # REST API Ready preset
โ โโโ ninja_api.py # Ninja API preset
โ โโโ graphql_api.py # GraphQL API preset
โ โโโ docker.py # Docker preset
โ โโโ addons/ # Auth, Cache, Security, Testing add-ons
โโโ scaffolding/
โ โโโ engine.py # Transactional scaffold engine with rollback
โโโ templates/
โ โโโ django_app.py # Django project file generator
โโโ detector/
โ โโโ project.py # DjangoProjectDetector (fast + slow async scans)
โ โโโ smart_cli.py # SmartDjangoCLI (context-aware commands)
โ โโโ cache.py # Filesystem cache with TTL
โ โโโ ast_analyzer.py # AST-based model/relationship scanner
โโโ gateway/ # Async subprocess wrappers (uv, git, gh)
โโโ validators.py # Project/app name validators + DiagnosticEngine
Requirements
- Python 3.10+
- uv โ the Astral Python package manager (install:
curl -LsSf https://astral.sh/uv/install.sh | sh) - git โ optional, for version control
- GitHub CLI (
gh) โ optional, for GitHub repo creation
License
MIT โ see LICENSE.
Built with
๐ Python 3.10+ ย
๐ฆ Django 5.0+ ย
โก uv ย
๐ฆ Ruff
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ajo_cli-3.3.0.tar.gz.
File metadata
- Download URL: ajo_cli-3.3.0.tar.gz
- Upload date:
- Size: 134.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e670490f798d0e50d0056cf0d8f3baf639a2f1d870048d09fac94bd1b1d37f98
|
|
| MD5 |
3c0191f20b5b4fa2ae1475feaa4f9484
|
|
| BLAKE2b-256 |
bd96c92e971f58ba0856647a44878956ec472c521d8d58e18a1c554401834816
|
File details
Details for the file ajo_cli-3.3.0-py3-none-any.whl.
File metadata
- Download URL: ajo_cli-3.3.0-py3-none-any.whl
- Upload date:
- Size: 143.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fea537f235b3e2ce266a4e67dbf181fd41ad77f839afbb7e5be58e2da6716d3
|
|
| MD5 |
7df0c55e0b41b4a0a3007742d1264774
|
|
| BLAKE2b-256 |
2911e159c368048fcce834480c3dd88b7ccb38720ce4150e201548b2a921861f
|