Fastman
The elegant CLI for FastAPI artisans.
Fastman is a Laravel-inspired command-line tool that brings structure, speed, and best practices to FastAPI development. Instead of manually wiring up project scaffolding, database configurations, migrations, and authentication โ Fastman handles it all from the terminal so you can focus on building your application logic.
30 seconds to your first APIโ
# 1. Install
pip install fastman
# 2. Create a project with PostgreSQL
fastman new my-api --database=postgresql
# 3. Navigate into the project and scaffold a feature
cd my-api
fastman make:feature users --crud
# 4. Create a migration, apply it, and start the server
fastman make:migration "create users table"
fastman database:migrate
fastman serve
Open http://localhost:8000/docs โ you now have a fully documented REST API with CRUD endpoints, Swagger UI, database migrations, and a clean project structure.
Why Fastman?โ
FastAPI gives you incredible performance and flexibility โ but every new project means repeating the same setup: choosing an architecture, configuring a database connection, setting up Alembic for migrations, adding authentication, and writing boilerplate for every new feature.
Fastman eliminates that repetitive work. With a single command you get opinionated defaults that follow production-tested best practices, while every generated file remains fully customizable. There's no lock-in โ it's your code from the start.
What you getโ
| Command | What it does |
|---|---|
fastman new | Production-ready project with configuration, database, migrations, and tests |
make:feature | Complete vertical slice โ model, schema, service, and router โ in one command |
make:model, make:service, ... | 15+ generators for every component type (controllers, middleware, repos, etc.) |
database:migrate | Alembic migrations without touching INI files or configuration |
install:auth --type=jwt | Full JWT auth with /register, /login, /me endpoints and password hashing |
serve | Development server with automatic hot reload |
tinker | Interactive Python shell with your database session pre-loaded |
route:list | View all registered API routes in a formatted table |
Supported databasesโ
SQLite ยท PostgreSQL ยท MySQL ยท Oracle ยท Firebase
Supported package managersโ
uv ยท poetry ยท pipenv ยท pip โ auto-detected from your project
Architecture patternsโ
- Feature โ vertical slices, each feature is self-contained (recommended)
- API โ resource-grouped with built-in API versioning
- Layer โ traditional MVC-style separation of concerns
What's New in v0.2.6โ
- All commands now work correctly inside virtual environments (
python -minstead of bare tool calls) - Oracle projects use the modern
oracledbdriver instead of deprecatedcx_Oracle - Extra
.envvariables no longer crash the server on startup - Project creation now shows a real-time progress bar
- Rich and pyfiglet are now installed automatically as core dependencies
See the full changelog.
๐ Getting Started
New to Fastman? Start here โ install the CLI and create your first project in under 5 minutes.
Installation โ๐ฏ Commands Reference
Browse all 30+ commands with options, flags, and real-world examples.
View Commands โ