Skip to main content

Professional Django scaffolder with Cyberpunk TUI

Project description

PyPI Python AUR License

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 ajo scaffolding 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, and Monochromatic to 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
  • .env with auto-generated SECRET_KEY
  • .gitignore for Django best practices
  • pyproject.toml with uv dependency 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:

  1. Choose a project name
  2. Pick an architecture preset (Monolith, REST API, Ninja API, GraphQL API, Docker)
  3. Select a database (SQLite, PostgreSQL, MySQL)
  4. Optionally enable add-on modules (auth, cache, security, testing)
  5. Review the scaffold preview
  6. 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 TUI
  • theme: Reserved for future persistent theme preference

Override precedence:

  1. $NERD_FONTS environment variable
  2. Saved config.json value
  3. Auto-detection (terminal emulator heuristics)
  4. 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 โ€” web service + 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

ajo_cli-3.3.0.tar.gz (134.6 kB view details)

Uploaded Source

Built Distribution

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

ajo_cli-3.3.0-py3-none-any.whl (143.6 kB view details)

Uploaded Python 3

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

Hashes for ajo_cli-3.3.0.tar.gz
Algorithm Hash digest
SHA256 e670490f798d0e50d0056cf0d8f3baf639a2f1d870048d09fac94bd1b1d37f98
MD5 3c0191f20b5b4fa2ae1475feaa4f9484
BLAKE2b-256 bd96c92e971f58ba0856647a44878956ec472c521d8d58e18a1c554401834816

See more details on using hashes here.

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

Hashes for ajo_cli-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fea537f235b3e2ce266a4e67dbf181fd41ad77f839afbb7e5be58e2da6716d3
MD5 7df0c55e0b41b4a0a3007742d1264774
BLAKE2b-256 2911e159c368048fcce834480c3dd88b7ccb38720ce4150e201548b2a921861f

See more details on using hashes here.

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