momentic CLI is the entry point for web testing. Install it as a dev
dependency, then invoke commands via npx momentic <command>.
Install
Use Node.js 22.12 or later in the 22.x series, or Node.js 24 or later. Node.js 23 is not supported.momentic.config.yaml. Run
init in the project directory to
create one. Commands such as login, logout, and install-browsers work
without a project config.
Commands
init
Scaffold a new Momentic project.
app
Open the local editor.
run
Run tests locally and optionally upload results.
snapshot
Freeze tests into self-contained zips for isolated replay.
results
Upload, merge, and view local test results.
list
List tests matching a pattern.
queue
Queue a run on Momentic infrastructure (deprecated).
lint
Validate simplified-format test and module YAML files.
check
Detect duplicate IDs and validate
momentic.config.yaml.doctor
Check the installation and project for problems.
whoami
Show the account and organization for your API key.
import
Import tests from the Momentic dashboard.
apply
Apply patch changes to local tests (deprecated).
quarantine
Quarantine or unquarantine tests.
ai
Select tests, classify failures, and repair tests.
mcp
Start the MCP server for coding agents.
install-browsers
Install or update headless browsers.
skills
Install the Momentic skills for your coding agent.
Global flags
These flags are shared by several commands. Checknpx momentic <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 in
~/.momentic/auth.json. Env:
MOMENTIC_API_KEY.string
Momentic server URL. Defaults to the server saved by
momentic login, then
https://api.momentic.ai. Env: MOMENTIC_SERVER.string
Absolute or relative path to a Momentic configuration file. Defaults to the
nearest
momentic.config.yaml in the current directory or a parent directory,
or projects listed in a workspace file.string
When using workspaces, load the project whose name
exactly matches the filter.
boolean
Skip all confirmation prompts. Enabled by default when
CI is set.boolean
Enable verbose logging to stderr.
Environment variables
See Environment variables for the full
list.
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 MOM_* 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 run whose tests fail exits non-zero without this
line; read the reporter output or results instead. --help and --version exit
0.