Skip to content

Quick start

  1. Start the gateway

    Terminal window
    cmx start

    This launches the background daemon with the gateway on http://127.0.0.1:17322. The local TUI is available with cmx; the hosted dashboard is optional and does not affect local operation.

  2. Point your harness at it

    For OpenCode, add to ~/.config/opencode/opencode.jsonc for 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-provider must match a key under providers in ~/.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.

  3. Use your agent normally

    Work in a long session. When the model decides earlier history is stale it calls compress; cmx swaps those spans for summaries on the next turn.

  4. Watch the savings

    Terminal window
    cmx stats
    sessions: 12 requests: 340
    input tokens (reported): 4.2M output: 61k
    estimated context: 1.9M sent -> 890k saved: 1.0M (54.1%)
    cache: read 3.1M / write 240k

    …or run cmx for the terminal GUI. If you explicitly pair a computer, the hosted dashboard is available at https://compressius-maximus.pages.dev.