# djinit
A fast, interactive CLI to bootstrap a modern, production‑ready Django project in minutes — featuring split settings, DRF and JWT integration, OpenAPI docs, CORS, static file handling via WhiteNoise, Postgres‑friendly configuration, CI/CD templates, deployment helpers, and battle‑tested defaults that deliver a polished developer experience out of the box. ## Features - ✨ **Split settings**: `settings/base.py`, `settings/development.py`, `settings/production.py` - 🏗️ **Three structure types**: Standard Django layout, Predefined structure, or Unified structure - 🧱 **Flexible app layout**: Flat or nested apps package (e.g., `apps/`) - 🧩 **Complete app scaffolding**: URLs, serializers, routes, views, models, admin, tests - 🔗 **Auto-wired URLs**: Project URLs automatically include your apps - 🧰 **Essential utility files**: `.gitignore`, `README.md`, `.env.sample`, `requirements.txt`, `pyproject.toml` - 🚀 **Deployment helpers**: `Justfile`, `Procfile`, `runtime.txt` - 🛠️ **CI/CD templates**: GitHub Actions and/or GitLab CI workflows - 🔐 **Secret key generator**: Generate secure Django secret keys - 🎨 **Polished UX**: Beautiful interactive interface with `rich` library - 📦 **App management**: Add apps to existing projects with automatic settings configuration ## Installation Using pipx (recommended): ```bash pipx install djinitx ``` Using pip: ```bash pip install djinitx ``` Using uv: ```bash uv tool install djinitx ``` From source: ```bash git clone https://github.com/S4NKALP/djinit cd djinit pip install -e . ``` **Requirements**: Python 3.13+ ## Quick Start Run the interactive setup: ```bash djinit setup # or dj setup ``` The interactive setup will guide you through: 1. **Structure Type Selection**: - Standard structure (default Django layout) - Predefined structure (`apps/users`, `apps/core`, `api/` layout) - Unified structure (`core/`, `apps/core`, `apps/api` layout) 2. **Project Configuration**: - Project directory (or use current directory with `.`) - Django project name (used for the config module) - Apps layout (flat vs nested package like `apps/`) - App names (comma‑separated) 3. **CI/CD Configuration**: - GitHub Actions only - GitLab CI only - Both (GitHub Actions + GitLab CI) - None (skip CI/CD) 4. **Database Configuration**: - Use `DATABASE_URL` (recommended for production) - Use individual database parameters ## Commands ### Setup Command Launch the interactive project generator: ```bash djinit setup # or dj setup ``` ### App Command Create one or more Django apps in an existing project: ```bash djinit app