Pasteguard
AI gets the context. Not your secrets. Open-source privacy proxy for LLMs.
Install / Use
/learn @sgasser/PasteguardQuality Score
Category
Development & EngineeringSupported Platforms
README
Works Everywhere
Chat — Masks PII and secrets when you paste into ChatGPT, Claude, and Gemini. You see originals, AI sees placeholders.
Apps — Open WebUI, LibreChat, or any self-hosted AI setup. Optionally routes sensitive requests to a local model.
Coding Tools — Cursor, Claude Code, Copilot, Windsurf — your codebase context flows to the provider. PasteGuard masks secrets and PII before they leave.
API Integration — Sits between your code and OpenAI or Anthropic. Change one URL, your users' data stays protected.
Quick Start
Run PasteGuard as a local proxy:
docker run --rm -p 3000:3000 ghcr.io/sgasser/pasteguard:en
Point your tools or app to PasteGuard instead of the provider:
| API | PasteGuard URL | Original URL |
|----------|----------------|--------------|
| OpenAI | http://localhost:3000/openai/v1 | https://api.openai.com/v1 |
| Anthropic | http://localhost:3000/anthropic | https://api.anthropic.com |
# One line to protect your data
client = OpenAI(base_url="http://localhost:3000/openai/v1")
<details>
<summary><strong>European Languages</strong></summary>
For German, Spanish, French, Italian, Dutch, Polish, Portuguese, and Romanian:
docker run --rm -p 3000:3000 ghcr.io/sgasser/pasteguard:eu
For custom config, persistent logs, or other languages: Read the docs →
</details> <details> <summary><strong>Route Mode</strong></summary>Route Mode sends requests containing sensitive data to a local LLM (Ollama, vLLM, llama.cpp). Everything else goes to OpenAI or Anthropic. Sensitive data stays on your network.
</details>Chat
Open-source browser extension for ChatGPT, Claude, and Gemini.
- Paste customer data → masked before it reaches the AI
- AI responds with placeholders → you see the originals
- Works with the same detection engine as the proxy
Currently in beta. Apache 2.0.
Coding Tools
Protect your codebase context and secrets when using AI coding assistants.
Claude Code:
ANTHROPIC_BASE_URL=http://localhost:3000/anthropic claude
Cursor: Settings → Models → Enable "Override OpenAI Base URL" → http://localhost:3000/openai/v1
Dashboard
Every request is logged with masking details. See what was detected, what was masked, and what reached the provider.
<img src="assets/dashboard.png" width="100%" alt="PasteGuard Dashboard">What it catches
Personal data — Names, emails, phone numbers, credit cards, IBANs, IP addresses, locations. Powered by Microsoft Presidio. 24 languages.
Secrets — API keys (OpenAI, Anthropic, Stripe, AWS, GitHub), SSH and PEM private keys, JWT tokens, bearer tokens, passwords, connection strings.
Both detected and masked in real time, including streaming responses.
Tech Stack
Bun · Hono · Microsoft Presidio · SQLite
Contributing
See CONTRIBUTING.md for guidelines on how to contribute.
License
Related Skills
healthcheck
351.2kHost security hardening and risk-tolerance configuration for OpenClaw deployments
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
prose
351.2kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
