> ## 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 --editor-tools skills` (use `--platform ios` or `--platform android` for mobile). Never run an interactive command in a non-TTY shell.
> Mo is the AI QA engineer, a separate product from the YAML test framework: its npm package and CLI are `qa` (not `mo` — `npx mo` is a different project). Install with `npm install -g qa`, authenticate the same MOMENTIC_API_KEY way, install repo skills with `qa skills -y`, and start a session with `qa start "<brief>"` or `qa <url>`. Docs: https://momentic.ai/docs/mo.md.
> You cannot complete the browser sign-in yourself. Read the API key from the exact MOMENTIC_API_KEY environment variable (similarly named vars like BILT_MOMENTIC_API_KEY are ignored), 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.

# qa upgrade

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

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

For an npm installation, run `npm install -g qa@latest` instead. `qa upgrade`
prints the npm update command without replacing the installed binary. Update
project dependencies with your project's package manager.

```bash theme={null}
qa 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. Installs the verified file as `qa` in the directory holding the current
   executable.

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

The current updater renames an install still named `mo` to `qa` in the same
directory and removes `mo`. An older updater can install the new release without
renaming the file. Run `mo upgrade`, check `qa --version`, and run `mo upgrade`
again if `qa` is still missing. The second run uses the new updater. If the
binary is already on the latest release, it renames the file without downloading
anything. If `mo` cannot be deleted, `qa doctor` flags the leftover file.

## Arguments

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

## Upgrade prompt

For standalone installations, interactive commands show an update notice when a
newer release exists and ask:

```text theme={null}
Upgrade qa 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 `qa upgrade`, `qa version`, `qa skills`, `qa licenses`, or
`qa doctor`, 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 the installed
  binary (`~/.local/bin` by default). If the install directory is not writable,
  re-run the installer instead: `curl -fsSL https://cli.momentic.ai/qa | sh`.
* `qa upgrade` only works on a released binary. A source checkout run through
  `bun` reports that it cannot self-update.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.