Quick start
-
Start the gateway
Terminal window cmx startThis launches the background daemon with the gateway on
http://127.0.0.1:17322. The local TUI is available withcmx; the hosted dashboard is optional and does not affect local operation. -
Point your harness at it
For OpenCode, add to
~/.config/opencode/opencode.jsoncfor each provider you want routed through cmx:{"provider": {"my-provider": {"options": {"baseURL": "http://127.0.0.1:17322","headers": {"cmx-provider": "my-provider","cmx-harness": "opencode"}}}}}cmx-providermust match a key underprovidersin~/.config/cmx/config.json. Well-known names (openai,anthropic,openrouter,groq,deepseek,moonshot,zai) are preconfigured with their public base URLs β your harness still supplies its own API key and cmx forwards it unchanged. -
Use your agent normally
Work in a long session. When the model decides earlier history is stale it calls
compress;cmxswaps those spans for summaries on the next turn. -
Watch the savings
Terminal window cmx statssessions: 12 requests: 340input tokens (reported): 4.2M output: 61kestimated context: 1.9M sent -> 890k saved: 1.0M (54.1%)cache: read 3.1M / write 240kβ¦or run
cmxfor the terminal GUI. If you explicitly pair a computer, the hosted dashboard is available athttps://compressius-maximus.pages.dev.
