CLI Commands
Full command reference for the pii-mask CLI.
mask
The primary command. Reads input, masks PII, writes output.
pii-mask <file> [options]Options
| Flag | Description | Default |
|---|---|---|
--mode | Masking mode | mask |
--format | Input format (json, csv, jsonl, txt) | auto-detect |
--output | Output file path | stdout |
--disable | Comma-separated detector IDs to disable | none |
Examples
# Mask a JSON file
pii-mask data.json --mode redact
# Mask CSV, output to file
pii-mask users.csv --mode mask --output masked-users.csv
# Pipe from stdin
cat data.json | pii-mask --format json --mode tokenizeExit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | User error (bad arguments, unsupported format) |
2 | Unexpected runtime error |