noirdoc logo

noirdoc

PII guard for Claude Code to keep client data out of context

2026-04-29

Product Introduction

  1. Definition: noirdoc is an open-source PII (Personally Identifiable Information) redaction and pseudonymization engine designed specifically for Large Language Model (LLM) workflows. It functions as a multi-interface privacy layer—available as a Claude Code plugin, a standalone Command Line Interface (CLI), and a hosted reverse proxy—that replaces sensitive data with reversible placeholders before it reaches external AI providers.

  2. Core Value Proposition: noirdoc exists to bridge the gap between AI productivity and strict data privacy compliance (such as GDPR). By utilizing a local-first "PreToolUse" hook for Claude Code and a robust Python-based detection engine, it ensures that names, emails, IBANs, and locations never enter an LLM's context window. This allows developers and enterprises to utilize powerful tools like Claude Code or OpenAI APIs while maintaining absolute data sovereignty and ensuring that sensitive customer or corporate data remains locally encrypted and reversible only by the authorized user.

Main Features

  1. Claude Code Plugin (PreToolUse Hook): This feature integrates directly into the Claude Code environment. It utilizes a PreToolUse hook to intercept file-reading commands. Before Claude can process a file, the plugin scans the content locally for PII. It automatically replaces sensitive strings with structured placeholders (e.g., <>, <>). The transformation happens entirely on the user's machine, ensuring the LLM only perceives the pseudonymized version of the data.

  2. Local Reversibility and Reveal Engine: Unlike standard "masking" tools that permanently redact data, noirdoc maintains a local mapping of placeholders to original values. The mapping is stored in a local directory (.noirdoc/cache/) and never leaves the user’s hardware. Users can run the noirdoc reveal command in their terminal to restore the original values in the final LLM response, keeping the PII within the secure local shell and out of the cloud-based conversation transcripts.

  3. Multi-Format CLI and Python Library: The core engine is distributed via PyPI (pip install noirdoc), supporting plain text, PDF, and DOCX files. It offers two modes of operation: "One-shot" for immediate, non-persistent redaction and "Persistent" namespaces for ongoing projects where consistent pseudonymization is required across multiple documents. This allows the same entity (e.g., a specific client name) to be represented by the same placeholder across an entire dataset.

  4. Enterprise Privacy Proxy: For teams and organizations, noirdoc provides a hosted or self-hosted reverse proxy compatible with OpenAI, Anthropic, and Azure AI. This proxy acts as a centralized PII scrubber that monitors all outgoing API calls. It provides an audit trail and ensures that no sensitive data is leaked during team-wide AI interactions, requiring only a two-line change in the API base URL configuration.

Problems Solved

  1. Pain Point: Data Leakage in LLM Training and Logging. Standard LLM interactions often result in PII being stored in provider logs or potentially used for future model training. noirdoc solves this by ensuring PII is stripped at the source, significantly reducing the risk of "prompt injection" data harvesting and accidental data exposure.

  2. Target Audience: This tool is essential for Software Engineers using terminal-based AI agents, Data Privacy Officers (DPOs) overseeing corporate AI adoption, Legal and Tax Professionals who need to analyze sensitive documents via AI, and DevOps teams managing enterprise-wide LLM integrations.

  3. Use Cases:

  • Analyzing legal contracts or tax documents where names, dates, and financial identifiers must remain confidential.
  • Debugging application logs that contain user emails or IP addresses using Claude Code.
  • Automated document processing where PII must be pseudonymized to comply with GDPR/CCPA before cloud processing.
  • Enabling safe AI tool usage in highly regulated industries like FinTech, Healthcare, and Government.

Unique Advantages

  1. Local-First Architecture: Unlike many SaaS-based redaction tools, noirdoc’s detection and mapping occur strictly on the user’s machine. No API calls are made to noirdoc’s servers for the redaction process, eliminating the "who guards the guardians" dilemma.

  2. Integration-Specific Optimization: By specifically targeting the "Claude Code" workflow with a dedicated plugin, noirdoc provides a seamless user experience that doesn't require manual copy-pasting. The automated path rules (glob patterns) allow users to define exactly which directories or file types should be protected.

  3. Consistent Pseudonymization: The engine ensures that placeholders are not randomized every time. Through its namespace management, the system maintains consistency (e.g., "Anna Müller" always becomes <> throughout a session), which allows the LLM to maintain context and logical relationships between entities without knowing their actual identities.

Frequently Asked Questions (FAQ)

  1. How do I redact PII in Claude Code using noirdoc? To redact PII in Claude Code, you must first add the noirdoc marketplace and install the plugin using the commands /plugin marketplace add nextaim-de/noirdoc-claude-plugin and /plugin install noirdoc@nextaim. Once installed, the plugin uses a PreToolUse hook to automatically pseudonymize files based on your defined path rules before they are read by the Claude agent.

  2. Is noirdoc's data redaction reversible? Yes, noirdoc is designed for reversible pseudonymization. While the LLM only sees placeholders, the original data is mapped locally on your machine. You can use the noirdoc reveal command in your terminal to swap the placeholders back to their original values in the AI's response, ensuring the real data never enters the cloud transcript.

  3. Does noirdoc support file formats other than plain text? Yes, the noirdoc CLI and Python library support multiple document formats, including PDF and DOCX. By installing the full version via pip install noirdoc[full], users gain access to optimized detectors capable of extracting and pseudonymizing PII within structured documents while preserving the file's utility for LLM analysis.

  4. Can I use noirdoc for enterprise teams to ensure GDPR compliance? Absolutely. noirdoc offers a hosted or self-hosted proxy specifically for teams. This proxy serves as a centralized gateway for OpenAI, Anthropic, and Azure calls, scrubbing PII from all outgoing requests and providing an audit trail to help organizations meet GDPR and internal security requirements.

Subscribe to Our Newsletter

Get weekly curated tool recommendations and stay updated with the latest product news