Infrastructure Commands
Deployments, health checks, Supabase migrations, instance monitoring.
Commands
optimal infra deploy
Deploy an app to Vercel (preview or production)
| Flag | Description | Default | Required |
|---|---|---|---|
--prod | Deploy to production |
bash
optimal infra deploy optimalos
optimal infra deploy optimalos --prod
optimal infra deploy dashboard-returnpro --prodoptimal infra migrate
Supabase database migration operations
optimal infra migrate push
Run supabase db push --linked on a target project
| Flag | Description | Default | Required |
|---|---|---|---|
--target <t> | Target: returnpro or optimalos | yes | |
--dry-run | Preview without applying |
bash
optimal infra migrate push --target returnpro
optimal infra migrate push --target returnpro --dry-run
optimal infra migrate push --target optimalosoptimal infra migrate pending
List pending migration files
| Flag | Description | Default | Required |
|---|---|---|---|
--target <t> | Target: returnpro or optimalos | yes |
bash
optimal infra migrate pending --target returnpro
optimal infra migrate pending --target optimalosoptimal infra migrate create
Create a new empty migration file
| Flag | Description | Default | Required |
|---|---|---|---|
--target <t> | Target: returnpro or optimalos | yes | |
--name <name> | Migration name | yes |
bash
optimal infra migrate create --target returnpro --name add-budget-columnsoptimal infra health
Run health check across all Optimal services
bash
optimal infra healthoptimal infra heartbeat
Send instance heartbeat to the monitoring dashboard
| Flag | Description | Default | Required |
|---|---|---|---|
--name <name> | Instance name (default: hostname) | ||
--install | Install as cron job (every 5 min) | ||
--dry-run | Show payload without sending |
bash
optimal infra heartbeat
optimal infra heartbeat --name oracle
optimal infra heartbeat --install
optimal infra heartbeat --dry-runoptimal infra repos
Show git repo status and Vercel deployment status
| Flag | Description | Default | Required |
|---|---|---|---|
--json | Output as JSON |
bash
optimal infra repos
optimal infra repos --jsonoptimal infra doctor
Setup, diagnose, and maintain this optimal-cli instance
| Flag | Description | Default | Required |
|---|---|---|---|
--name <name> | Instance name (default: hostname) | ||
--fix | Auto-fix issues (install cron, register instance, etc.) |
bash
optimal infra doctor
optimal infra doctor --fix
optimal infra doctor --name oracle --fixoptimal infra instances
List registered instances and their live status
| Flag | Description | Default | Required |
|---|---|---|---|
--json | Output as JSON | ||
--name <name> | Show detail for a single instance |
bash
optimal infra instances
optimal infra instances --name oracle
optimal infra instances --json