Orbit CLI Reference
Orbit is Astris's artisan command-line companion for developing, scaffolding, and managing your applications.
Available Commands
| Command | Description |
|---|---|
orbit serve | Start full-stack development server with concurrent Vite HMR |
orbit make:module <name> | Scaffold a complete domain module (Controller, Service, Model) |
orbit make:controller <name> | Generate an Astris controller |
orbit make:model <name> | Generate a SQLModel database model |
orbit make:auth | Install full-stack authentication starter kit |
orbit migrate | Run all pending database migrations |
orbit make:migration "<msg>" | Auto-generate a new Alembic schema migration |
orbit key:generate | Generate a new 32-byte secret APP_KEY in .env |
Command Details
1. orbit serve
Launches the backend (Uvicorn) and frontend (Vite) development servers concurrently:
uv run orbit serve- Backend:
http://localhost:8000 - Vite HMR: Hot reload for Vue 3 and CSS changes without page reloads.
Production Mode (--prod)
To run in production mode (binds to 0.0.0.0, disables reload/Vite, enables multi-worker):
uv run orbit serve --prod --workers 42. orbit make:module <name>
Scaffolds a complete domain module with controller, service, and SQLModel schemas:
uv run orbit make:module billingCreates:
app/modules/billing/__init__.pyapp/modules/billing/billing_controller.pyapp/modules/billing/billing_service.pyapp/modules/billing/billing_model.py
3. orbit make:controller <name>
Scaffolds an Astris controller inside a domain module:
uv run orbit make:controller reportsCreates:
app/modules/reports/reports_controller.py
You can also specify a custom target module:
uv run orbit make:controller payments --module billing4. orbit make:model <name>
Scaffolds a SQLModel database table and DTO validation schemas:
uv run orbit make:model InvoiceCreates:
app/modules/invoice/invoice_model.py
5. orbit make:auth
Scaffolds the full-stack authentication starter kit:
uv run orbit make:authCreates:
app/modules/auth/auth_controller.pyapp/modules/auth/auth_service.pyapp/modules/auth/auth_model.pyresources/js/Components/AstrisLogo.vueresources/js/Pages/Auth/Login.vueresources/js/Pages/Auth/Register.vueresources/js/Pages/Dashboard.vue
6. orbit make:migration "<message>"
Auto-generates a versioned schema migration by comparing your SQLModel models against the current database:
uv run orbit make:migration "create_articles_table"Creates:
database/migrations/versions/<timestamp>_create_articles_table.py
7. orbit migrate
Executes all pending database migrations against your configured DATABASE_URL:
uv run orbit migrateTo roll back the last migration:
uv run orbit migrate:rollbackTo check migration status:
uv run orbit migrate:status8. orbit key:generate
Generates a cryptographically secure 32-byte secret key and updates APP_KEY in .env:
uv run orbit key:generateTo display the generated key in the terminal without writing to .env (useful for CI/CD pipelines):
uv run orbit key:generate --showWhen to use this command:
- After cloning an existing project and copying
.env.exampleto.env. - When provisioning a new environment (staging, production).
- When rotating application secrets for security maintenance. (Note:
APP_KEYis already generated automatically when you create a project withastris new.)
Next Steps
- Project generator CLI: Astris Project Generator.
- Deploying to production: Production & Docker.