The justapi CLI provides development, scaffolding, and management commands.
Installation
# Via cargo (permanent install)
cargo install justapi-cli
justapi --version
# Via uvx (run without installing)
uvx justapi --version
Commands
justapi serve
Start the development or production server.
justapi serve [OPTIONS]
| Flag | Default | Description |
|---|---|---|
--host |
127.0.0.1 |
Bind address |
--port |
8000 |
Bind port |
--workers |
CPU count | Number of worker processes |
--reload |
false | Enable hot-reload on file changes |
--timeout |
30 | Request timeout (seconds) |
--unix |
— | Unix socket path |
--scale |
false | Enable load-based auto-scaling |
--min-workers |
2 | Minimum workers (with --scale) |
--max-workers |
CPU count | Maximum workers (with --scale) |
--scale-low |
100 | RPS to scale down |
--scale-high |
1000 | RPS to scale up |
--scale-cooldown |
30 | Seconds between scaling events |
justapi create
Generate a new project from a template.
justapi create [OPTIONS] <project_name>
| Flag | Default | Description |
|---|---|---|
--db |
(interactive) | Database engine (sqlite, postgres, mysql, duckdb, clickhouse, mongodb, redis) |
--api-type |
(interactive) | API protocol (rest, graphql, grpc, jsonrpc) |
justapi db
Database migration commands.
justapi db migrate # Apply pending migrations
justapi db rollback # Rollback last migration
justapi db list # List migration status
justapi db seed # Seed database with initial data
justapi db reset # Drop and recreate all tables
justapi db inspect # Inspect database schema
justapi routes
List all registered routes.
justapi routes
Output:
Method Path Handler
GET / root
GET /items/{item_id} read_item
POST /items/ create_item
justapi doctor
Run system diagnostics.
justapi doctor
Checks Python version, Rust availability, database connectivity, and configuration validity.
justapi gen
Generate artifacts.
justapi gen openapi > openapi.json # Generate OpenAPI spec
justapi gen client --lang typescript # Generate TypeScript client
justapi check
Validate configuration without starting the server.
justapi check
justapi profile
Profile handler performance.
justapi profile --endpoint /items/42
justapi new
Alias for justapi create.
Global Flags
| Flag | Description |
|---|---|
--help |
Show help message |
--version |
Show version |
See Also
- Configuration Reference — Environment variables and app config
- Project Scaffolder — Project generation guide
- Release Notes — Version history