Skip to main content

CLI reference

Run cmx --help or cmx <command> --help for the exact flags in your installed version. This page covers the normal workflow; <client> means one of codex, opencode, claude, aider, antigravity, or cline.

Setup and account

For an installer prompt, y connects the listed ready providers. n or Enter keeps them direct, disables periodic auto-connect, and prints manual CLI and TUI instructions. If the terminal cannot accept input, setup returns an error; rerun cmx setup --ask-connect-ready in an interactive terminal.

Providers and client routing

See Supported clients for connection IDs and readiness limits. The providers ID belongs to the client; it is not necessarily the same as CMX’s upstream provider ID.

Gateway and usage

Stopping from the terminal interface, or sending SIGINT or SIGTERM to the gateway, restores clients the same way. Running cmx stop again after a successful stop is safe: it changes nothing and keeps the pending reconnection for a later cmx start.

Local sessions

CMX stores each client conversation it routes as a local compression session. Use cmx sessions to review what CMX has kept, check how compression applied to a conversation, or remove stored history. You can combine the list filters:
In cmx sessions show output, each compression record lists the replaced message range, the original and summary token estimates, and its status. A record marked credited counted toward your savings. A record marked cached covers content that an earlier record already credited, so CMX did not count it again. cmx sessions delete and cmx sessions clear cannot be undone. They do not change your clients’ own conversation history.

Content vault

When the lossless content vault is enabled (compression.vault.enabled), CMX archives original text removed by tool pruning, error purging, or truncation into the local SQLite store. Use cmx vault to review, export, or trim archived items. The vault is off by default and stays local to your machine. Vault contents are never sent to CMX Cloud.

Updates and removal

cmx remove and cmx rm are aliases for cmx uninstall, and --force (-f) is an alias for --yes (-y). See Undo and uninstall before removal. If you used npm or pnpm, remove the package registration separately after CMX restores clients.
Last modified on October 7, 2026