Skip to content

CLI Command Reference

The optimal CLI organizes its commands into logical groups that map to the core workflows of the Optimal platform.

Command Groups

GroupDescription
boardManage tasks on the Kanban board backed by Supabase.
financeReturnPro financial pipeline: uploads, audits, KPIs, monthly close, R1 volume.
contentNewsletter, social, blog, scraping, research pipeline, intelligence reports.
agentBot orchestration: heartbeats, task claiming, coordination.
transactionsBank transaction ingestion, categorization, and cleanup.
infraDeployments, health checks, Supabase migrations, instance monitoring.
syncDiscord sync, config profile management, bot registration.
scenariosBudget scenario CRUD (save, list, compare, delete).
authAuthentication and system diagnostics.

Installation

bash
pnpm install -g optimal-cli

After installing, run the setup wizard:

bash
optimal sync config init --owner your-org --brand CRE-11TRUST
optimal doctor

Global Flags

FlagDescription
--helpShow help for any command
--versionShow CLI version
--jsonOutput as JSON (where supported, e.g. board, asset, research)

Environment Variables

VariableRequiredPurpose
OPTIMAL_SUPABASE_URLYesOptimalOS Supabase instance URL
OPTIMAL_SUPABASE_SERVICE_KEYYesOptimalOS service role key
RETURNPRO_SUPABASE_URLFor financeReturnPro Supabase instance URL
RETURNPRO_SUPABASE_SERVICE_KEYFor financeReturnPro service role key
GROQ_API_KEYFor contentAI content generation (Groq/Llama)
STRAPI_URLFor contentStrapi CMS URL
STRAPI_API_TOKENFor contentStrapi API token
DISCORD_BOT_TOKENFor syncDiscord bot token for sync commands
N8N_WEBHOOK_URLFor pipelinesn8n webhook URL for distribution and pipelines
META_ACCESS_TOKENFor InstagramMeta Graph API access token

Additional Commands

optimal project

Project management

optimal project list

List all projects

optimal project create

Create a project

FlagDescriptionDefaultRequired
--slug <slug>Project slugyes
--name <name>Project nameyes
--owner <name>Owner
--priority <n>Priority 1-43

optimal project update

Update a project

FlagDescriptionDefaultRequired
--slug <slug>Project slugyes
-s, --status <status>New status
--owner <name>New owner

optimal milestone

Milestone management

optimal milestone create

Create a milestone

FlagDescriptionDefaultRequired
--project <slug>Project slugyes
--name <name>Milestone nameyes
--due <date>Due date (YYYY-MM-DD)

optimal milestone list

List milestones

FlagDescriptionDefaultRequired
--project <slug>Filter by project

optimal label

Label management

optimal label create

Create a label

FlagDescriptionDefaultRequired
--name <name>Label nameyes
--color <hex>Color hex code

optimal label list

List all labels

optimal asset

Digital asset tracking (domains, servers, API keys, services, repos)

optimal asset list

List tracked assets

FlagDescriptionDefaultRequired
-t, --type <type>Filter by type
-s, --status <status>Filter by status
-o, --owner <owner>Filter by owner
--jsonOutput as JSON

optimal asset add

Add a new asset

FlagDescriptionDefaultRequired
-n, --name <name>Asset nameyes
-t, --type <type>Asset typeyes
-s, --status <status>Status (default: active)
-o, --owner <owner>Owner
--expires <date>Expiration date
--meta <json>Metadata JSON string

optimal asset update

Update an existing asset

FlagDescriptionDefaultRequired
--id <uuid>Asset IDyes
-n, --name <name>New name
-t, --type <type>New type
-s, --status <status>New status
-o, --owner <owner>New owner
--expires <date>New expiration date
--meta <json>New metadata JSON

optimal asset get

Get a single asset by ID

FlagDescriptionDefaultRequired
--id <uuid>Asset IDyes

optimal asset remove

Delete an asset

FlagDescriptionDefaultRequired
--id <uuid>Asset IDyes

optimal asset track

Log a usage event for an asset

FlagDescriptionDefaultRequired
--id <uuid>Asset IDyes
-e, --event <event>Event nameyes
--actor <name>Who performed the action
--meta <json>Event metadata JSON

optimal asset usage

View usage log for an asset

FlagDescriptionDefaultRequired
--id <uuid>Asset IDyes
--limit <n>Max entries20

optimal config

Configuration management: shared env sync

optimal config seed-shared

Push local .env vars to shared_env_vars table (service_role)

FlagDescriptionDefaultRequired
--env-file <path>Path to .env file.env

optimal config pull-shared

Pull shared env vars and merge into local .env

FlagDescriptionDefaultRequired
--email <email>Owner email to pull from (defaults to OPTIMAL_OWNER_EMAIL or cached auth)
--env-file <path>Path to .env file to write.env

Built by Carlos Lenis in Miami