qa CLI - Momentic

Documentation Index

Fetch the complete documentation index at: /docs/llms.txt

Use this file to discover all available pages before exploring further.

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:

npx qa login
npx qa start "Test the checkout flow on https://preview.example.com."

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:

npm install -g qa
qa --help

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:

curl -fsSL https://cli.momentic.ai/qa | sh

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

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.

--api-key
string
Momentic API key. Defaults to the value saved by qa login in ~/.momentic/auth.json. Env: MOMENTIC_API_KEY.

--server
string
Momentic server URL. Defaults to the server saved by qa login, then to https://api.momentic.ai. Env: MOMENTIC_SERVER.

--log-level
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

Variable Purpose
MOMENTIC_API_KEY Auth token. Overrides the key saved by qa login.
MOMENTIC_SERVER Override the API host.
MOMENTIC_ARTIFACTS_DIR Default directory for qa download and parent directory for qa report when --output is not passed.
MO_VERSION Version for the installer script to install.
MO_INSTALL_DIR Directory for the installer script to write qa into.

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:

mo-error: {"code":"MO_AUTH_REQUIRED","group":"auth","retry":"no","attribution":"user-action","message":"..."}

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