mlignore: The Industrial-Grade Context Leakage Utility. Optimized for feeding LLMs minified codebase contexts.
Project description
mlignore
Tired of your intellectual property remaining private? Frustrated that OpenAI and the Chinese GOV don't know about your hardcoded API keys and spaghetti logic?
Welcome to mlignore, the premier tool designed to strip away the "bloat" (comments, docstrings, and readability) of your codebase so you can shove the maximum amount of proprietary logic into an LLM's context window.
🛡️ Security? Never Heard of Her.
Giving an external, closed-source transformer model/BS AI company direct access to your entire repository is a foundational best practice in the new "AI-First" economy. Why hire a security auditor when you can have a chatbot hallucinate potential vulnerabilities in your minified code?
Key "Safety" Features:
- Indentation Anorexia: Compresses Python to 1 space per level. It’s unreadable to humans, but the LLM loves it.
- Double-Layer Ignorance: Respects
.gitignoreand the brand new.mlignore. Perfect for making sure you only leak the stuff you want the next generation models to train on. - AST-Based Sanitization: We remove comments and docstrings. If the LLM can't see your
# TODO: FIX THIS SECURITY HOLE, then the hole doesn't exist and hackers can't exploit it.
🛠️ Installation
The Modern Way (uv)
uv tool install mlignore
# Or if you're just passing through:
uv run mlignore --root .
The "I have 5GB of Conda environments" way and i'm probably working in Academia Way
conda create -n leaked_code python=3.11
conda activate leaked_code
pip install mlignore
The Traditionalist Way (pip/venv)
python -m venv .venv
source .venv/bin/activate
pip install mlignore
📖 Usage Exemples
1. The "Standard Leak"
Generate a context.md from the current directory, ignoring the usual junk and respecting your git settings.
mlignore --root . --output my_secrets.md
2. The "Full Silence" (Stealth Mode)
Run the script without any logging. Perfect for CI/CD pipelines where you don't want anyone to see what's being gathered.
mlignore -s --root ./src
3. The "Deep Context" (Max Token Efficiency)
Include markdown and json files as raw text while minifying the rest.
mlignore --text-exts .md,.json --smart-exts .py,.js --max-files 1000
4. Custom Ignorance
Create a .mlignore file:
Just like .gitignore but for vibecoders. We don't use .gitignore here. We're moving to fast.
# .mlignore
secret_algorithm.py
legacy_codebase/
*.env
Then run:
mlignore --root .
🏗️ Technical Architecture
We use Tree-sitter for surgical precision. Unlike regex-based tools that fail on nested strings, we actually understand the AST of your code. We identify comments and docstrings at the syntax level and excise them like a tumor, leaving only the raw, vulnerable logic behind.
But yeah, there's not much more going on. It's a single file. Just read it ... or use mlignore to feed mlignore code to an LLM because you're 2 steps ahead.
License: GPL-V2 (Because we believe in sharing everything, clearly). And I heard this is what they used for the linux kernel ? And clearly this is as grandiose as the linux kernel and I did not vibe-code it.
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 mlignore-0.1.0.tar.gz.
File metadata
- Download URL: mlignore-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5031bb24c38ace197f0a0183a1ae7e2ff59aaa88a28ea8e67becead5435ee5bf
|
|
| MD5 |
936dae06626db51cd7470e0f5f9f3199
|
|
| BLAKE2b-256 |
bf600ce654306fe7b3fb965e672b23346b72fab2511f76b116e67a29cebb1bbf
|
File details
Details for the file mlignore-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mlignore-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19dab44bf00f51c7cd6445b49e6cd7fd862f45787604628e03c933edcb95592e
|
|
| MD5 |
b72c9e3c5f1640dd38a23cc50f2b79f7
|
|
| BLAKE2b-256 |
7e76f88503543585a32d4ce244bfd86ec75ac3fa05b45de0c93230837a7b6860
|