Skip to Content
CLIOverview

Expunct CLI

The Expunct CLI lets you redact, detect, and manage PII from the command line. It wraps the Expunct API and is designed for both developers and AI agents.

Requirements

  • Python 3.10 or later

Installation

pip install expunct-cli

Quick Example

expunct redact --text "John Smith email john@gmail.com"

Output:

PERSON_1 email EMAIL_1

How It Works

CLI (expunct-cli) Expunct Python SDK Expunct API

The CLI uses the Expunct Python SDK under the hood to communicate with the Expunct API. All processing happens server-side — the CLI handles input/output and formatting.

Features

  • Text redaction — redact inline text with --text or via stdin piping
  • File redaction — redact text files, PDFs, DOCX, images, video, and audio
  • URI redaction — redact files stored in cloud storage (S3, GCS)
  • Detect mode — detect PII entities without modifying the text
  • Job management — list, get, download, and wait for async redaction jobs
  • Policy management — create and manage redaction policies
  • Audit logs — view audit trail of redaction activity
  • JSON output — machine-readable output with --json for scripting and AI agents
  • Stdin piping — chain with other CLI tools (cat logs.txt | expunct redact)

Next Steps