Show HN: LLM Anon – Anonymize code before sending to AI assistants
I use AI to debug lots of issues for work and always have to play this game where I remove company specific info from the code to anonymize it before uploading.
I wanted to automate this process into a CLI tool and give coding agents a shot.
The results were really good and way better than I expected so I'd like to share it with you all. Everything runs via local LLM with Ollama and can be installed with uv.
Key features:
- Local processing (no data leaves your machine)
- Validation system with banned string detection and re-prompting
- Supports Python, JS/TS, Java, C++, Rust, Go
- Simple installation: uv tool install llm-anon
Example workflow:Create validation config
echo "MyCompany" > secrets.txt
echo "internal-api.company.com" >> secrets.txt
Anonymize code with validation
llm-anon sensitive_code.py --validation-config secrets.txt -o clean_code.py
The tool will retry anonymization if it detects any banned strings in the output, making it much safer to share code with external AI services.
No comments yet