Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

A software interface showing a privacy proxy tool that redacts sensitive data like API keys and passwords before…
Open SourceScore: 70

og-local: The Local Privacy Proxy That Redacts Secrets Before They Reach

og-local is a local proxy that redacts PII/secrets from Claude Code API calls using an ONNX model. Install via curl, run ogl claude. No cloud round-trip, no data leaks.

·2d ago·4 min read··17 views·AI-Generated·Report error
Share:
Source: github.comvia hn_claude_code, devto_claudecode, gn_agentic_codingWidely Reported
How do I redact secrets and PII from Claude Code prompts before they reach the API?

Install og-local via curl, download the detection model once (ogl model pull), then run ogl claude to launch Claude Code with automatic PII/secret redaction before any data leaves your machine.

TL;DR

og-local intercepts Claude Code API calls, detects PII/secrets locally via ONNX, redacts them, then restores them in the response — zero cloud round-trips.

Key Takeaways

  • og-local is a local proxy that redacts PII/secrets from Claude Code API calls using an ONNX model.
  • Install via curl, run ogl claude.
  • No cloud round-trip, no data leaks.

What Changed — Local Privacy Proxy for Claude Code

When Claude Code reads a file, that file's contents are shipped to Anthropic's API. Most of the time that's fine — you're working on open-source code or have a vendor agreement. But sometimes it isn't: a .env slipped into a diff, a customer email in a test fixture, an API key in a comment, a stack trace from a private service.

og-local is a single binary that runs on your machine, intercepts the API calls your agent makes, detects PII and secrets in the prompt body before it leaves localhost, swaps them with opaque placeholders, forwards the redacted prompt upstream, and transparently restores the originals in the response. The agent never sees the difference. The upstream provider never sees the secrets.

Detection runs in-process via the openai/privacy-filter ONNX model. There's no cloud round-trip and no network call to anywhere except the upstream provider you were already calling.

What It Means For You — No More Leaky Prompts

If you work in:

  • Fintech or healthcare — patient data, account numbers, or PII in test fixtures get redacted before they reach Anthropic.
  • A startup with a small team — you can use Claude Code on your full codebase without worrying about .env files or hardcoded secrets in legacy code.
  • Open-source — you can share Claude Code sessions or logs without scrubbing them manually.
  • Compliance-required environments — SOC 2, HIPAA, or GDPR audits become simpler when you can prove no sensitive data left your machine.

og-local works with both Claude Code and OpenAI Codex (the API, not the product). It's a transparent proxy — you don't change your workflow, you just prefix your command.

Try It Now — Setup in 2 Minutes

1. Install

ogl redacting a coding-agent prompt in real time

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/outgate-ai/og-local/main/scripts/install.sh | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/outgate-ai/og-local/main/scripts/install.ps1 | iex

This installs the ogl binary and, on platforms that support redaction, places the bundled ONNX Runtime where ogl expects it.

2. Download the detection model (one-time, ~840MB)

ogl model pull

This downloads the model into ~/.cache/og-local and fetches the ONNX Runtime if missing.

3. Launch Claude Code with redaction

ogl claude "your prompt"

That's it. ogl claude "..." and ogl codex "..." now redact PII and secrets automatically. If anything is missing on first run, ogl offers to download it on the spot before launching the agent.

Pro tip: Make it your default

alias claude='ogl claude'

How It Works Under the Hood

og-local doesn't modify Claude Code's code. It acts as a transparent HTTP proxy that intercepts API calls. When Claude Code sends a prompt, og-local:

  1. Captures the request body
  2. Runs the ONNX privacy filter to detect PII (emails, SSNs, API keys, etc.)
  3. Replaces detected items with opaque placeholders (e.g., [REDACTED_EMAIL_1])
  4. Forwards the redacted prompt to Anthropic's API
  5. Intercepts the response and restores the original values

The agent sees the full response with original data. The API provider never sees the secrets. No data leaves your machine except the redacted prompt.

Platform Notes

  • Redaction-capable platforms (most Linux, macOS ARM, Windows): The install script bundles ONNX Runtime. Redaction works out of the box.
  • Passthrough-only platforms (Intel macOS, some edge cases): ogl claude and ogl codex exit with a clear "this build cannot redact" message rather than forwarding your prompt unprotected. Use the install script or a release archive for full redaction.
  • macOS first run: Gatekeeper may quarantine the binary. Run xattr -d com.apple.quarantine $(command -v ogl) or right-click → Open once.
  • Windows first run: SmartScreen may flag the unsigned .exe. Click "Run anyway" after verifying the checksum from the GitHub release.

Source: github.com

Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from multiple verified sources, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

Claude Code users should immediately install og-local if they work with sensitive data. The setup is trivial — `curl | sh`, `ogl model pull`, then `ogl claude` — and the protection is automatic. No config files, no regex patterns to maintain. The ONNX model detects a broad set of PII and secret patterns, so you don't have to enumerate them yourself. For teams, consider making `ogl claude` the default in your onboarding docs or dotfiles. Add it to your CLAUDE.md as a recommended setup step. If you share Claude Code sessions or logs, og-local gives you confidence that secrets aren't leaking through prompts. And if you're subject to compliance requirements, this tool provides an auditable layer of protection — the proxy logs what was redacted, so you can prove no sensitive data left your machine. One caveat: the model is ~840MB, so first download takes time. But it's a one-time cost. The binary itself is small and runs in-process with no cloud dependencies. For teams on Intel Macs, test the passthrough mode first — if it doesn't support redaction, you'll get a clear error, not silent forwarding.
This story is part of
The AI Infrastructure War Shifts from Chips to Developer Tools
Nvidia's enterprise pivot and AWS's OpenAI bet collide with Cursor's quiet ascent
Compare side-by-side
Claude Code vs og-local
Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Open Source

View all