A green-and-black CLI for generating clean Django, FastAPI, and Flask backend projects.
Project description
Cedric
Cedric is a command line tool for creating clean Python backend projects for Django, FastAPI, and Flask. It generates a professional project structure with database configuration, JWT authentication endpoints, OpenAPI documentation, Docker files, CI, tests, and agent-ready project metadata.
Cedric is designed for two workflows:
- Human developers who want a consistent project foundation without repetitive setup.
- AI coding agents that need explicit conventions, safe edit boundaries, and machine-readable project metadata.
Status
Cedric v2 is a full rewrite of the original Django-only scaffolder. The new CLI
uses cedric as the primary command and keeps cedric-setup only as a
deprecated compatibility entry point.
Features
- Generate Django, FastAPI, or Flask projects from one CLI.
- Choose SQLite, Turso/libSQL, local Postgres, Neon Postgres, or AWS RDS Postgres.
- Create a
uv-based Python project withpyproject.tomland a starter lockfile. - Include JWT auth scaffolding with register, login, refresh, logout, me, and password reset endpoints.
- Include OpenAPI documentation suited to each framework.
- Generate Docker, Docker Compose, GitHub Actions CI, tests, scripts, and docs.
- Write
.cedric/project.jsonso Cedric and AI agents can understand the project. - Provide lifecycle commands for refreshing DB, auth, Docker, and CI files.
Requirements
- Python 3.10 or newer.
pipx,pip, or another Python package installer.uvis recommended for working inside generated projects.
Installation
Install the published package:
pip install cedric
For isolated CLI usage:
pipx install cedric
For local development on Cedric itself:
git clone https://github.com/yesabhishek/cedric.git
cd cedric
uv sync --extra dev
uv run cedric --help
Quick Start
Create a FastAPI project with local SQLite:
cedric new my_api --framework fastapi --database sqlite --no-input
cd my_api
uv sync
cp .env.example .env
./scripts/dev.sh
Create a Django project backed by local Postgres:
cedric new my_service --framework django --database postgres-local --no-input
cd my_service
uv sync
cp .env.example .env
docker compose up
Create a Flask project configured for Neon:
cedric new my_gateway --framework flask --database neon --no-input
CLI Reference
Create a project:
cedric new <name> --framework <django|fastapi|flask> --database <preset>
Useful options:
--target-dir <path>writes the project into another directory.--forcereplaces an existing project directory.--no-inputdisables prompts for scripts and AI agents.
Manage a generated project:
cedric doctor .
cedric add db --database neon
cedric add auth
cedric add docker
cedric add ci
cedric templates list
Supported Templates
Frameworks:
djangofastapiflask
Database presets:
sqlite: local file-backed SQLite.turso: Turso/libSQL SQLite-compatible hosted database.postgres-local: local Postgres with Docker Compose support.neon: Neon hosted Postgres.aws-rds: AWS RDS Postgres.
Auth module:
jwt: email and password JWT authentication.
Generated Project Layout
Cedric projects include:
.
|-- .cedric/project.json
|-- .env.example
|-- AGENTS.md
|-- Dockerfile
|-- README.md
|-- app/
|-- config/
|-- docker-compose.yml
|-- docs/
|-- migrations/
|-- pyproject.toml
|-- scripts/
|-- tests/
`-- uv.lock
Framework-specific files are generated where appropriate. Django projects also
include manage.py and an authentication/ app.
Authentication API
The default auth module documents and scaffolds these endpoints:
| Method | Path | Purpose |
|---|---|---|
POST |
/auth/register |
Create an account |
POST |
/auth/login |
Return access and refresh tokens |
POST |
/auth/refresh |
Refresh tokens |
POST |
/auth/logout |
Logout hook |
GET |
/auth/me |
Return the current user |
POST |
/auth/password-reset |
Password reset integration stub |
The generated auth code is a solid starting point, not a complete identity platform. Replace in-memory examples with durable user storage before production.
OpenAPI Support
- FastAPI projects use native OpenAPI at
/openapi.json. - Django projects use Django REST Framework with drf-spectacular at
/api/schema/. - Flask projects use flask-smorest at
/openapi.json.
Each project also includes docs/openapi.yaml as a concise contract reference
for the generated auth surface.
Working With AI Agents
Every generated project includes:
AGENTS.mdwith commands, architecture notes, and edit boundaries..cedric/project.jsonwith framework, database, auth, template version, and enabled module metadata.- Docs that describe auth, database configuration, and OpenAPI expectations.
Use cedric doctor . before and after large automated edits to confirm that the
project still matches Cedric expectations.
Development
Run checks for Cedric itself:
uv sync --extra dev
uv run pytest
uv run ruff check .
uv build
The test suite covers project spec validation, CLI commands, generated file
trees, database switching, and doctor failure modes.
Releases
Releases are published through GitHub Releases and then to production PyPI after
approval in the protected pypi GitHub environment. See RELEASE.md for the
full branch, pull request, sanity check, tag, and release workflow.
Compatibility
The old cedric-setup command is deprecated. Use:
cedric new <name>
The v1 Django-only src package has been replaced by the v2 cedric package.
License
Cedric is distributed under the GPL-3.0-only license. See LICENSE for details.
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 cedric-2.0.1.tar.gz.
File metadata
- Download URL: cedric-2.0.1.tar.gz
- Upload date:
- Size: 66.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75414b73a0bfaddd94491f497dbd941aa4f8c8324a2890149ea1aced3f352549
|
|
| MD5 |
171aa63f13fe9189f1d69e4175d632d6
|
|
| BLAKE2b-256 |
e1836b2e110818cf47040f91ed81379e7a95557cd61415575d41e63f57ea6004
|
File details
Details for the file cedric-2.0.1-py3-none-any.whl.
File metadata
- Download URL: cedric-2.0.1-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74b3425c305db2782774e10a0957c08140dbd6a4c66b79e64db6b39b0f9393f3
|
|
| MD5 |
288022f7ed646a04b7db1b9228cb78b9
|
|
| BLAKE2b-256 |
7af55e885ccb297830a3cdf3dab143260ce7f3456a077edaee3c8bdd45abda65
|