Forge is a powerful command-line tool that helps you quickly bootstrap production-ready FastAPI projects with best practices, intelligent defaults, and a beautiful interactive interface.
✨ Features
- 🎨 Beautiful Interactive UI - Stunning terminal interface with gradient colors
- 🗄️ Multiple Databases - PostgreSQL, MySQL, SQLite with SQLModel/SQLAlchemy
- 🔐 Authentication Ready - Complete JWT auth with email verification & password reset
- 🔴 Redis & Celery - Background tasks, caching, and message queues
- 🐳 Docker Ready - Production-ready containerization with Docker Compose
- 🧪 Testing Setup - pytest with async support and coverage
- 📚 Auto Documentation - Swagger UI and ReDoc
- 🛠️ Dev Tools - Black, Ruff, and development utilities
- ⚡ Async First - Optimized for FastAPI's async capabilities
🚀 Quick Start
Installation
pip install ningfastforge
Create Your First Project
forge init forge-project
Follow the interactive prompts to configure your project with:
- Database choice (PostgreSQL/MySQL/SQLite)
- Authentication system (Complete/Basic JWT)
- Redis & Celery for background tasks
- CORS, testing, Docker setup
Run Your Project
cd forge-project
uv sync # or pip install -e .
uv run uvicorn app.main:app --reload
Visit http://127.0.0.1:8000/docs for your API documentation!
🎯 Configuration Options
Database Support
- PostgreSQL (Recommended) - Production-ready with full features
- MySQL - Popular choice with excellent performance
- SQLite - Perfect for development and small projects
Authentication & Security
- Complete JWT Auth - Email verification, password reset, refresh tokens
- Basic JWT Auth - Simple login/register system
- Security Features - CORS, rate limiting, input validation, password hashing
Background Tasks & Caching
- Redis - Caching, sessions, and message broker
- Celery - Background task processing with automatic database backups
- Scheduled Tasks - Cron-based scheduling for production
Development & Deployment
- Testing - pytest with async support and coverage reporting
- Code Quality - Black formatter and Ruff linter
- Docker - Complete containerization with docker-compose
- API Documentation - Auto-generated Swagger UI and ReDoc for your APIs
📁 Generated Project Structure
forge-project/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI application entry point
│ ├── core/ # Core configurations
│ │ ├── config/ # Settings management modules
│ │ ├── database/ # Database connection managers
│ │ ├── celery.py # Celery configuration (if enabled)
│ │ ├── redis.py # Redis client (if enabled)
│ │ ├── deps.py # Dependency injection
│ │ ├── logger.py # Logging configuration
│ │ └── security.py # Authentication & security
│ ├── models/ # Database models (SQLModel/SQLAlchemy)
│ ├── schemas/ # Pydantic schemas for API validation
│ ├── crud/ # Database CRUD operations
│ ├── routers/ # API route definitions
│ │ └── v1/ # API version 1 endpoints
│ ├── services/ # Business logic layer
│ ├── tasks/ # Celery background tasks (if enabled)
│ ├── utils/ # Utility functions
│ └── decorators/ # Custom decorators (rate limiting, etc.)
├── tests/ # Test suite
│ ├── conftest.py # Pytest configuration
│ ├── test_main.py # Main application tests
│ ├── api/ # API endpoint tests
│ └── unit/ # Unit tests
├── alembic/ # Database migrations (if enabled)
│ ├── versions/ # Migration files
│ ├── env.py # Alembic environment
│ └── alembic.ini # Alembic configuration
├── static/ # Static files
│ └── email_template/ # Email templates (if auth enabled)
├── script/ # Custom scripts
├── secret/ # Environment configuration
│ ├── .env.example # Environment template
│ ├── .env.development # Development settings
│ └── .env.production # Production settings
├── docker-compose.yml # Multi-service deployment
├── Dockerfile # Container configuration
├── .dockerignore # Docker ignore rules
├── .gitignore # Git ignore rules
├── pyproject.toml # Project dependencies and metadata
├── LICENSE # MIT license
└── README.md # Project documentation
🐳 Docker Deployment
For projects with Redis, Celery, or external databases:
# Production deployment with all services
docker-compose up --build
# Run in background
docker-compose up -d --build
This starts:
- FastAPI application (port 8000)
- Database (MySQL/PostgreSQL)
- Redis (if enabled)
- Celery worker & beat (if enabled)
- Automatic database migrations
🛠️ Commands
Create New Project
forge init <project-name> # Interactive mode
forge init forge-project --no-interactive # Use defaults
Check Version
forge --version
📚 Generated Project Features
Once your project is running, you'll have access to:
- API Documentation: http://127.0.0.1:8000/docs (Swagger UI)
- Alternative Docs: http://127.0.0.1:8000/redoc (ReDoc)
- Health Check: http://127.0.0.1:8000/health
🎯 Best Practices
Recommended Stack
forge init forge-project
# Choose: PostgreSQL + SQLModel + Complete JWT + Redis + Celery + Docker
Simple API
forge init simple-project
# Choose: SQLite + SQLModel + Basic JWT + No Redis + No Docker
📝 License
🙏 Acknowledgments
Built with ❤️ using:
- FastAPI - Modern, fast web framework
- SQLModel - SQL databases with type safety
- Pydantic - Data validation
- Rich - Beautiful terminal output
Need help? Check out the full documentation or open an issue on GitHub.
Metadata
Release files for ningfastforge 0.1.8.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ningfastforge-0.1.8.5.tar.gz | 115.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ningfastforge-0.1.8.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 240.5 kB
Release files / ningfastforge-0.1.8.5.tar.gz
| Download URL | ningfastforge-0.1.8.5.tar.gz |
|---|---|
| Size | 115.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e06b98498e422c565db5caef08c043d758d1cee18a259c2a9c086713a74ae445
|
|
BLAKE2b-256 checksum How to use checksums |
133255e689605f16f5072887b4c9904c1ff488b8ab4de5ba11bbb4080655e8be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 17, 2026.
Transparency logRelease files / ningfastforge-0.1.8.5-py3-none-any.whl
| Download URL | ningfastforge-0.1.8.5-py3-none-any.whl |
|---|---|
| Size | 124.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4b84c2148352cf4f27ff9f0909907825348ae77406b76967e3ccac8067a2161
|
|
BLAKE2b-256 checksum How to use checksums |
510305c2f053f2575480aaf1b6b10330eb0fac2f6593faa43c2a7c1e0f8182cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 17, 2026.
Transparency logSecurity for ningfastforge 0.1.8.5
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.
Attestation for ningfastforge-0.1.8.5.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 Jan 17, 2026.
Transparency logA 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.