Skip to main content

Pasteval

Pasteval is a small command-line tool that redacts sensitive information from text before you paste it into an AI tool or any other external service.

It runs entirely on your computer. No account, no API key, no network access, and no dependencies beyond Python itself.

Why use it

When you paste a log, an email, or a config snippet into a chatbot, it is easy to include something you did not mean to share. Pasteval replaces what it recognizes with a placeholder, so the text stays useful and the value stays private.

Install

Pasteval needs Python 3.11 or newer. Install it from source:

git clone <this repository>
cd pasteval
pip install -e .

Usage

Paste text interactively, then press Ctrl+D on a new line to finish (Ctrl+Z then Enter on Windows):

pasteval

Pipe text in:

cat notes.txt | pasteval

Read a file:

pasteval --file notes.txt

Other options:

pasteval --help
pasteval --version

The redacted text is written to standard output. A short summary (types and counts only, never the values) is written to standard error, so you can pipe the output safely, for example pasteval --file notes.txt | pbcopy on macOS.

Example

Input:

Hi, I'm Alex.
My email is alex@example.com.
Please copy sam@example.com, and reply to alex@example.com.

Output:

Hi, I'm Alex.
My email is [EMAIL_1].
Please copy [EMAIL_2], and reply to [EMAIL_1].

The same value always gets the same placeholder, so the text still makes sense.

What is redacted

Type Placeholder
Email addresses [EMAIL_1], [EMAIL_2], ...

Security limitations

Pasteval reduces the risk of accidental sharing. It does not guarantee it.

  • It can miss things (false negatives). Anything not listed above is left as it is, including names, postal addresses, passwords, and API keys.
  • Email addresses containing non-English characters are not detected.
  • It can occasionally redact something harmless (false positives).
  • Text you paste into a terminal may remain in the terminal's scrollback.
  • Always read the output before you share it.

Pasteval never sends your text anywhere, never saves it, and never prints the original values in its messages. If something goes wrong it prints an error and no text at all.

Development

pip install -e ".[dev]"
pytest

Detection rules live in src/pasteval/rules.py. To add one, add a Rule to the RULES list and write tests for it.

License

MIT. See LICENSE.

Metadata

Release files for pasteval 0.0.1

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

Source distribution (sdist)

Source distribution for pasteval 0.0.1
File Size Uploaded Provenance Actions
pasteval-0.0.1.tar.gz 11.2 kB Without provenance Details for pasteval-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pasteval 0.0.1
File Interpreter ABI Platform Actions
pasteval-0.0.1-py3-none-any.whl Python 3 none any Details for pasteval-0.0.1-py3-none-any.whl

Total release size: 19.6 kB

Release files / pasteval-0.0.1.tar.gz

Download URL pasteval-0.0.1.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1caaec75109ac1e8c7cab97ae472c7411d95bdc46167819ab3d5a25baa829569
BLAKE2b-256 checksum
How to use checksums
7ed1457d6a522ecdad4db09c1df322b40e23301e1e85086d06a20fc398caeaf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / pasteval-0.0.1-py3-none-any.whl

Download URL pasteval-0.0.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87ee1deed777cb9eb8ce4dfc433a470a1505c25d1869ec5c53b277135ff1ebea
BLAKE2b-256 checksum
How to use checksums
38dca159bfec232e1c2471a912851ac120a14225a01be0bc1a094efcb608df0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for pasteval 0.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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