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 Mo CLI.

Start a session

Sign in, then run the npm package with instructions in plain language. You need Mo access in your Momentic organization and the Node.js version listed under Install:
Quote multiword instructions so the shell passes them as one argument. If you installed the CLI, use qa start <instructions> instead. A bare URL works without start: qa https://preview.example.com.

Install

Install the npm package and run qa:
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 launcher requires Node.js 22.12 or later in the 22.x series, or Node.js 24 or later. It supports macOS ARM64/x64, Linux ARM64/x64 (glibc and musl), and Windows x64. Linux musl requires libstdc++. Keep optional dependencies enabled. To install the standalone binary without Node.js, run:
The installer writes qa to $HOME/.local/bin on Linux and macOS (x86_64 and arm64). Run it again to update. Set MO_VERSION to pin a version or MO_INSTALL_DIR to install somewhere else.

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

login

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

start

Create a session from a brief.

send

Send a message to a 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 findings.

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.

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, and tunnel print JSON, and upload and download print a single path. read prints Mo’s messages as plain text unless you pass --json. Status lines such as Mo is still working. 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 send, 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:
code is a stable MO_* identifier. group is one of args, auth, api, env, run, or internal. retry is yes, no, or case-by-case. attribution says who owns the fix: user-action for input or credentials, user-env for the local machine or project configuration, product for a Momentic bug, or unknown. 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, 30s, or 2m, up to a maximum of 290s.
  • 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.