> ## Documentation Index
> Fetch the complete documentation index at: https://docs.compressi.us/llms.txt
> Use this file to discover all available pages before exploring further.

# CMX Quick Start: Install, Connect, and Save Tokens

> Install CMX, sign in with your free account, connect your AI coding agent, and verify that requests are flowing — all in under a minute.

This page walks you through installing CMX, signing in with your free account, connecting your coding agent, and verifying that requests are flowing through the gateway. You'll be up and running in under a minute.

<Steps>
  <Step title="Install CMX">
    Choose the install method that fits your setup. The npm and pnpm methods require Node.js 18 or later. The curl method installs a standalone binary with no Node.js dependency.

    <CodeGroup>
      ```bash npm theme={null}
      npm install --global @compressius/cmx
      ```

      ```bash pnpm theme={null}
      pnpm add --global @compressius/cmx
      ```

      ```sh curl (Linux / macOS) theme={null}
      curl -sSfL https://compressi.us/install.sh | sh
      ```
    </CodeGroup>

    After the install completes, open a new terminal and confirm the binary is available:

    ```bash theme={null}
    cmx --version
    ```

    If the command is not found, see the [Installation](/installation) page for PATH setup instructions.
  </Step>

  <Step title="Complete Setup">
    Run the setup command to sign in and start the local gateway:

    ```bash theme={null}
    cmx setup
    ```

    CMX opens a browser window for account sign-in. Complete the sign-in flow, then return to the terminal. CMX will detect any supported coding agents on your machine and prompt you to choose one to connect.
  </Step>

  <Step title="Connect Your Agent">
    Open the CMX terminal interface, navigate to **CONFIG**, select your coding agent, choose your provider, and press **Connect**. Then restart your coding agent so it picks up the new gateway address (`127.0.0.1:17322`).

    Verified agents and their connection steps:

    * **Codex** — CONFIG → Codex → select your connection → Connect → restart Codex
    * **OpenCode** — CONFIG → OpenCode → refresh the provider list → connect your provider → restart OpenCode

    To confirm the connection is working, run:

    ```bash theme={null}
    cmx harness verify
    ```
  </Step>

  <Step title="Check Your Activity">
    Send a few messages in your coding agent, then check your local statistics:

    ```bash theme={null}
    cmx stats
    ```

    Look for new requests in the output. If requests appear, CMX is receiving traffic from your agent and compression will activate once your session context grows large enough.
  </Step>
</Steps>

<Note>
  Short sessions often show little or no token savings. CMX only applies compression once a session crosses the configured context threshold, and the net saving must be positive before any summary is applied. Run a longer coding session — one with many back-and-forth turns — to see meaningful compression take effect.
</Note>

Ready to explore further? The [Installation](/installation) page covers all install methods and platform-specific options. The [Configuration](/configuration) page explains how to tune compression thresholds and manage agent connections.


## Related topics

- [Compressius Maximus (CMX): What It Is and How It Works](/introduction.md)
- [Install CMX on Linux, macOS, or Windows — All Methods](/installation.md)
- [Connect OpenAI Codex to CMX for Context Compression](/providers/codex.md)
