> ## 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.

# How to Update CMX to the Latest Stable or Nightly Build

> Check for and install CMX updates using the built-in upgrade command, your package manager, or by switching to the nightly channel for pre-release builds.

CMX ships updates as stable releases and nightly builds. You can check for and install updates using the built-in `cmx upgrade` command without reinstalling CMX from scratch or repeating account setup. Read the release notes before updating, especially for major version bumps, to catch any breaking changes before they affect an active coding session.

## Check for Updates

Run the following command to check whether a newer version is available:

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

This reports the available version number but does not install anything. Use it to find out whether an update exists before deciding to apply it.

## Install an Update

Once you know an update is available, install it with:

```bash theme={null}
cmx upgrade --install
```

This downloads the update, verifies its SHA-256 checksum against the published release manifest, and installs it in place. You do not need to uninstall your current version first. After installation, restart CMX with `cmx stop` followed by `cmx start` to run the new version.

## Update via Package Manager

If you installed CMX with npm or pnpm, you can also update by rerunning your original install command. This fetches the latest published stable package from the registry:

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

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

This method is equivalent to `cmx upgrade --install` for package manager installations. Use whichever fits your workflow.

## Switch to Nightly

Nightly builds contain the latest in-progress features and fixes before they land in a stable release. To switch to the nightly channel, install the `nightly` tag:

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

  ```bash pnpm theme={null}
  pnpm add --global @compressius/cmx@nightly
  ```
</CodeGroup>

<Warning>
  Nightly builds may contain bugs or incomplete features. Use a test machine or a non-critical project when running nightly. Stable is recommended for everyday coding sessions.
</Warning>

## Release Notes

Full release notes for every stable build are available on the [changelog](/changelog) page. Every release, including nightlies, is listed on the [GitHub releases page](https://github.com/compressius/cmx/releases).

<Tip>
  Read the release notes before updating, especially for major version bumps. Breaking changes, new configuration keys, and changed defaults are all called out there, so you can prepare before the update affects a live coding session.
</Tip>


## Related topics

- [CMX Changelog: Release Notes and Version History](/changelog.md)
- [Install CMX on Linux, macOS, or Windows — All Methods](/installation.md)
- [CMX Security Model: Local Gateway and Privacy Practices](/security.md)
