Skip to main content

mask4llm

A terminal user interface (TUI) tool to safely mask and unmask sensitive data before interacting with large language models (LLMs). Built with Textual, it lets you obfuscate protected fields in your data before sending to an LLM, and then restore the originals after receiving the LLM's response.

Features

  • Mask sensitive info (names, emails, etc.) before sending prompts to LLMs.
  • Unmask LLM output swap masked placeholders back after processing.
  • Modern TUI built with Textual, with easy navigation.
  • Clipboard support via pyperclip.
  • Simple installation, cross-platform support.

Installation

Install via pip (PyPI):

pip install mask4llm

Or, if using the uv package manager:

uv pip install mask4llm

Once installed, launch the app with:

mask4llm

Development Setup

This project is managed with uv and uses Just for dev tasks. The dev dependencies include basedpyright, ruff, pytest, and pre-commit.

  1. Clone the repository and install Just and uv
git clone https://github.com/hemanthhari2000/mask4llm.git
cd mask4llm
# Install uv and just using your OS/package manager
  1. Sync the Development Environment
just install
# or, directly:
uv sync

This sets up .venv and installs all runtime and [dev] dependencies.

  1. Run App in Development
uv run mask4llm

Common Just Commands

Command Description
just install Sync env & install all dependencies
just update Upgrade all dependencies
just lint Run Ruff for linting (with autofix)
just format Run Ruff for formatting
just typing Type-check with basedpyright
just test Run all tests with pytest
just pre-commit Run pre-commit hooks
just clean Complete cleanup (caches, pyc files, venv)
just fresh Clean and reinstall all dependencies
just all-dev Run lint, format, and type-check (fast dev check)

Usage/Examples

  • Mask Data:

    • Paste or type sensitive data, run mask, and copy masked output to LLM prompt.
  • Unmask Output:

    • Paste LLM output, run unmask, and restore sensitive data.

Details and instructions are shown in the TUI footer and help screens.

Contributing

Contributions are welcome! Please open issues or PRs as needed. Run all checks before submitting:

just all-dev && just test

License

This project is licensed under the MIT license. See LICENSE file for details.

Acknowledgements

Metadata

Release files for mask4llm 1.0.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 mask4llm 1.0.0
File Size Uploaded Provenance
mask4llm-1.0.0.tar.gz 35.0 kB With provenance Details

Built distribution (wheel)

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

Total release size: 42.5 kB

Release files / mask4llm-1.0.0.tar.gz

Download URL mask4llm-1.0.0.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7a9ba95afc313c9d72a37eba829d989d71411ecc453a3430ce3318dcc8223e11
BLAKE2b-256 checksum
How to use checksums
f4cd615506794142e9fe4ed1d98138ed8b37eec436873e5b91e4fe9d4b2e1a4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Aug 3, 2025.

Transparency log

Release files / mask4llm-1.0.0-py3-none-any.whl

Download URL mask4llm-1.0.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ee023d5c08282fb37104353e9cb3d28c8fd3a742a2cd80012b450fa96ba0633
BLAKE2b-256 checksum
How to use checksums
a9e31da14ea643fa799f79d477e5c783f4f25e7e5208d0419af7f21968dd2fc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Aug 3, 2025.

Transparency log

Security for mask4llm 1.0.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mask4llm-1.0.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 Aug 3, 2025.

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full 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