Skip to content

bluefox-cli

CLI for the Bluefox Stack. Scaffold FastAPI projects, develop locally with hot reload, and deploy to your own server with Bluefox Cloud.

uv tool install bluefox-cli
bluefox init myapp
cd myapp
bfx db migrate initial
bfx dev

bfx dev starts Postgres, Redis, runs migrations, and launches the app with hot reload. Zero manual setup.

What it does

Scaffold — Generate a complete FastAPI project with auth, Postgres, Redis, migrations, tests, and Docker setup.

Developbfx dev starts all infrastructure and the app with hot reload. bfx db migrate generates Alembic migrations.

Deploybfx cloud bootstrap provisions a server with Docker Swarm, Traefik, Postgres, and Redis. bfx cloud deploy ships updates.

What it generates

A complete project with:

  • FastAPI app using bluefox-core settings and app factory
  • Authentication via bluefox-auth — JWT tokens, cookie sessions, user management
  • SQLAlchemy models inheriting BluefoxBase
  • Alembic migrations configured with configure_alembic()
  • Docker Compose for dev (local Postgres + Redis)
  • Multi-stage Dockerfile with uv
  • Test suite with bluefox-test fixtures and a health check smoke test
  • Makefile with dev, test, migrate, and run targets
  • Environment files with all BluefoxSettings variables

Install

uv tool install bluefox-cli

This makes bluefox (and the bfx alias) available globally.

Usage

bluefox init myapp

No interactive prompts, no config files — just one command to scaffold. Then use bfx dev and bfx db migrate to develop.

Next steps