> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo-platform/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo-platform/_mcp/server.

# CLI Reference

This reference covers the `nemo anonymizer` commands exposed by the Anonymizer plugin. For end-to-end walkthroughs, see the [tutorials](/documentation/anonymize-data/tutorials).

## Command Surface

| Command                    | Description                                                      |
| -------------------------- | ---------------------------------------------------------------- |
| `nemo anonymizer validate` | Validate an `AnonymizerConfig` (and optional `model_configs`).   |
| `nemo anonymizer preview`  | Run a streaming preview through the Anonymizer plugin service.   |
| `nemo anonymizer run`      | Submit an `anonymizer.run` job to the NeMo Platform Jobs worker. |

## `nemo anonymizer validate`

Validate an `AnonymizerConfig` YAML file against the model selection. Useful for catching `Substitute`-without-`replacement_generator` and similar misconfigurations before submitting a request.

```bash
nemo anonymizer validate \
  --config /tmp/anonymizer-config.yaml \
  [--model-configs /tmp/anonymizer-model-configs.yaml]
```

| Flag              | Required | Description                                                                                              |
| ----------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `--config`        | yes      | Path to the `AnonymizerConfig` YAML.                                                                     |
| `--model-configs` | no       | Optional path to a model-configs YAML to validate alongside the config (same shape the library expects). |

The command does not accept `data.source`. Input-source validation happens during preview or run execution.

## `nemo anonymizer preview`

```bash
nemo anonymizer preview \
  --spec-file /tmp/anonymizer-preview.yaml \
  --workspace "${NMP_WORKSPACE:-default}" \
  --base-url "${NMP_BASE_URL:-http://localhost:8080}"
```

| Flag           | Description                                                            |
| -------------- | ---------------------------------------------------------------------- |
| `--spec-file`  | Path to the `PreviewRequest` YAML or JSON.                             |
| `--workspace`  | Workspace used for fileset resolution and Inference Gateway providers. |
| `--base-url`   | Plugin-service base URL.                                               |
| `--request-id` | Optional `X-Request-ID` header value for tracing the request.          |

`preview` calls the plugin service and streams NDJSON frames to stdout. It rejects local file paths in `data.source` (use a fileset reference or `http(s)` URL) and requires explicit `model_configs`.

## `nemo anonymizer run`

```bash
nemo anonymizer run \
  --spec-file /tmp/anonymizer-run.yaml \
  --workspace "${NMP_WORKSPACE:-default}" \
  --base-url "${NMP_BASE_URL:-http://localhost:8080}"
```

| Flag          | Description                                                                            |
| ------------- | -------------------------------------------------------------------------------------- |
| `--spec-file` | Path to the `AnonymizerRequest` YAML.                                                  |
| `--workspace` | Workspace used for fileset resolution, Inference Gateway providers, and job placement. |

### Run source kinds

| Form                                  | `run` |
| ------------------------------------- | ----- |
| HTTP(S) URL (`https://.../input.csv`) | yes   |
| Fileset reference (`fs#path`)         | yes   |

### Run output

`run` submits an `anonymizer.run` job to the Jobs service and prints the assigned job name and submit endpoint:

```text
  |-- job name: anonymizer-run-2026-05-12-abc123
  |-- submit endpoint: /apis/anonymizer/v2/workspaces/default/jobs/run
{"name": "anonymizer-run-2026-05-12-abc123", ...}
```

Track and pull artifacts using either the standard `nemo jobs ...` commands or the Python SDK:

```bash
nemo jobs get-status anonymizer-run-2026-05-12-abc123 --workspace "${NMP_WORKSPACE:-default}"
nemo jobs get-logs anonymizer-run-2026-05-12-abc123 --workspace "${NMP_WORKSPACE:-default}"
```

```python
job = sdk.anonymizer.get_job_resource("anonymizer-run-2026-05-12-abc123")
job.wait_until_done()
results = job.download_artifacts()
dataset = results.load_dataset()
```

See [SDK Resources](/documentation/anonymize-data/sdk-resources) for the full `AnonymizerJobResource` / `AnonymizerJobResults` surface.

`run` rejects local file paths in `data.source` (use a fileset reference or `http(s)` URL) and requires explicit `model_configs` because the job runs outside the CLI process.

## Spec File Reference

Run specs use the `AnonymizerRequest` shape. Preview specs use the same fields plus `num_records`:

| Field               | Type                                            | Required | Notes                                                                                             |
| ------------------- | ----------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------- |
| `config`            | `AnonymizerConfig`                              | yes      | Library config. See the [library docs](https://github.com/NVIDIA-NeMo/Anonymizer/tree/main/docs). |
| `data.source`       | string                                          | yes      | `http(s)` URL or fileset reference.                                                               |
| `data.text_column`  | string                                          | no       | Defaults to `text`.                                                                               |
| `data.id_column`    | string                                          | no       | Optional record identifier column.                                                                |
| `data.data_summary` | string                                          | no       | Optional short description of the data.                                                           |
| `model_configs`     | list of Data Designer `ModelConfig`             | yes      | Required so execution routes through NeMo Platform Inference Gateway.                             |
| `selected_models`   | object with `detection` / `replace` / `rewrite` | no       | Role overrides on top of bundled defaults. Requires `model_configs`.                              |

## Fileset Reference Forms

The `data.source` field accepts three fileset forms; the workspace and fileset must already exist:

```text
fileset://<workspace>/<fileset>#<path>
<workspace>/<fileset>#<path>
<fileset>#<path>
```

The `#<path>` fragment must resolve to a single `.csv` or `.parquet` file. The plugin downloads the file before constructing the Anonymizer library input.