---
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-10-09T17:17:31-07:00"
---

# Run verification wherever you build.

URL: https://momentic.ai/cli

platform   / cli

Check a change from your terminal, then run the same tests in CI. The interactive editor and MCP give you and your coding agent the same testing tools.

[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.

## Write it locally. Run it in your pipeline.

Use the interactive editor or your coding agent to author a test. The CLI runs the saved YAML in your terminal and in CI, with evidence you can inspect when it fails.

Run smoke tests and export JUnit bash

```bash
npx momentic list --labels smoke
npx momentic run --labels smoke \
  --parallel 4 \
  --reporter junit \
  --reporter-dir reports \
  --output-dir test-results \
  --upload-results
```

Run after installing and authenticating the web CLI, installing a browser runtime, and adding the smoke label to the intended tests. JUnit files go to reports; screenshots and logs go to test-results.

### Debug an interaction before a full run

Use the local editor to inspect your app and execute individual steps. Check the screenshot and expected result as you author, then save the test in your repository.

### Give coding agents live feedback

MCP lets your coding agent inspect a running app, try an interaction, and execute the test it writes. Your engineers review the YAML beside the application change.

### Focus on the affected behavior

Run a selected file or label while developing. AI test selection uses a code diff and index to identify affected tests; compare selections against full-suite runs before using them as a gate.

### Investigate the failure from CI

Keep screenshots, step results, and retained video with a failed run. Export reports for your pipeline and upload results when your team needs to investigate the same evidence together.

Read the docs

- [Run command and flags](/docs/cli-reference/momentic/commands/run)
- [AI test selection](/docs/ai/select)
- [Results and reporters](/docs/running-tests/results)

## 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.

“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

30 min

daily test execution, down from 7 hours

500+

manual test cases replaced

100%

critical tests created in one month

[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)

[85%   reduction in production incidents   "Momentic gives us reliable end-to-end coverage, so we can focus on features instead of maintaining tests."  Alec H. Staff AI Engineer, Mutiny](/customers/mutiny)

[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?

## Verify what you ship.

Run your first test, or book a demo using your app.

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