cmx command-line interface provides everything you need to manage your local gateway, connect coding agents, monitor token usage, and update CMX. Run cmx --help to see the commands available in your installed version.
Get Started
cmx login
Sign in and pair this device with your CMX account through the browser.
cmx setup
Sign in and connect detected coding agents. This is the recommended command to run the first time you install CMX — it handles browser sign-in, gateway startup, and agent connection in a single guided flow.
cmx harness enable
Route a detected coding agent through CMX so its traffic passes through the local compression gateway.
cmx serve
Run CMX in the current terminal as a foreground process. The gateway stays active for as long as the terminal session remains open.
cmx doctor
Diagnose configuration and connectivity issues. This command inspects your installation, checks gateway connectivity, and reports any problems it finds.
Start and Stop
cmx
Open the interactive terminal interface. Use this to manage connections, configure providers, and adjust preferences through a keyboard-driven UI.
cmx start
Start CMX as a background process. The gateway continues running after you close the terminal.
cmx stop
Stop the background CMX process.
cmx status
Show the current CMX status, including whether the gateway is running and how it is configured.
Examples:
Usage and Diagnostics
cmx stats
Show today’s token and compression statistics, including tokens handled, estimated net savings, and provider activity.
cmx logs status
Check whether opt-in raw logging is currently enabled on this device.
cmx dashboard
Open the CMX web dashboard in your default browser. The dashboard shows account-level usage history across all your devices.
Connections and Maintenance
cmx harness list
List all detected coding agent harnesses on this device.
cmx harness verify
Verify that saved coding-agent connections are still valid and reachable.
cmx harness disable
Restore the original harness configuration for all connected coding agents, removing CMX from their request path.
cmx sessions purge
Delete expired local sessions to free up space and remove stale session data.
cmx upgrade
Check whether a newer version of CMX is available, or download and install the update immediately.
Examples:
cmx logout
Sign out of your CMX account and clear all locally stored credentials from this device.
Global Flags
These flags are available on everycmx command.
Examples:
Not all flags may be listed here. Run
cmx --help or cmx <command> --help
for the complete list of flags available in your installed version.