On this page
01
Install in Under a Minute
On macOS, install via Homebrew: brew tap cloptima/tap && brew install cloptima-cli. If you prefer containers, use docker.io/cloptimaai/cloptima-cli:latest. The executable command is cloptima in both cases.
02
Authenticate Securely
For local development, run cloptima auth login to store credentials in your OS keychain. For automation, set CLOPTIMA_ACCESS_TOKEN as an environment variable. This keeps secrets out of shell history and lets pipelines run non-interactively.
03
Verify Setup
Start with cloptima version, then cloptima auth status to confirm which credential the CLI uses before running deeper analysis commands.
04
Run Your First Queries
Use cloptima llm spend --window 30d for a fast summary of model spend. Then use cloptima llm breakdown --window 30d --group-by model to see spend by model, or --group-by team_id or app_id to see it by owner. Add --output json when you want to feed results into automation or AI workflows.
05
Find Savings and Risks
Run cloptima llm intelligence entities to inspect cost and optimization findings and cloptima llm policy-violations summary to see which requests your policies blocked, and which continued because a guardrail scan could not run, by reason, policy, and app. These two commands usually surface the fastest first-week wins.
06
Go Beyond Basic Reporting
Teams typically expand from spend reporting into gateway key management, guardrail review, unit economics, and showback. Common next commands include cloptima llm gateway-keys list, cloptima llm governance guardrails list, cloptima llm unit-economics report, cloptima llm showback export, and cloptima llm credits.
07
Next Steps
For team onboarding, share this setup with engineering and FinOps stakeholders. Then move to MCP setup so the same queries run from your AI assistant and agent workflows.