> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Running locally

> Run Momentic tests on your own machine for fast feedback during development.

Both the `momentic` and `momentic-mobile` CLIs run tests locally without
uploading results anywhere unless you explicitly opt in.

## Basic usage

<CodeGroup>
  ```bash Web theme={null}
  npx momentic run example-test
  ```

  ```bash Mobile theme={null}
  npx momentic-mobile run example-test
  ```
</CodeGroup>

Run all tests matching a glob by omitting the test name:

```bash theme={null}
npx momentic run
```

## Selecting tests

* **By name**, `npx momentic run login-flow`
* **By file**, `npx momentic run tests/auth/login.test.yaml`
* **By label**: add `labels:` in a test's YAML, then
  `npx momentic run --labels smoke`

Use [`npx momentic list`](/cli-reference/momentic/commands/list) to preview
which tests match a pattern before running.

## Parallelism

Set [`parallel`](/configuration/momentic-config#parallel) in
`momentic.config.yaml` to run multiple tests concurrently. The default is `1`.

```yaml momentic.config.yaml theme={null}
parallel: 4
```

Override per-run:

```bash theme={null}
npx momentic run --parallel 4
```

See [Performance](/running-tests/performance) for tuning guidance.

## Picking an environment

Define [environments](/configuration/environments) in your config (e.g., `dev`,
`staging`, `local`), then pick one at run time:

```bash theme={null}
npx momentic run --env staging
```

## Watching for changes

During development, the [local editor](/cli-reference/momentic/commands/app)
gives a tighter feedback loop than `run`. Use `run` when you want reproducible
pipeline-style execution.

## Uploading to the dashboard

By default local runs stay local. To upload results, pass `--upload-results` (or
the matching flag for your CLI), see
[Results & reporting](/running-tests/results).
