CLI Reference
The justapi CLI provides development, scaffolding, and management commands.
Installation
Section titled “Installation”# Via cargo (permanent install)cargo install justapi-clijustapi --version
# Via uvx (run without installing)uvx justapi --versionCommands
Section titled “Commands”justapi serve
Section titled “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
Section titled “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
Section titled “justapi db”Database migration commands.
justapi db migrate # Apply pending migrationsjustapi db rollback # Rollback last migrationjustapi db list # List migration statusjustapi db seed # Seed database with initial datajustapi db reset # Drop and recreate all tablesjustapi db inspect # Inspect database schemajustapi routes
Section titled “justapi routes”List all registered routes.
justapi routesOutput:
Method Path HandlerGET / rootGET /items/{item_id} read_itemPOST /items/ create_itemjustapi doctor
Section titled “justapi doctor”Run system diagnostics.
justapi doctorChecks Python version, Rust availability, database connectivity, and configuration validity.
justapi gen
Section titled “justapi gen”Generate artifacts.
justapi gen openapi > openapi.json # Generate OpenAPI specjustapi gen client --lang typescript # Generate TypeScript clientjustapi check
Section titled “justapi check”Validate configuration without starting the server.
justapi checkjustapi profile
Section titled “justapi profile”Profile handler performance.
justapi profile --endpoint /items/42justapi new
Section titled “justapi new”Alias for justapi create.
Global Flags
Section titled “Global Flags”| Flag | Description |
|---|---|
--help |
Show help message |
--version |
Show version |
See Also
Section titled “See Also”- Configuration Reference — Environment variables and app config
- Project Scaffolder — Project generation guide
- Release Notes — Version history