Set up with AI
Using a coding agent? Copy this prompt and paste it into Claude Code, Cursor, Codex, Copilot, or any other agent. It runs the wizard with an API key, because an agent cannot complete the browser sign-in, then writes your first test.Copy the setup prompt
Copy the setup prompt
Prerequisites
The wizard and the manual setup both need:- Node.js 22.12.0+ or 24.0.0+ (
node -v) - A
package.jsonin your project. Runnpm init -yif you do not have one. Commit it with the lockfile, so CI and local runs use the same Momentic version. - A Momentic account. Sign up to create one.
Set up with the wizard
Run the wizard in your terminal:momentic, writes
momentic.config.yaml and a sample test under web/, installs Chromium, runs
the sample test, and asks which coding agents to set up.
Manual setup
1
Install
npx. With pnpm, use pnpm exec momentic; with yarn,
use yarn momentic.2
Authenticate
Sign in with your browser:The CLI saves the credentials to Check which account and organization the CLI uses:
~/.momentic/auth.json and uses them when
MOMENTIC_API_KEY is not set.In CI, or in a shell without a browser, use an API key instead. Create one in
the dashboard and export it:3
Initialize
momentic.config.yaml to your project root. In an interactive
terminal, it also offers to install the coding agent skills and the MCP server.
init --yes accepts the defaults without prompts, so it works in agent shells
and CI.init does not create tests. You write your first one in the editor below. For
a sample test, use the wizard above instead.4
Connect your coding agent (optional)
Skip this step if Both commands detect the coding agents on your machine and ask which ones to
configure. Pass
init already did it. The two commands are independent:
skills are local instruction files, the MCP server is a live process that gives
the agent a browser and Momentic tools.--yes to skip the prompt. See
Building with AI for what each one does.5
Install browsers
Momentic runs your tests in a headless browser. Install Chromium:
6
Write and run your first test
Open the local editor:Create a test with the URL of your app as the base URL. Write one
natural-language step for a flow that works. If you have no app running, use
https://practicetestautomation.com/practice-test-login/ with the step
Log in with username "student" and password "Password123", then confirm the success page loads.Save the test. The editor writes the .test.yaml file to your project. Run it
from the editor, then run it from the CLI by name:--upload-results sends the result to the dashboard. Without it, the run stays
on your machine.7
Verify
- Check that the
.test.yamlfile exists in your project. - Open the dashboard and check Runs for the result.
Next steps
Core concepts
Finding elements, writing assertions, modules, variables
Building with AI
Skills, the MCP server, and a prompt for your coding agent
CI/CD
Run Momentic on every pull request
Goal-based testing
Build resilient tests around user outcomes