VG-DOC · rev 0.1.0PII / DLP redaction firewall for LLM pipelinesMIT · Node 22+
VeilgateDocumentation
Flow 10 / 14PackagesCommand line15 tests

CLI — veilgate-cli

The Veilgate command-line tool — redact text or stdin, and benchmark a policy against a labeled dataset for precision, recall and latency.

veilgate-cli provides the veilgate command. 15 tests.

terminal
npm install -g veilgate-cli
# or run without installing:
npx veilgate-cli redact "..."

Usage

Plaintext
usage: veilgate <command> [options]

commands:
  redact [text]        redact TEXT (or stdin when omitted) and print the result
  bench  <file.jsonl>  benchmark a policy against a labeled dataset

options:
  --policy <name>   balanced | gdpr-strict | hipaa-safe-harbor | soc2-secrets  (default: balanced)
  --mode <mode>     mock | live  (default: mock)
  --json            emit JSON instead of a human-readable report

redact

veilgate --help
veilgate redact "email Alice Johnson, ssn 123-45-6789"
echo "the admin password is hunter2" | veilgate redact --policy soc2-secrets
veilgate redact "My name is Alice Johnson." --json

With no text argument, it reads from stdin — so it drops into a shell pipeline.

bench

Benchmark a policy against a labeled .jsonl dataset and report precision, recall and p50/p95 latency:

terminal
veilgate bench apps/cli/fixtures/sample.jsonl
veilgate bench apps/cli/fixtures/sample.jsonl --policy gdpr-strict --json

The repo ships apps/cli/fixtures/sample.jsonl to try it against.

Tip

bench runs in mock mode by default, so you can compare presets deterministically before spending anything against a live Jev key.