Skip to main content

Scaffolding Commands

Fastman provides a comprehensive suite of commands to generate boilerplate code instantly.

Feature & API

make:feature

Creates a new Vertical Slice feature.

fastman make:feature {name} [--crud]
  • Arguments:
    • name: Name of the feature (e.g., pizza, auth).
  • Options:
    • --crud: Generates Router, Service, Model, and Schema with full CRUD operations.

make:api

Creates a lightweight API endpoint.

fastman make:api {name} [--style=rest|graphql]
  • Options:
    • --style: rest (default) or graphql.

make:websocket

Creates a WebSocket endpoint with a connection manager.

fastman make:websocket {name}

Components

make:model

Creates a SQLAlchemy model.

fastman make:model {name} [--table=tablename]

make:service

Creates a Service class for business logic.

fastman make:service {name}

make:controller

Creates a Controller class (for Layered architecture).

fastman make:controller {name}

make:repository

Creates a Repository class for data access.

fastman make:repository {name}

make:middleware

Creates a standard HTTP middleware.

fastman make:middleware {name}

make:dependency

Creates a FastAPI dependency function or class.

fastman make:dependency {name}

make:exception

Creates a custom exception class with standard HTTP error handling.

fastman make:exception {name}

Testing & Seeding

make:test

Creates a pytest file for a feature or unit.

fastman make:test {name}

make:seeder

Creates a database seeder class.

fastman make:seeder {name}

make:factory

Creates a model factory for generating test data.

fastman make:factory {name}

System

make:command

Creates a custom CLI command for your application.

fastman make:command {name}