CLI Reference

View as Markdown

This reference covers the nemo anonymizer commands exposed by the Anonymizer plugin. For end-to-end walkthroughs, see the tutorials.

Command Surface

CommandDescription
nemo anonymizer validateValidate an AnonymizerConfig (and optional model_configs).
nemo anonymizer previewRun a streaming preview through the Anonymizer plugin service.
nemo anonymizer runSubmit 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.

$nemo anonymizer validate \
> --config /tmp/anonymizer-config.yaml \
> [--model-configs /tmp/anonymizer-model-configs.yaml]
FlagRequiredDescription
--configyesPath to the AnonymizerConfig YAML.
--model-configsnoOptional 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

$nemo anonymizer preview \
> --spec-file /tmp/anonymizer-preview.yaml \
> --workspace "${NMP_WORKSPACE:-default}" \
> --base-url "${NMP_BASE_URL:-http://localhost:8080}"
FlagDescription
--spec-filePath to the PreviewRequest YAML or JSON.
--workspaceWorkspace used for fileset resolution and Inference Gateway providers.
--base-urlPlugin-service base URL.
--request-idOptional 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

$nemo anonymizer run \
> --spec-file /tmp/anonymizer-run.yaml \
> --workspace "${NMP_WORKSPACE:-default}" \
> --base-url "${NMP_BASE_URL:-http://localhost:8080}"
FlagDescription
--spec-filePath to the AnonymizerRequest YAML.
--workspaceWorkspace used for fileset resolution, Inference Gateway providers, and job placement.

Run source kinds

Formrun
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:

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

$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}"
1job = sdk.anonymizer.get_job_resource("anonymizer-run-2026-05-12-abc123")
2job.wait_until_done()
3results = job.download_artifacts()
4dataset = results.load_dataset()

See 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:

FieldTypeRequiredNotes
configAnonymizerConfigyesLibrary config. See the library docs.
data.sourcestringyeshttp(s) URL or fileset reference.
data.text_columnstringnoDefaults to text.
data.id_columnstringnoOptional record identifier column.
data.data_summarystringnoOptional short description of the data.
model_configslist of Data Designer ModelConfigyesRequired so execution routes through NeMo Platform Inference Gateway.
selected_modelsobject with detection / replace / rewritenoRole 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:

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.