Skip to content

CLI

The anonymize command starts the local web UI by default and exposes a few subcommands for specific scenarios.

Default — launch the web UI

Terminal window
anonymize

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

Flags accepted by the default mode:

FlagPurpose
-V, --versionPrint the installed version and exit
--strictEnable strict mode (risky warnings block download)
--no-update-checkSkip the startup version probe (see Updates)

Process a single file (no UI)

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

Pass a file as the positional argument to run the pipeline without launching a browser. Accepted inputs: .docx, .xlsx, .pdf, .txt, .md, .csv, .html, .htm, .rtf. Exit code 0 on success, non-zero on I/O or parsing errors. Scanned and hybrid PDFs work here too when anonymize doctor --no-network reports Tesseract OCR ready.

FlagPurpose
-o, --output PATHOutput path. Default: alongside the input with .anonymized.<ext> suffix. For .rtf input the output is always .docx.

Subcommands

SubcommandPurpose
anonymize serve [--port N] [--strict] [--no-update-check]Start the web UI explicitly. Pick a port or accept the random default.
anonymize stopStop the running web UI (terminates the process recorded in ~/.anonymizer/run.pid).
anonymize updateSynchronous wrapper around uv tool upgrade --reinstall-package docs-anonymizer docs-anonymizer. Streams uv’s output.
anonymize doctor [--fix] [--no-network]Single-shot installation health check. Verifies Python version, package presence, Tesseract OCR readiness, broken updater state, and network probe. Exit code 0 if required checks pass, 1 if any fail.
anonymize annotate ...Manual annotation tooling (prep / comp / rend subcommands). Intended for QA workflows.
anonymize testkit ...Run the golden-corpus testkit. Intended for development and CI.

Examples

Process every .docx in a folder:

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

Diagnose a flaky install on an offline machine:

Terminal window
anonymize doctor --no-network

Start the UI on a specific port without the update banner:

Terminal window
anonymize serve --port 8765 --no-update-check