CLI Reference¶
Global Options¶
paxx --version¶
Show the paxx version and exit.
Project Commands¶
paxx bootstrap¶
Create a new paxx project with the standard structure.
Arguments:
| Argument | Description |
|---|---|
name |
Name of the new project. Use . to bootstrap in current directory. |
Options:
| Option | Description | Default |
|---|---|---|
-o, --output-dir PATH |
Directory to create the project in | Current directory |
-d, --description TEXT |
Project description | - |
-a, --author TEXT |
Author name | "Author" |
-f, --force |
Skip confirmation prompts (CI-friendly) | False |
Examples:
paxx bootstrap myproject
paxx bootstrap my-api --description "My awesome API"
paxx bootstrap myproject -o /path/to/projects
paxx bootstrap . # Bootstrap in current directory
paxx bootstrap myproject --force # Non-interactive mode
paxx start¶
Start the development server (uvicorn wrapper).
Options:
| Option | Description | Default |
|---|---|---|
-h, --host TEXT |
Host to bind to | 127.0.0.1 |
-p, --port INTEGER |
Port to bind to | 8000 |
-r, --reload / -R, --no-reload |
Enable auto-reload | Enabled |
-w, --workers INTEGER |
Number of workers (only without reload) | 1 |
Examples:
paxx start # Start on localhost:8000 with reload
paxx start --port 3000 # Start on port 3000
paxx start --host 0.0.0.0 # Bind to all interfaces
paxx start --no-reload --workers 4 # Production-like mode
Feature Commands¶
paxx feature create¶
Create a new domain feature from scratch.
Arguments:
| Argument | Description |
|---|---|
name |
Name of the new feature (required) |
Options:
| Option | Description | Default |
|---|---|---|
-d, --description TEXT |
Feature description | - |
Examples:
paxx feature create users
paxx feature create blog_posts
paxx feature create orders --description "Order management"
Generated Structure:
features/<name>/
├── __init__.py
├── config.py # Feature configuration (prefix, tags)
├── models.py # SQLAlchemy models
├── schemas.py # Pydantic schemas
├── services.py # Business logic
└── routes.py # API endpoints
paxx feature add¶
Add a bundled feature to your project.
Arguments:
| Argument | Description |
|---|---|
feature |
Name of the bundled feature to add (required) |
Options:
| Option | Description | Default |
|---|---|---|
-f, --force |
Overwrite existing feature | False |
Available Features:
| Feature | Description |
|---|---|
example_products |
Complete CRUD example with e2e tests |
Examples:
paxx feature add example_products # Add the example CRUD feature
paxx feature add auth --force # Overwrite existing auth feature
When a bundled feature is added:
1. Files are copied to features/<name>/
2. E2E tests are copied to e2e/
3. Router is automatically registered in main.py
paxx feature list¶
List all available bundled features.
Database Commands¶
All database commands are wrappers around Alembic.
paxx db migrate¶
Create a new database migration.
Arguments:
| Argument | Description |
|---|---|
message |
Migration message describing the changes (required) |
Options:
| Option | Description | Default |
|---|---|---|
-a, --autogenerate / -A, --no-autogenerate |
Auto-detect model changes | Enabled |
Examples:
paxx db upgrade¶
Apply migrations to the database.
Arguments:
| Argument | Description | Default |
|---|---|---|
revision |
Target revision | head (latest) |
Examples:
paxx db upgrade # Apply all pending migrations
paxx db upgrade head # Same as above
paxx db upgrade +1 # Apply next migration only
paxx db upgrade abc123 # Migrate to specific revision
paxx db downgrade¶
Revert migrations.
Arguments:
| Argument | Description | Default |
|---|---|---|
revision |
Target revision | -1 (previous) |
Examples:
paxx db downgrade # Revert last migration
paxx db downgrade -1 # Same as above
paxx db downgrade -2 # Revert last 2 migrations
paxx db downgrade base # Revert all migrations
paxx db downgrade abc123 # Downgrade to specific revision
paxx db status¶
Show current migration status.
paxx db history¶
Show migration history.
Options:
| Option | Description |
|---|---|
-v, --verbose |
Show detailed history |
paxx db heads¶
Show current available heads (useful for migration branches).
Docker Commands¶
Docker Compose wrappers for development.
paxx docker up¶
Start the development environment.
Options:
| Option | Description | Default |
|---|---|---|
-d, --detach |
Run containers in the background | False |
-b, --build |
Rebuild images before starting | False |
Examples:
paxx docker up # Start in foreground (see logs)
paxx docker up -d # Start in background
paxx docker up --build # Rebuild and start
paxx docker down¶
Stop the development environment.
Options:
| Option | Description | Default |
|---|---|---|
-v, --volumes |
Remove named volumes (deletes database data) | False |
Examples:
paxx docker build¶
Build the Docker images.
Options:
| Option | Description | Default |
|---|---|---|
--no-cache |
Build without using cache | False |
Examples:
paxx docker logs¶
Show container logs.
Arguments:
| Argument | Description | Default |
|---|---|---|
service |
Service to show logs for (app, db) | All services |
Options:
| Option | Description | Default |
|---|---|---|
-f, --follow / -F, --no-follow |
Follow log output | Follow |
Examples:
paxx docker logs # Follow all logs
paxx docker logs app # Follow app logs only
paxx docker logs -F # Show logs without following
paxx docker ps¶
Show running containers.
paxx docker exec¶
Execute a command in a running container.
Arguments:
| Argument | Description | Default |
|---|---|---|
service |
Service to run command in | app |
command |
Command to execute | bash |
Examples:
paxx docker exec # Open bash in app container
paxx docker exec app bash # Same as above
paxx docker exec db psql # Open psql in database container
Infrastructure Commands¶
Add cross-cutting infrastructure components.
paxx infra add¶
Add an infrastructure component to your project.
Arguments:
| Argument | Description |
|---|---|
name |
Name of the infrastructure component |
Options:
| Option | Description | Default |
|---|---|---|
-f, --force |
Overwrite existing files | False |
Available Components:
| Component | Description |
|---|---|
redis |
Redis caching with async support |
storage |
Object storage (S3/MinIO/local) |
metrics |
Prometheus metrics and OpenTelemetry tracing |
Examples:
paxx infra add redis # Add Redis caching
paxx infra add storage # Add object storage
paxx infra add metrics # Add observability
When an infrastructure component is added:
1. Templates are rendered to services/
2. Docker service is merged into docker-compose.yml
3. Dependencies are added to pyproject.toml
4. Environment variables are added to settings.py and .env.example
See Infrastructure for detailed usage.
paxx infra list¶
List available infrastructure components.
Extension Commands¶
Extensions are add-ons that enhance existing infrastructure components. Unlike infrastructure components, they don't add new services but extend functionality of existing ones.
paxx ext add¶
Add an extension to your project.
Arguments:
| Argument | Description |
|---|---|
name |
Name of the extension to add |
Options:
| Option | Description | Default |
|---|---|---|
-f, --force |
Overwrite existing files | False |
Available Extensions:
| Extension | Description | Requires |
|---|---|---|
arq |
Background task queue with ARQ | redis |
websocket |
WebSocket connections with room support | (optional redis) |
postgis |
PostGIS geospatial extension | - |
Examples:
paxx ext add arq # Add ARQ task queue (requires redis)
paxx ext add websocket # Add WebSocket support
paxx ext add postgis # Add PostGIS to postgres
When an extension is added:
1. Templates are rendered to services/
2. Dependencies are added to pyproject.toml
3. Environment variables are added to settings.py and .env.example
See Extensions for detailed usage.
paxx ext list¶
List available extensions.
Deployment Commands¶
Generate deployment configurations.
paxx deploy add¶
Add a deployment configuration to your project.
Arguments:
| Argument | Description |
|---|---|
type |
Deployment type to add |
Available Types:
| Type | Description |
|---|---|
linux-server |
Traefik + Docker + systemd with SSL |
Examples:
When a deployment is added:
1. Configuration files are created in deploy/<type>/
2. GitHub Actions workflow is created at .github/workflows/build.yml
Generated Files (linux-server):
deploy/linux-server/
├── deploy.sh # Main deployment script
├── deploy-init.sh # Initial server setup
├── deploy-if-changed.sh # Deploy only if image changed
├── deploy-purge.sh # Clean up deployment
├── get-status.sh # Check deployment status
├── server-setup.sh # Server configuration
├── docker-compose.yml # Production compose file
├── traefik-dynamic.yml # Traefik routing config
├── .env.example # Production env template
├── README.md # Deployment documentation
└── certs/ # TLS certificates directory
.github/workflows/
└── build.yml # CI/CD pipeline
See Deployment for detailed setup instructions.