Skip to main content

maskflow-cli

Command-line interface for MaskFlow:

maskflow config validate
maskflow config show --resolved
maskflow doctor
maskflow explain "<text>"
maskflow scan jsonl requests.jsonl --field 'messages[].content'

maskflow doctor checks installed versions, spaCy model presence (and which entities that consequently disables), and .maskflowrc validity, then reports enabled/disabled status for every registered entity. It exits 0 only when every check passes.

maskflow explain "<text>" shows, span by span, why each piece of text was (or wasn't) detected as PII -- the pattern/NER hit, checksum result, context boost, and the threshold decision behind it. Spans that scored below their entity's threshold are listed separately as NEAREST MISSES, with the .maskflowrc change that would catch them. Matched text is truncated to 8 characters unless --full is passed. Accepts the same --config/--set overrides as maskflow config, so explanations reflect the same resolved config a real mask() call would use.

maskflow scan -- what PII already reached your LLM providers

maskflow scan SOURCE ... answers the question a DPDP-deadline audit asks first: what PII has this system already sent to third-party LLM providers, and how bad is it? It reads your historical LLM traffic, runs MaskFlow's own detection over it, and writes one self-contained HTML report -- inline CSS/JS, zero external requests, so it prints cleanly and can be emailed to an auditor as-is.

Features

  • Eight source adapters, one interface: jsonl / ndjson (with --field selectors), csv (--columns), dir (recursive), s3 (streamed), postgres (server-side cursor), and the langfuse / helicone / langsmith REST APIs. s3 and postgres need the maskflow-cli[s3] / [postgres] extras; the rest need nothing extra.
  • Streaming, bounded memory -- inputs can be gigabytes. --workers N parallelises detection; --checkpoint FILE makes a run resumable; --sample N is a fast first pass.
  • Hybrid detection. The pattern/checksum pass (Aadhaar, PAN, GSTIN, UPI, IFSC, cards, email, ...) covers the whole corpus. The NER pass (bare names & addresses) runs on a sample and is reported as a clearly labelled estimate -- pass --deep to run it over everything.
  • The report: one headline number, breakdowns by entity type / provider / model / time, a severity ranking with a plain-English "why this matters" per row, masked excerpts only (values shown as <AADHAAR_1>, never raw), and a DPDP Rule 6 mapping appendix. Also --format json|csv.
  • Runs entirely locally. Nothing is transmitted. The API sources only read from your own observability account.

Try it -- a synthetic 60-record sample ships in examples/:

uv run maskflow scan jsonl packages/maskflow-cli/examples/sample-llm-traffic.jsonl \
  --field 'messages[].content' \
  --provider-field provider --service-field model --timestamp-field created_at \
  --deep --out exposure-report.html

Notes: uv run runs the CLI from the workspace venv -- drop it if maskflow-cli is on your PATH (pipx install maskflow-cli). Quote the --field value: messages[].content contains [], which the shell would otherwise try to expand.

Install it -- four ways, see packaging/ and docs/scan.md:

NER (names/addresses/DOB)
pipx install maskflow-cli + python -m spacy download en_core_web_sm yes
docker run --rm -v "$PWD:/work" ghcr.io/maskflow/cli scan ... yes, baked in
standalone binary (GitHub Releases, no Python) no -- pattern pass only
maskflow/scan-action for CI yes

Then open exposure-report.html. See examples/README.md for a walk-through of the output, and docs/scan.md for the full reference.

See docs/configuration.md in the repo root for the full config reference.

Metadata

Release files for maskflow-cli 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maskflow-cli 0.10.0
File Size Uploaded Provenance Actions
maskflow_cli-0.10.0.tar.gz 81.2 kB With provenance Details for maskflow_cli-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for maskflow-cli 0.10.0
File Interpreter ABI Platform Actions
maskflow_cli-0.10.0-py3-none-any.whl Python 3 none any Details for maskflow_cli-0.10.0-py3-none-any.whl

Total release size: 161.9 kB

Release files / maskflow_cli-0.10.0.tar.gz

Download URL maskflow_cli-0.10.0.tar.gz
Size 81.2 kB
Tags Source
SHA-256 checksum
How to use checksums
99bb71ae5c27a7a73504b9222b333d1a31b9295d21b16fce2c2c73a50d81cf29
BLAKE2b-256 checksum
How to use checksums
d9aff5e47ffd52e5b3543ed52ccbb4c49dac948a876568c032890a74cda82c9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / maskflow_cli-0.10.0-py3-none-any.whl

Download URL maskflow_cli-0.10.0-py3-none-any.whl
Size 80.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e95e3f3f7818301132fe4f1a08433b3d5823e90a43d873275d09d76bbd2174a5
BLAKE2b-256 checksum
How to use checksums
b27dd42bdc8c37e9e24b2a778022ede8a4511f5b261c5724a7a091e007284cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for maskflow-cli 0.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for maskflow_cli-0.10.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page