Quick start
Start the gateway, wire a harness, watch savings roll in.
-
Start the gateway
Terminal window cmx startThis launches the background daemon: gateway on
http://127.0.0.1:17322, web dashboard onhttp://127.0.0.1:17323. -
Point your harness at it
For OpenCode, add to
~/.config/opencode/opencode.jsoncfor each provider you want routed through cmx:jsonc {"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 statstext sessions: 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 open the dashboard at
http://127.0.0.1:17323, or just runcmxfor the terminal GUI.
TUI power users
cmx with no arguments opens the terminal GUI — mouse-enabled, with the
dashboard, session list, per-session summaries and live config. S starts
and X stops the gateway from inside it.
Last updated Sep 1, 2026