Skip to main content

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.

  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

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

mask4llm-1.0.0.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

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

mask4llm-1.0.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

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

Hashes for mask4llm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7a9ba95afc313c9d72a37eba829d989d71411ecc453a3430ce3318dcc8223e11
MD5 d2822323abd8f40fc17ea0b26373ab47
BLAKE2b-256 f4cd615506794142e9fe4ed1d98138ed8b37eec436873e5b91e4fe9d4b2e1a4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mask4llm-1.0.0.tar.gz:

Publisher: release-prod.yaml on Hemanthhari2000/mask4llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for mask4llm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ee023d5c08282fb37104353e9cb3d28c8fd3a742a2cd80012b450fa96ba0633
MD5 a3ddeda8b3fa3b395728ffbd1f4275e7
BLAKE2b-256 a9e31da14ea643fa799f79d477e5c783f4f25e7e5208d0419af7f21968dd2fc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mask4llm-1.0.0-py3-none-any.whl:

Publisher: release-prod.yaml on Hemanthhari2000/mask4llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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