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

> ## Agent Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> For an unattended setup, run `npx --yes @momentic/wizard@latest -y --platform web` (use `--platform ios` or `--platform android` for mobile). Never run an interactive command in a non-TTY shell.
> You cannot complete the browser sign-in yourself. Read the API key from the MOMENTIC_API_KEY environment variable, or ask the user to create one at https://app.momentic.ai/settings/api-keys and paste it back.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. Install the skills with `npx momentic skills --yes` (or `npx momentic-mobile skills --yes` for mobile).
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators. Physical devices are not supported.

# mo upgrade

> Replace the installed Mo CLI binary with the latest release.

Download the latest published `mo` release and replace the binary you are
running.

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

## Behavior

1. Reads the latest version from the release manifest.
2. Downloads the binary for your OS, CPU, and libc (the same selection the
   installer makes).
3. Verifies the download against its published SHA-256 checksum.
4. Renames the verified file over the current executable.

If any step fails, the existing binary is left untouched. When you are already
on the latest release, the command reports that and exits `0`.

## Arguments

<ParamField path="version" type="string">
  Install this exact version instead of the latest release, for example `mo
      upgrade 1.4.2`. Downgrades are allowed.
</ParamField>

## Upgrade prompt

When a newer release exists, interactive commands show an update notice and ask:

```text theme={null}
Upgrade mo to v1.5.0 now? (Y/n)
```

Answering yes runs the same upgrade in place; the current command then continues
on the old version. The prompt does not appear in CI, without a TTY, with
`--json`, on `mo upgrade`, `mo version`, `mo skills`, or `mo licenses`, or when
`NO_UPDATE_NOTIFIER` or `MOMENTIC_SKIP_UPGRADE_PROMPT` is set. After it is shown
once, it stays quiet for that version for 24 hours.

## Notes

* The command needs write access to the directory that holds `mo`
  (`~/.local/bin` by default). If the install directory is not writable, re-run
  the installer instead: `curl -fsSL https://cli.momentic.ai/mo | sh`.
* `mo upgrade` only works on a released binary. A source checkout run through
  `bun` reports that it cannot self-update.
