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

> Validate Momentic tests, modules, and config files.

Static checks over the local project. Use these in pre-commit hooks or CI to
catch duplicate IDs and config drift before runs.

For schema, file-reference, and entity ID validation of simplified format YAML,
see [`momentic lint`](/cli-reference/momentic/commands/lint).

## `duplicate-ids`

Detect duplicate step and command IDs across tests and modules. For simplified
format projects, this delegates to
[`momentic lint`](/cli-reference/momentic/commands/lint).

```bash theme={null}
npx momentic check duplicate-ids
```

### Options

<ParamField path="--fix" type="boolean">
  Rename duplicate IDs in place to make them unique.
</ParamField>

## `duplicate-names`

Detect duplicate test and module names so every entity is uniquely identifiable.

```bash theme={null}
npx momentic check duplicate-names
```

## `unused`

Report modules that are not referenced by any test, directly or transitively
through other modules. Useful for finding `.module.yaml` files left orphaned
after tests are deleted or refactored. Exits non-zero when unused modules are
found.

```bash theme={null}
npx momentic check unused
```

## `config`

Validate `momentic.config.yaml` against the configuration schema.

```bash theme={null}
npx momentic check config
```

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

## Examples

Detect and auto-fix duplicate IDs:

```bash theme={null}
npx momentic check duplicate-ids --fix
```
