Skip to content

CLI

The anonymize command works both with and without arguments.

Without arguments — launch the web UI

Terminal window
anonymize

Opens your default browser at http://127.0.0.1:<port>. Same as the web UI flow.

With a file — batch process

Terminal window
anonymize redact path/to/contract.docx -o path/to/contract.anonymized.docx

Redacts the input file using P0 defaults and writes to the output path. Exit code 0 on success, non-zero on any I/O or parsing error.

Flags:

FlagPurpose
-o, --output PATHOutput path (default: alongside input with .anonymized.<ext> suffix)
--categories CAT1,CAT2Restrict to specific categories. Default: P0+P1
--lang LANGForce language pack (ru / en). Default: autodetect
--no-metadata-clearDon’t strip metadata (debug only)
--report PATHEmit a JSON report of detected entities (categories + offsets, no raw values)
-v, --verboseEnable info-level logs

Subcommands

SubcommandPurpose
anonymize redact FILEProcess a single file
anonymize testkit run --corpus DIRRun the testkit against a golden corpus (CI mode)
anonymize feedback exportExport the feedback log as JSON to stdout
anonymize feedback clearWipe the local feedback log

Examples

Redact all .docx in a folder:

Terminal window
for f in *.docx; do anonymize redact "$f"; done

Redact and emit a report (no raw PII in the report):

Terminal window
anonymize redact contract.docx -o contract.anonymized.docx --report contract.report.json

The --report output is safe to share — it contains category counts and offset positions but no entity text.