Disconnect, stop, or uninstall
Disconnect, stop, or uninstall
Section titled “Disconnect, stop, or uninstall”Choose the outcome you want:
| Goal | Command |
|---|---|
| Keep CMX but route one provider directly | cmx providers <client> disconnect <provider-id> |
| Keep CMX but disable one supported client | cmx harness disable <client> |
| Restore connected clients and stop the gateway | cmx stop |
| Restore clients and remove CMX’s executable, settings, and data | cmx uninstall |
Run these as the same operating-system user who installed and connected CMX. Use cmx harness list to see which clients are routed. Restart each changed coding client so it picks up the direct endpoint.
What stop does
Section titled “What stop does”cmx stop restores managed client settings to direct routing before it shuts down the gateway. If CMX cannot safely restore a client file, it reports the error and leaves the gateway running so that client is not stranded on a dead port. Resolve the conflict in that client’s settings, then retry.
A later cmx start can reconnect previously selected routes if the direct client settings have not changed. To remain direct, explicitly disconnect or disable the desired client before stopping. If you are running installer setup again, answer n to cmx setup --ask-connect-ready; that answer also clears pending automatic reconnection.
CMX restores the client’s configuration structure and preserves unrelated user edits made while routed. Formatting such as TOML quote style may differ. CMX does not undo its own provider map in config.json during client restoration.
Uninstall the standalone binary
Section titled “Uninstall the standalone binary”Run this in an interactive terminal:
cmx uninstallCMX asks for confirmation, restores the six supported clients where connected, stops the gateway, removes its own service entry if present, deletes its local configuration and data, and removes its executable. If restoration fails, uninstallation stops and retains CMX. Read the reported conflict before retrying. A manually configured custom client must have its base URL restored in that client separately.
For scripted removal after you have reviewed the effects:
cmx uninstall --yesTo retain local history or configuration for a later reinstall, add --keep-data or --keep-config. Without these flags, local usage history and cached summaries are deleted. These options do not delete or alter provider accounts or native client credentials.
cmx remove and cmx rm are aliases for cmx uninstall, and --force (-f) is an alias for --yes (-y). Restart each coding agent after uninstalling so it picks up its restored configuration.
Clean up the installation method
Section titled “Clean up the installation method”cmx uninstall removes the running executable and CMX-managed state. The package manager may still record an installed package, and an installer-created shortcut or PATH entry can remain. After cmx uninstall succeeds, do the matching cleanup:
If you installed through npm or pnpm, run the matching command:
npm uninstall --global @compressius/cmx# orpnpm remove --global @compressius/cmxFor a standalone install, check command -v cmx in a new terminal. If another copy remains, identify its path before removing it. The normal standalone locations are /usr/local/bin/cmx or ~/.local/bin/cmx.
If you installed through npm or pnpm, run the matching command:
npm uninstall --global @compressius/cmx# orpnpm remove --global @compressius/cmxThe standalone PowerShell installer puts CMX in %LOCALAPPDATA%\CMX\bin, adds that directory to your user PATH, and creates a CMX Start menu shortcut. After uninstalling, remove the shortcut and that exact PATH entry if they remain. Open a new PowerShell window and run Get-Command cmx -ErrorAction SilentlyContinue to check for another installed copy. If the executable was renamed to cmx.exe.old because Windows had it open, delete that file after closing the process.
Do not force-kill the gateway or delete client backup files before restoration. If cmx uninstall reports a conflict, follow Troubleshooting or contact support with the error text, not the client config or API keys.
