A terminal user interface (TUI) app built with Textual to easily mask and unmask sensitive information.
Project description
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.
- 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
- Sync the Development Environment
just install
# or, directly:
uv sync
This sets up .venv and installs all runtime and [dev] dependencies.
- 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
- Textual for the TUI framework.
- uv, ruff, and basedpyright for the awesome developer tools.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mask4llm-1.0.0.tar.gz.
File metadata
- Download URL: mask4llm-1.0.0.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a9ba95afc313c9d72a37eba829d989d71411ecc453a3430ce3318dcc8223e11
|
|
| MD5 |
d2822323abd8f40fc17ea0b26373ab47
|
|
| BLAKE2b-256 |
f4cd615506794142e9fe4ed1d98138ed8b37eec436873e5b91e4fe9d4b2e1a4a
|
Provenance
The following attestation bundles were made for mask4llm-1.0.0.tar.gz:
Publisher:
release-prod.yaml on Hemanthhari2000/mask4llm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mask4llm-1.0.0.tar.gz -
Subject digest:
7a9ba95afc313c9d72a37eba829d989d71411ecc453a3430ce3318dcc8223e11 - Sigstore transparency entry: 346325509
- Sigstore integration time:
-
Permalink:
Hemanthhari2000/mask4llm@d23fb69992e8fba74c653010a2ce7f161c4a1790 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Hemanthhari2000
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-prod.yaml@d23fb69992e8fba74c653010a2ce7f161c4a1790 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mask4llm-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mask4llm-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ee023d5c08282fb37104353e9cb3d28c8fd3a742a2cd80012b450fa96ba0633
|
|
| MD5 |
a3ddeda8b3fa3b395728ffbd1f4275e7
|
|
| BLAKE2b-256 |
a9e31da14ea643fa799f79d477e5c783f4f25e7e5208d0419af7f21968dd2fc5
|
Provenance
The following attestation bundles were made for mask4llm-1.0.0-py3-none-any.whl:
Publisher:
release-prod.yaml on Hemanthhari2000/mask4llm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mask4llm-1.0.0-py3-none-any.whl -
Subject digest:
4ee023d5c08282fb37104353e9cb3d28c8fd3a742a2cd80012b450fa96ba0633 - Sigstore transparency entry: 346325511
- Sigstore integration time:
-
Permalink:
Hemanthhari2000/mask4llm@d23fb69992e8fba74c653010a2ce7f161c4a1790 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Hemanthhari2000
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-prod.yaml@d23fb69992e8fba74c653010a2ce7f161c4a1790 -
Trigger Event:
push
-
Statement type: