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

# momentic list

> List local Momentic tests matching a pattern or label.

Prints one test file path per line for every test in the current project that
matches the provided filters. Intended to be piped into other commands. Requires
tests to exist locally as YAML files.

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

## Arguments

<ParamField path="[tests...]" type="array">
  Tests to list, given as test file paths, directories, or test-name substrings.
  Defaults to every test in the current project.
</ParamField>

## Common flags

<ParamField path="-c, --config <config>" type="string">
  Path to the Momentic configuration file. Defaults to `momentic.config.yaml` in
  the current directory.
</ParamField>

<ParamField path="-f, --filter <filter>" type="string">
  When using [workspaces](/docs/configuration/workspace), load the project whose name
  matches the filter.
</ParamField>

## Filtering

<ParamField path="--labels <labels...>" type="array">
  Only list tests with one of the specified labels.
</ParamField>

<ParamField path="--include <includePatterns...>" type="array">
  Only include tests whose file path matches any of the provided regex patterns.
  The pattern only needs to match part of the path.
</ParamField>

<ParamField path="--exclude <excludePatterns...>" type="array">
  Exclude tests whose file path matches any of the provided regex patterns.
</ParamField>

<ParamField path="--changed" type="boolean">
  Only list tests changed against the base branch: changed test files plus tests
  that use a changed module (it lists those affected tests, not the module
  files). The base branch is auto-detected from the CI pull request, or
  `origin/HEAD`. Requires the checkout to have full git history. Pipe into `run`
  to re-run only what a [Momentic
  auto-heal](/docs/reliability/auto-maintenance#permanent-healing) PR touched.
</ParamField>

## Examples

List every test in the project:

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

List tests under a specific folder:

```bash theme={null}
npx momentic list tests/checkout
```

List tests with the `smoke` label, then pipe into `run`:

```bash theme={null}
npx momentic list --labels smoke | xargs npx momentic run
```

Validate an auto-heal PR by running only the tests it changed:

```bash theme={null}
npx momentic list --changed | xargs -r npx momentic run --upload-results
```
