Skip to Content
CLICommands

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 redact

Options

FlagDescription
--text, -tInline text to redact
FILEPath to a file to redact (positional argument)
--uri, -uCloud URI to redact (S3, GCS)
--output, -oOutput file path (required for binary formats)
--language, -lLanguage code (default: en)
--policy-id, -pPolicy ID to apply
--jsonOutput raw JSON instead of formatted text
--wait/--no-waitWait for URI jobs to complete (default: --wait)
--timeoutWait 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 detect

Options

FlagDescription
--text, -tInline text to analyze
FILEPath to a file to analyze (positional argument)
--uri, -uCloud URI to analyze
--language, -lLanguage code (default: en)
--policy-id, -pPolicy ID to apply
--jsonOutput 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
FlagDescription
--statusFilter by job status
--pagePage number
--jsonOutput raw JSON

expunct jobs get

Get details of a specific job.

expunct jobs get JOB_ID

expunct jobs download

Download the output of a completed job.

expunct jobs download JOB_ID -o output.pdf
FlagDescription
-o, --outputOutput file path

expunct jobs wait

Wait for a job to complete.

expunct jobs wait JOB_ID --timeout 600
FlagDescription
--timeoutTimeout in seconds (default: 300)

expunct policies

Manage redaction policies.

expunct policies list

List all policies.

expunct policies list

expunct policies get

Get details of a specific policy.

expunct policies get POLICY_ID

expunct policies create

Create a new policy.

expunct policies create --name "strict" --confidence-threshold 0.9
FlagDescription
--namePolicy name
--confidence-thresholdMinimum 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
FlagDescription
--yesSkip 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
FlagDescription
--event-typeFilter by event type
--page-sizeNumber of entries per page
--jsonOutput 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.ai

expunct config get

Get a configuration value.

expunct config get base_url

expunct config show

Show all configuration values.

expunct config show

expunct config path

Print the path to the config file.

expunct config path