Skip to main content
The qa CLI drives Mo, Momentic’s AI QA engineer, from a terminal or a coding agent. Use it to start a session from a brief, read Mo’s output, answer questions, move files in and out of the hosted sandbox, and open a tunnel so Mo can test an application on your machine. For a task-oriented walkthrough, read Use the qa CLI. To start a session, see Use the qa CLI.

Install

Install qa with the standalone binary or npm:
Check the installed command:
The binary needs no Node.js and installs to $HOME/.local/bin on Linux and macOS (x86_64 and arm64). Add that directory to your PATH if the shell cannot find qa. Run the installer again to update. Set MO_VERSION to pin a version or MO_INSTALL_DIR to install somewhere else. The package is qa, and the command is qa on every install channel. You can also run npx qa --help. Releases before 0.18 named the command and the installed file mo; see Troubleshoot the install if a mo remains on your PATH. The npm package requires Node.js 22.12 or later in the 22.x series, or Node.js 24 or later. Use npm on Windows. It supports macOS ARM64/x64, Linux ARM64/x64 (glibc and musl), and Windows x64. Linux musl requires libstdc++. Keep optional dependencies enabled.

Windows Server 2016

Use @momentic/qa-node on Windows Server 2016 x64. The standard qa package runs a Bun binary, which does not support Windows Server 2016. The compatibility package runs on Node.js and requires Node.js 22.12 or later in the 22.x series, or Node.js 24 or later.

Authenticate on Windows Server 2016

In PowerShell, authenticate with your Momentic account:
For authentication without a browser, set MOMENTIC_API_KEY from your secret store instead. See authenticate the CLI.

Start a tunnel and session on Windows Server 2016

Configure the tunnel network prerequisites on the host, then start a tunnel and pass its ID to a Mo session. Replace 127.0.0.1:3000 and the URL with your app’s address:
Keep the tunnel running until the session finishes, then stop it:
Use @momentic/qa-node for subsequent CLI commands on this host, rather than the older qa@node tag.

Authenticate

Sign in with a Momentic account that has Mo access, then check which account and organization the CLI uses:
qa login opens a browser and saves an API key in ~/.momentic/auth.json, which momentic and momentic-mobile also use. For CI or a non-interactive agent shell, set MOMENTIC_API_KEY from your secret store instead. Create the key in API keys and team. MOMENTIC_API_KEY overrides the saved key. Operational commands also accept --api-key; login does not. qa whoami validates the active key and reports its source, so check it before starting a session in another organization.

Troubleshoot the install

If npm install -g qa fails with EEXIST, a file named qa already exists in npm’s global bin directory. Check ls -la $(npm prefix -g)/bin and remove the stale entry. Do not pass --force; it would overwrite the file. qa 0.17.x also installed a mo command. Updating with npm install -g qa@latest removes it automatically. An older standalone install may still use $HOME/.local/bin/mo. Run mo upgrade, then check qa --version. If qa is still missing, run mo upgrade again. The first run uses the old updater and can leave the new binary named mo; the second run uses the new updater to rename it to qa. It removes mo when it can. If the binary is already on the latest release, the rename does not download it again. If more than one mo or qa is on your PATH, the first one runs. For example, a standalone qa in $HOME/.local/bin can shadow the npm install. Run qa doctor to list every matching executable and the one that wins, or which -a mo qa to see the order. In a shell that already ran the old command, run hash -r so it forgets the old location. npx mo is not Momentic. The mo package on npm is a different project. Use npx qa.

Commands

Use qa mcp to bridge hosted Momentic MCP over stdio with your saved CLI login; see mcp.

login

Sign in and save an API key, or sign out.

start

Create a session from a brief.

environments

List saved environments for a session.

send

Send a message to a session.

secrets

Save credentials in a running session.

read

Read new output from a session.

wait

Wait for a session and its sub-agents to finish.

status

Get a session snapshot with its bugs.

sessions

List sessions and recover an unconfirmed start.

bugs

List, describe, and triage bugs.

cases

List and describe the test cases Mo observed.

report

Export a report to files.

cost

Get AI and runtime cost line items for a session.

stop

Stop the active turn.

archive

Archive a session.

unarchive

Restore an archived session.

download

Copy a file from the session sandbox.

upload

Copy a local file into the session sandbox.

tunnel

Let Mo reach applications available from this machine.

skills

Install the Momentic skills for your coding agent.

version

Print the installed version and check for updates.

upgrade

Replace the installed Mo CLI binary with the latest release.

licenses

Print licenses for bundled executables.

doctor

Print diagnostics for the installation and PATH.

Global flags

These flags are shared by several commands. Check qa <command> --help for the flags a command accepts; for example, login accepts --server but does not accept --api-key.
string
Momentic API key. Defaults to the value saved by qa login in ~/.momentic/auth.json. Env: MOMENTIC_API_KEY.
string
Momentic server URL. Defaults to the server saved by qa login, then to https://api.momentic.ai. Env: MOMENTIC_SERVER.
string
One of debug, info, warn, or error. Defaults to info. Place it before the command name.

Output

Session commands print machine-readable output so a script or coding agent can chain them: start, send, status, bugs, cost, and tunnel print JSON, and upload and download print a single path. read, wait, and report print plain text unless you pass --json. Status lines such as Mo is still working. and Mo’s open questions go to stderr.

Session IDs

Starting a session with qa start <message> prints a sessionId. Every later command takes that ID, either as a positional argument (qa read <session-id>) or as --session-id (qa upload, qa download). You can also copy the ID from the session URL in the Momentic dashboard.

Environment variables

Errors

A command that fails on an error such as invalid arguments, a missing credential, an API failure, or a broken local environment exits with a non-zero code, prints the reason, and writes one machine-readable line to stderr that a CI job or coding agent can parse without scraping the human output:
A command that reports a result through its own exit code, such as qa doctor finding a problem, does not write this line. --help and --version exit 0.

Notes

  • The CLI shares ~/.momentic/auth.json with momentic and momentic-mobile. Signing in with any one of them signs in all three.
  • read --timeout and send --wait accept 0 or a duration such as 500ms or 30s, capped at 290 seconds per request. Poll again to keep waiting; the Mo session continues running when a read times out.
  • Command errors exit 1 and print the reason to stderr. qa wait also exits 2 when Mo needs input or 4 when the session was stopped. The waiting commands (read, send --wait, wait, and tunnel start) exit 130 when you interrupt them with Ctrl+C.