A highly modular FastAPI project scaffolding CLI tool for the AI application era
Project description
ForgeAPI ๐
A highly modular FastAPI project scaffolding CLI tool for the AI application era.
โจ Features
- ๐๏ธ Clean Architecture - Auto-generate API/Service/DAO layered structure
- ๐ฆ Package Manager Choice - Support uv (default), Poetry, or pip
- ๐๏ธ Database Integration - SQLAlchemy (Async) + Alembic migrations
- ๐ณ Docker Ready - Optimized Dockerfile and docker-compose.yml
- ๐ JWT Authentication - Out-of-the-box auth module
- โ๏ธ Multi-Environment Config - dev/staging/prod configurations
- ๐งช Testing Setup - Pytest + pytest-asyncio pre-configured
- ๐ค AI-Powered (Coming Soon) - Generate models from natural language
๐ฆ Installation
# Using pipx (recommended)
pipx install forgeapi
# Using uv
uv tool install forgeapi
# Using pip
pip install forgeapi
๐ Quick Start
Interactive Mode
forge create my-awesome-api
Follow the interactive prompts to configure your project:
๐ ForgeAPI - Create New Project
? Project name: my-awesome-api
? Description: A awesome FastAPI project
? Author name: Your Name
? Author email: your@email.com
? Python version: 3.11
๐ฆ Package Manager
? Select package manager: uv (recommended)
๐๏ธ Database
? Select database: PostgreSQL
? Enable Alembic migrations? Yes
๐ Authentication
? Include JWT auth module? Yes
๐ณ Docker
? Generate Docker configuration? Yes
? Generate docker-compose.yml? Yes
โ
Project my-awesome-api created successfully!
Non-Interactive Mode
forge create my-api \
--package-manager uv \
--database postgres \
--auth jwt \
--docker \
--no-interactive
๐ Generated Project Structure
my-awesome-api/
โโโ app/
โ โโโ api/ # API routes
โ โโโ config/ # Configuration
โ โโโ core/ # Core utilities
โ โโโ daos/ # Data Access Objects
โ โโโ exceptions/ # Exception handlers
โ โโโ models/ # SQLAlchemy models
โ โโโ schemas/ # Pydantic schemas
โ โโโ services/ # Business logic
โ โโโ utils/ # Utilities
โโโ alembic/ # Database migrations
โโโ tests/ # Test suite
โโโ Dockerfile
โโโ docker-compose.yml
โโโ pyproject.toml
โโโ README.md
๐ ๏ธ Commands
| Command | Description |
|---|---|
forge create <name> |
Create a new FastAPI project |
forge version |
Show version information |
forge --help |
Show help message |
๐ค AI Features (Coming Soon)
# Generate SQLAlchemy model from description
forge add model "User with name, email, and subscription relationship"
# Generate CRUD API for a model
forge add api User --crud
๐ Documentation
๐ค Contributing
Contributions are welcome! Please read our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- FastAPI - The awesome web framework
- Typer - CLI framework
- SQLAlchemy - Database toolkit
Project details
Release history Release notifications | RSS feed
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 forgeapi-0.1.1.tar.gz.
File metadata
- Download URL: forgeapi-0.1.1.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b42101ab1243f8867f1a63ceff038a296e1bfa7dde60dcb46a03a260823517a9
|
|
| MD5 |
7f329bf9fa16f728bc826d388ddf59de
|
|
| BLAKE2b-256 |
64d88dbdcec16a629db5ba19ec4febe285c985887b2189aebee780e5a029bd52
|
File details
Details for the file forgeapi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: forgeapi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e985b9f3e253660bed6ffa1c6ebf76382972c16c1c13f6f5e2af36fe93516ac6
|
|
| MD5 |
4f22a99575faf902224b44f292d06c4b
|
|
| BLAKE2b-256 |
3bb0901f1c297336e12e0d694ae1b511693f5abf9a78073ab5197432c8003157
|