CompressiusMaximus
Type to search documentation.

Quick start

Start the gateway, wire a harness, watch savings roll in.

  1. Start the gateway

    Terminal window
    cmx start

    This launches the background daemon: gateway on http://127.0.0.1:17322, web dashboard on http://127.0.0.1:17323.

  2. Point your harness at it

    For OpenCode, add to ~/.config/opencode/opencode.jsonc for 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-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
    text
    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 open the dashboard at http://127.0.0.1:17323, or just run cmx for 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