FastAPI project generator CLI by BackendDeveloperHub.
pip install bdh-fastapi-newpipx isolates CLI tools in their own virtual environments β cleaner than global pip install.
Arch Linux / Manjaro:
sudo pacman -S python-pipx
pipx install bdh-fastapi-new
pipx ensurepathAfter
pipx ensurepath, open a new terminal and verify:bdh-fastapi-new --version
Ubuntu / Debian:
sudo apt install pipx
pipx install bdh-fastapi-new
pipx ensurepathbdh-fastapi-new my-projectbdh-fastapi-new my-project --template api-adminbdh-fastapi-new my-project --ai --ai-description "task manager API"--template minimal|api|api-admin: select scaffold preset--output-dir PATH: destination folder--ai: enable AI main.py generation with safe fallback--ai-description TEXT: non-interactive AI prompt--no-network: disable network calls (AI off)--no-color: disable ANSI colors--plain: plain text output--yes: non-interactive mode--template-version VERSION: stamp generated README with template version--version: show CLI version
app.mainimport-safe entrypoint (uvicorn app.main:app --reload)- Layered structure (
routers,models,schemas,crud) .envand SQLAlchemy session boilerplate- Optional SQLAdmin integration
- Local quality baseline (
pyproject.tomlwith Ruff and pytest config)
cd my-project
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reloadcd my-project
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadOpen http://127.0.0.1:8000/docs.
pip install -e .[dev]
ruff check .
mypy fastapi_new
pytest
bandit -q -r fastapi_new- AI code is validated with syntax and unsafe-pattern checks.
- AI responses automatically fall back to the safe built-in template when validation fails.
- Use
--no-networkwhen you need deterministic offline scaffolding.