---
title: "Run verification wherever you build."
description: "Run Momentic tests with npx momentic run. Shard across CI jobs, filter by label, pick tests from a git diff, and write JUnit or Allure reports."
canonical: "https://momentic.ai/cli"
last-updated: "2026-11-17T18:54:50Z"
---

# Run verification wherever you build.

URL: https://momentic.ai/cli

platform   / cli

Check a change from your terminal with npx momentic run, then run the same tests in CI. Your coding agent uses the same tools through MCP.

`npx momentic init`

Before running tests, use npx momentic login to sign in through your browser.

[Try for free](https://app.momentic.ai/signup) [Get a demo](/sales)

Web, iOS and Android · GitHub Actions · GitLab CI · CircleCI · Jenkins · Buildkite

## Author, run, and debug from your development tools.

YAML   Repository test files

Test runs

Execute repository tests from your terminal or CI.

Local editor

Author and debug tests in Momentic's local visual editor.

MCP

Give coding agents tools to author, run, and inspect tests.

Run results

View local run reports and check results before release.

## From a local check to a CI gate.

Run the test against the change you're making. Keep it in Git so the next change gets the same check.

01

### Install the runner

The wizard installs the CLI, initializes your project, and runs a sample. Connect your application and keep the project files in Git.

02

### Author and debug locally

Write tests in the interactive editor or with your coding agent. Run the flow and inspect its screenshots before saving the YAML.

03

### Bring the test into CI

Commit the test beside your code and run it in your pipeline. Review the same step results and evidence when a job fails.

## CLI verification in your development loop.

Use the same test files in the editor, your coding agent, and CI. Inspect the recorded steps when a run fails.

### Run the tests you need

Select a file, directory, name, or label for a focused run. Test a preview deployment before adding the change to your release pipeline.

Test the behavior you are changing.

### Author in an interactive editor

Open your project in Momentic's local app to write and debug tests. Inspect the screen and run individual steps before saving the YAML.

Inspect the app while you write the test.

### Give coding agents a test runner

MCP lets your coding agent inspect the app, try an interaction, and run tests. Your team reviews the resulting YAML beside application code.

Your agent verifies the test it writes.

### Select tests from a code change

AI test selection uses the diff and code index to find affected tests. Evaluate selections against full-suite runs before using them to gate changes.

Focus the run on the affected behavior.

### Reports your pipeline can read

Export JUnit, JSON, Allure, or Buildkite reports for your CI tools. Keep screenshots and step results available for engineers investigating a failed run.

Review the failure from your pipeline.

### Run the same suite in CI

Use the same repository tests on your laptop and in CI. Split the suite across jobs and bring the results together for review.

Keep the test as you move into CI.

How engineering teams use Momentic.

Read how teams add repository tests, verify changes in CI, and investigate failed runs.

“I would definitely recommend Momentic to any other team. They’re very responsive, outcome-driven, and a  trustworthy, scalable partner  .”

Ravindra K.   Tech Lead, Notion

Under 5 min

failure diagnosis, down from around 15 minutes

99.95%

pass rate for critical tests on main

30+

defects caught before Notion’s APAC launch

[99.95%   pass rate for critical tests on main   "I would definitely recommend Momentic to any other team. They’re very responsive, outcome-driven, and a trustworthy, scalable partner."  Ravindra K. Tech Lead, Notion](/customers/notion)

[30 min   daily test execution, down from 7 hours   "Momentic gave us a fast and reliable way to validate Poe.com's AI responses, even when they weren't deterministic."  Momoko F. Head of Product Operations, Quora](/customers/quora)

[8x   increase in release cadence   "It's like giving someone your QA checklist and watching them execute it for you!"  Sriram S. Engineering Lead, Source Control, Retool](/customers/retool)

[80%   faster release cycles   "With Momentic, we've caught bugs that would have eluded even our most diligent internal tests."  Alex C. CTO, GPTZero](/customers/gptzero)

[6x   faster end-to-end test creation   "We've already seen a 30% decrease in production incidents thanks to Momentic's automated testing."  Hanna K. Head of QA, CoverGo](/customers/covergo)

[Browse all](/customers)

## Test web, iOS, and Android.

Use the same simplified YAML format across web and mobile. Choose the CLI and runtime for each test.

[01    Web     End-to-end browser testing on Chromium and Chrome.](/web-app-testing)[02    iOS     Native iOS apps and SwiftUI, on hosted or local simulators.](/ios-testing)[03    Android     Run Android APKs on local or hosted emulators.](/android-testing)

## The CLI, answered.

How do I install the CLI?    Install the development dependency. Use momentic for web or momentic-mobile for mobile, then initialize the project. See the [web quickstart](/docs/quickstart/web) for runtime installation.    What does momentic run do?    It runs repository tests. The web CLI reads momentic.config.yaml, executes selected YAML tests, and saves local results. Add --upload-results for dashboard evidence.    Where do the tests live?    In your repository. Review YAML test changes in the same pull request process as application code.    Do I need an API key to run tests?    Yes. Run momentic login to save a key locally, or set MOMENTIC_API_KEY for the CLI. Use your CI secret store for pipeline credentials.    How do I run only some of the tests?    Pass a selection. Use a file path, name, or label; --include and --exclude match file paths. Preview it with momentic list.    Can I split the suite across CI jobs?    Yes. Give each job a shard index and count. Web runs share a --run-group-id UUID; mobile runs merge shard artifacts with momentic-mobile results merge before uploading.    Which report formats does the CLI write?    Six for web, five for mobile. JSON, JUnit XML, Allure, Allure JSON, and Buildkite JSON work on both. Playwright JSON and the separate New Relic integration are web-only. File reporters write to --reporter-dir; live terminal reporters are separate.    Can a coding agent run these commands?    Yes. Coding agents use MCP to author and run repository tests. The CLI executes the saved YAML in the configured CI job.    Does the CLI work with my CI provider?    Yes, with prerequisites installed. The machine needs a supported Node.js version, credentials, and the selected runtime tools. Our docs include GitHub Actions, GitLab, CircleCI, Jenkins, Buildkite, and other CI systems.    Can I run tests without a browser window?    Yes. CLI runs use a headless browser. Install the local browser dependencies with momentic install-browsers, or configure hosted browser execution.    Can I get a video of one test run?    Yes. Pass --video true to keep video for successful runs too. The default on-fail setting retains video only when the test fails.    How do I pass secrets and environment variables to a run?    Use environment configuration. Reference values from your shell, an uncommitted env file, or the CI secret store. The selected environment supplies variables to the test.    Can a CI job run mobile tests from the command line?    Yes. Run momentic-mobile against a local or hosted device. Local simulators and emulators need their platform toolchains; hosted Android still needs adb and an SDK path.    How do I run against a preview deployment?    Use --url-override. Pass the preview URL to momentic run. Use --start and --wait-on when your job also starts the application server.

Still have additional questions?

## Try Mo on your app.

Mo is an AI QA engineer. It tests your running app and files each bug with repro steps. Free to start, no credit card.

[Try for free](https://app.momentic.ai/signup) [Get a demo](/sales)
