CLI
The anonymize command starts the local web UI by default and exposes a few subcommands for specific scenarios.
Default — launch the web UI
anonymizeOpens your default browser at http://127.0.0.1:<port>. Same as the web UI flow.
Flags accepted by the default mode:
| Flag | Purpose |
|---|---|
-V, --version | Print the installed version and exit |
--strict | Enable strict mode (risky warnings block download) |
--no-update-check | Skip the startup version probe (see Updates) |
Process a single file (no UI)
anonymize path/to/contract.docx -o path/to/contract.anonymized.docxPass 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.
| Flag | Purpose |
|---|---|
-o, --output PATH | Output path. Default: alongside the input with .anonymized.<ext> suffix. For .rtf input the output is always .docx. |
Subcommands
| Subcommand | Purpose |
|---|---|
anonymize serve [--port N] [--strict] [--no-update-check] | Start the web UI explicitly. Pick a port or accept the random default. |
anonymize stop | Stop the running web UI (terminates the process recorded in ~/.anonymizer/run.pid). |
anonymize update | Synchronous 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:
for f in *.docx; do anonymize "$f"; doneDiagnose a flaky install on an offline machine:
anonymize doctor --no-networkStart the UI on a specific port without the update banner:
anonymize serve --port 8765 --no-update-check