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
app
run
snapshot
results
list
queue
lint
check
doctor
whoami
import
apply
quarantine
ai
mcp
install-browsers
skills
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.