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. Each group handles a distinct domain — from kanban task management to financial pipelines, content generation, and infrastructure operations.

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

Command Groups

GroupDescription
boardKanban board: create, update, claim, and track tasks (epic/story/task hierarchy). Includes auto-claim and tui.
financeReturnPro financial pipeline: uploads, audits, KPIs, monthly close, R1 volume.
contentNewsletter, social, blog, scraping, research pipeline, intelligence reports.
agentBot orchestration: heartbeats, task claiming, coordination.
txBank transaction ingestion, categorization, and cleanup.
infraDeployments, health checks, Supabase migrations, instance monitoring.
syncDiscord sync, config profile management, bot registration.
scenarioBudget scenario CRUD (save, list, compare, delete).
Auth & Doctoroptimal login, signup, logout, session list, doctor.
configShared environment variable sync (config seed-shared, config pull-shared).
assetDigital infrastructure asset tracking (domains, servers, API keys, repos).
projectProject management (list, create, update).
milestoneMilestone tracking (create, list).
labelLabel management (create, list).

Additional Commands

Beyond the main groups above, the CLI includes several standalone commands.

Project Management

bash
optimal project list                                     # List all projects
optimal project create --slug my-proj --name "My Proj"   # Create a project
optimal project update --slug my-proj -s active          # Update a project

Milestones

bash
optimal milestone list --project <slug>                              # List milestones
optimal milestone create --project <slug> --name "v1.0" --due 2026-04-01  # Create a milestone

Labels

bash
optimal label list                              # List all labels
optimal label create --name "bug" --color "#FF0000"   # Create a label

Assets

bash
optimal asset list                 # List tracked assets
optimal asset add --name "API Key" --type api_key   # Add a new asset
optimal asset update --id <uuid> --status expired    # Update an asset
optimal asset get --id <uuid>                        # Get asset details
optimal asset remove --id <uuid>                     # Delete an asset
optimal asset track --id <uuid> --event "rotated"    # Log a usage event
optimal asset usage --id <uuid>                      # View usage log

Scenarios

See Scenarios for full reference.

bash
optimal scenario list
optimal scenario save --name "base" --adjustment-type percentage --adjustment-value 4
optimal scenario compare --names "base,aggressive"
optimal scenario delete --name "old-scenario"

Authentication & Diagnostics

See Auth & Doctor for full reference.

bash
optimal login                      # Authenticate with Supabase
optimal signup                     # Create a new account
optimal logout                     # Clear stored credentials
optimal session list               # List active terminal sessions
optimal doctor                     # Full system health check (--fix to repair)

Global Flags

These flags are available on every command:

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

Environment Variables

The CLI reads from a .env file in the project root or from your shell environment.

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 contentUsed by AI 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

Built by Carlos Lenis in Miami