ScriptsMay 13, 2026·2 min read

pasteguard — Local Privacy Proxy for AI Tools

PasteGuard is an open-source local proxy that masks API keys, emails, and PII before requests reach OpenAI/Anthropic. Start via Docker.

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Stage only · 29/100Stage only
Agent surface
Any MCP/CLI agent
Kind
Script
Install
Docker
Trust
Trust: Established
Entrypoint
docker run --rm -p 3000:3000 ghcr.io/sgasser/pasteguard:en
Universal CLI install command
npx tokrepo install 332ca033-ee02-5115-a344-ab9d8fa85be3
Intro

PasteGuard is an open-source local proxy that masks API keys, emails, and PII before requests reach OpenAI/Anthropic. Start via Docker.

Best for: Teams using AI coding tools who must avoid leaking secrets in prompts

Works with: Docker, OpenAI SDK base_url override, Claude Code via ANTHROPIC_BASE_URL

Setup time: 3-8 minutes

Key facts (verified)

  • GitHub: 628 stars · 26 forks · pushed 2026-05-13.
  • License: Apache-2.0 · owner avatar + repo URL verified via GitHub API.
  • README-verified entrypoint: docker run --rm -p 3000:3000 ghcr.io/sgasser/pasteguard:en.

Main

  • Treat PasteGuard as a drop-in reverse proxy: you change the base URL once, and it masks secrets/PII before the request leaves your machine.

  • Use it both for chat and coding tools: the proxy path supports OpenAI-style /v1 routing and a dedicated /anthropic endpoint.

  • If you need higher privacy, enable the project’s “route mode” idea: sensitive requests can be routed to a local model while non-sensitive traffic goes to a hosted provider (see docs).

Source-backed notes

  • README Quick Start runs a local proxy container on port 3000 and shows base URLs like http://localhost:3000/openai/v1.
  • README claims it detects 30+ types of sensitive data across 24 languages and keeps data on-device.
  • README includes a Claude Code example using ANTHROPIC_BASE_URL=http://localhost:3000/anthropic.

FAQ

  • Does it require code changes?: Usually no — you swap the provider base URL to the localhost proxy and keep the rest the same.
  • What does it mask?: README highlights names, emails, and API keys; masking behavior depends on its detection engine and config.
  • Can I use it with Claude Code?: Yes — README shows routing Anthropic requests via ANTHROPIC_BASE_URL to the local proxy.
🙏

Source & Thanks

Source: https://github.com/sgasser/pasteguard > License: Apache-2.0 > GitHub stars: 628 · forks: 26

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets