Skip to main content

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โ€‹

CommandWhat it does
fastman newProduction-ready project with configuration, database, migrations, and tests
make:featureComplete 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:migrateAlembic migrations without touching INI files or configuration
install:auth --type=jwtFull JWT auth with /register, /login, /me endpoints and password hashing
serveDevelopment server with automatic hot reload
tinkerInteractive Python shell with your database session pre-loaded
route:listView 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 -m instead of bare tool calls)
  • Oracle projects use the modern oracledb driver instead of deprecated cx_Oracle
  • Extra .env variables 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 โ†’