Skip to content

nats-fasterapi helps you skip repetitive setup and move straight to business logic.

License

Notifications You must be signed in to change notification settings

nathanieluriri/faster-api

Repository files navigation

FasterAPI banner

FasterAPI

Scaffold FastAPI APIs faster with a focused CLI for backend teams.

PyPI Version Python Versions License Monthly Downloads Last Commit

Quick Start · Demo · Command Reference · Contributing

Why FasterAPI

nats-fasterapi helps you skip repetitive setup and move straight to business logic.

  • Generate Pydantic schemas with one command
  • Generate CRUD repositories and service layers
  • Generate versioned FastAPI routes quickly
  • Generate token repository and auth dependency utilities
  • Auto-mount routes into main.py
  • Works in interactive and automation-friendly flows

Demo

FasterAPI CLI demo

CLI Preview Screens

Generating schema CRUD service and route

FasterAPI help output screenshot

Installation

pip install nats-fasterapi

Upgrade:

fasterapi update

Quick Start

# 1) Create a schema
fasterapi make-schema user

# 2) Generate repository and service
fasterapi make-crud user
fasterapi make-service user

# 3) Generate a versioned route
fasterapi make-route user --version-mode highest-number

# 4) Mount routes into main.py
fasterapi mount

Run the app in development mode:

fasterapi run-d

Command Reference

Command Purpose
new <name> Create a new project in a new folder
new-here Scaffold a new project in the current folder
make-schema <name> Generate a Pydantic schema
make-crud <name> Generate CRUD repository functions
make-service <name> Generate service layer template
make-route <name> [--version-mode ...] Generate route files with API versioning
make-account <name> Clone the user account scaffold into a new role module
make-token-repo [roles...] Generate token repository for roles
split-user [--force] Interactively split user into custom non-admin roles
unsplit-user [--force] Collapse split custom roles back into canonical user
make-token-deps Generate token dependency utilities
mount Mount routes into main.py
email add-template Interactively add a built-in email template example
email mount Mount templates from email_templates/ into the email singleton
email mount-custom Move templates from custom_templates/ and mount them
run-d Run dev server (uvicorn main:app --reload)
update Upgrade FasterAPI CLI

new vs new-here

  • fasterapi new <name> creates a new directory (./<name>) and scaffolds the project inside it.
  • fasterapi new-here scaffolds directly into your current directory (./) without creating a new folder.
  • new-here is safety-checked and will stop if template paths already exist in the current directory.

Route Versioning Modes

  • highest-number
  • latest-modified

Token Repo Defaults

If no roles are provided to make-token-repo, defaults are:

admin, user

Email Templates

fasterapi email add-template first asks what kind of template you need, then shows available examples.

Built-in examples (10):

  • changing-password
  • invitation
  • new-signin
  • otp
  • revoking
  • welcome
  • password-reset
  • email-verification
  • receipt
  • account-deactivated

Then mount templates with:

fasterapi email mount

For custom files placed in custom_templates/:

fasterapi email mount-custom

If mounting fails, check email_mount_errors.log in the project root.

Typical Workflow

fasterapi make-schema product
fasterapi make-crud product
fasterapi make-service product
fasterapi make-route product --version-mode latest-modified
fasterapi mount
fasterapi run-d

Roadmap

  • Improve new and new-here bootstrap customization
  • SQLAlchemy repository generators (PostgreSQL/MySQL)
  • Config-driven scaffolding via fasterapi.yaml
  • CI/CD template generation
  • Better Docker/Docker Compose scaffolding
  • Shell autocompletion support

Contributing

git clone https://github.com/nathanieluriri/faster-api.git
cd faster-api
pip install -e .
pytest

Issues and pull requests are welcome.

License

Licensed under the MIT License.

© 2026 Nathaniel Uriri

About

nats-fasterapi helps you skip repetitive setup and move straight to business logic.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages