Skip to main content

Local CLI and desktop pad for redacting sensitive text before sharing prompts.

Project description

Prompt Scrub Pad

Prompt Scrub Pad is a local CLI and small desktop pad for redacting sensitive text before pasting prompts, tickets, logs, or snippets into AI tools.

It is intentionally offline-first. Text stays on your machine, and the default rule set catches common accidental disclosures: API keys, environment variable secrets, AWS access keys, private keys, email addresses, IP addresses, phone numbers, and credit-card-like numbers.

Install

python3 -m pip install prompt-scrub-pad

For local development:

python3 -m pip install -e .

CLI Usage

Scrub a file:

prompt-scrub-pad examples/support-ticket.txt

Read from stdin:

pbpaste | prompt-scrub-pad | pbcopy

Show a diff:

prompt-scrub-pad examples/support-ticket.txt --diff

Emit JSON for a preflight check:

prompt-scrub-pad prompt.txt --json --fail-on-change

Useful switches:

prompt-scrub-pad prompt.txt --redact-urls
prompt-scrub-pad prompt.txt --keep-emails
prompt-scrub-pad prompt.txt --keep-ips
prompt-scrub-pad prompt.txt --output scrubbed.txt

Desktop Pad

Launch the Tkinter pad:

prompt-scrub-gui

or:

prompt-scrub-pad --gui

Paste text into the top area, choose which rules are active, scrub, and copy the cleaned result from the bottom area.

Python API

from prompt_scrub_pad import ScrubProfile, scrub_text

result = scrub_text(
    "Send to jane@example.com with OPENAI_API_KEY=sk-abc123456789012345678901234",
    ScrubProfile(redact_urls=True),
)

print(result.text)
print(result.findings)

Configuration

Prompt Scrub Pad currently uses command flags and the ScrubProfile Python object for configuration. The defaults favor prompt-sharing safety while leaving URLs visible unless --redact-urls is set.

Development

python3 -m pip install -e .
python3 -m pytest
python3 -m build --no-isolation
python3 -m twine check dist/*

Contributing

Issues and pull requests are welcome. Keep rules explainable, deterministic, and local. New detectors should include tests covering both redaction and an opt-out path where appropriate.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prompt_scrub_pad-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prompt_scrub_pad-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file prompt_scrub_pad-0.1.0.tar.gz.

File metadata

  • Download URL: prompt_scrub_pad-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for prompt_scrub_pad-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d920a15396702ebf6549a142cee2b378d6bfeb0da042f34c225ad916febfff4
MD5 ff691313240961d2de441fc9ba909126
BLAKE2b-256 652cfb54d76e14b2649d55fb44e0b44f4816599c2ec97aff6c15b81783b71d38

See more details on using hashes here.

File details

Details for the file prompt_scrub_pad-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prompt_scrub_pad-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93593cfac5b0951cddf0b408e36cc1864808bbc0199aa17d53a38715059c8a2b
MD5 82cf05c435cbbd1fc1a3fce9965504e7
BLAKE2b-256 6040db88800022001bd12791dc8ac3cb698323abebc741abd35c76f73ea9325b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page