Commands
expunct redact
Redact PII from text, files, or URIs.
Usage
# Inline text
expunct redact --text "Call me at 555-1234"
# File
expunct redact notes.txt
# Binary file (PDF, DOCX, images, video, audio)
expunct redact scan.pdf --output redacted_scan.pdf
# Cloud URI
expunct redact --uri "gs://my-bucket/file.txt"
# Stdin
cat file.txt | expunct redactOptions
| Flag | Description |
|---|---|
--text, -t | Inline text to redact |
FILE | Path to a file to redact (positional argument) |
--uri, -u | Cloud URI to redact (S3, GCS) |
--output, -o | Output file path (required for binary formats) |
--language, -l | Language code (default: en) |
--policy-id, -p | Policy ID to apply |
--json | Output raw JSON instead of formatted text |
--wait/--no-wait | Wait for URI jobs to complete (default: --wait) |
--timeout | Wait timeout in seconds (default: 300) |
Examples
# Redact with a specific policy
expunct redact --text "My SSN is 123-45-6789" --policy-id pol_abc123
# Redact and get JSON output
expunct redact --text "My SSN is 123-45-6789" --json
# Redact a cloud file without waiting
expunct redact --uri "s3://my-bucket/file.txt" --no-wait
# Pipe redacted text to another command
cat logs.txt | expunct redact | grep "ERROR"expunct detect
Detect PII entities without redacting. Shows entity type, value, confidence, and location.
Usage
# Inline text
expunct detect --text "My name is Jane Doe and my SSN is 123-45-6789"
# File
expunct detect document.txt
# Cloud URI
expunct detect --uri "gs://bucket/file.txt"
# Stdin
echo "test@email.com" | expunct detectOptions
| Flag | Description |
|---|---|
--text, -t | Inline text to analyze |
FILE | Path to a file to analyze (positional argument) |
--uri, -u | Cloud URI to analyze |
--language, -l | Language code (default: en) |
--policy-id, -p | Policy ID to apply |
--json | Output raw JSON |
Examples
# Detect and filter by entity type
expunct detect --text "Jane Doe" --json | jq '.findings[] | .entity_type'expunct jobs
Manage asynchronous redaction jobs.
expunct jobs list
List redaction jobs.
expunct jobs list
expunct jobs list --status completed --page 2| Flag | Description |
|---|---|
--status | Filter by job status |
--page | Page number |
--json | Output raw JSON |
expunct jobs get
Get details of a specific job.
expunct jobs get JOB_IDexpunct jobs download
Download the output of a completed job.
expunct jobs download JOB_ID -o output.pdf| Flag | Description |
|---|---|
-o, --output | Output file path |
expunct jobs wait
Wait for a job to complete.
expunct jobs wait JOB_ID --timeout 600| Flag | Description |
|---|---|
--timeout | Timeout in seconds (default: 300) |
expunct policies
Manage redaction policies.
expunct policies list
List all policies.
expunct policies listexpunct policies get
Get details of a specific policy.
expunct policies get POLICY_IDexpunct policies create
Create a new policy.
expunct policies create --name "strict" --confidence-threshold 0.9| Flag | Description |
|---|---|
--name | Policy name |
--confidence-threshold | Minimum confidence threshold |
expunct policies update
Update an existing policy.
expunct policies update POLICY_ID --name "updated-name"expunct policies delete
Delete a policy.
expunct policies delete POLICY_ID --yes| Flag | Description |
|---|---|
--yes | Skip confirmation prompt |
expunct audit
View audit logs.
expunct audit list
List audit log entries.
expunct audit list
expunct audit list --event-type redaction --page-size 50
expunct audit list --json| Flag | Description |
|---|---|
--event-type | Filter by event type |
--page-size | Number of entries per page |
--json | Output raw JSON |
expunct config
Manage CLI configuration. See Configuration for full details.
expunct config set
Set a configuration value.
expunct config set api_key YOUR_API_KEY
expunct config set base_url https://api.expunct.aiexpunct config get
Get a configuration value.
expunct config get base_urlexpunct config show
Show all configuration values.
expunct config showexpunct config path
Print the path to the config file.
expunct config path