{"slug": "show-hn-local-personal-data-redaction-for-any-ai-tools", "title": "Show HN: Local personal data redaction for any AI tools", "summary": "A developer released PII GUI, a free, open-source desktop app that detects and redacts personal information in PDFs, Markdown, and text files entirely on-device using regex or local ONNX models, with no data ever leaving the machine. The Tauri 2 app, built with React and Rust, supports custom rules, per-match review, and true PDF redaction, and is available for macOS, Windows, and Linux.", "body_md": "**Find and redact personal information in documents — entirely on your device.**\n\nLoad a PDF, markdown, or text file, detect PII with built-in rules or local ONNX models, review every match, and export a safely redacted copy. No document content ever leaves your machine.\n\n[Example](#example) · [Features](#features) · [Detection Backends](#detection-backends) · [Setup](#setup) · [Development](#development) · [Roadmap](#roadmap)\n\nPII GUI is a Tauri 2 desktop app (React 19 + TypeScript frontend, Rust backend) for local-first PII detection and redaction. Detection runs on-device with regex rules or quantized ONNX models; the only network access is the optional one-time model download.\n\nPII GUI supports two local workflows.\n\n**Local inference only**— PII detection runs entirely on-device. The only network access is the optional one-time model download from Hugging Face.**PDF, Markdown, and plain-text input**— PDFs are parsed with pdf.js, preserving per-character positions so detections are highlighted directly on the rendered page.**Custom rules**— add your own regex or exact-match filters on top of any backend.** Review before redacting**— toggle individual matches on or off in the workbench before export.** True PDF redaction**— exported PDFs burn opaque rectangles into the rendered pages with pdf-lib, so redacted text is not recoverable from the output file.**Task history and persistence**— tabs, custom rules, and filter results survive restarts via a local SQLite database and on-disk result files.** Long-document support**— input is split into token-bounded, page-aware chunks and processed through a task queue.** Localized UI**— English, Korean, and Japanese.\n\n| Backend | Best for |\n|---|---|\nRegex (built-in) |\nInstant baseline detection of emails, phones, URLs, dates, account numbers, and secrets |\n|\nLong English documents and broad privacy-taxonomy detection |\n|\nEuropean-language text where names, addresses, and ID-like entities matter |\n\nMatches are labeled with a fixed privacy taxonomy:\n\n`account_number`\n\n· `private_address`\n\n· `private_email`\n\n· `private_person`\n\n· `private_phone`\n\n· `private_url`\n\n· `private_date`\n\n· `secret`\n\n- Node.js 24+\n- pnpm\n- Rust and Cargo\n- Tauri v2 platform prerequisites for your OS\n\nDownload the latest installer for macOS, Windows, or Linux from the [Releases](https://github.com/sophia486/pii-gui/releases) page.\n\nOn first launch, the onboarding flow lets you pick a default backend. Regex works immediately; the ONNX models are optional downloads (fetched from Hugging Face into the app data directory, and removable at any time from Settings).\n\nInstall from source:\n\n```\ncd tauri\npnpm install\n```\n\nLocal release signing values are optional for development. If you need updater signing locally, copy the environment template and fill in your own key:\n\n```\ncp .env.example .env\nDocument (PDF / md / txt)\n  → text extraction (pdf.js, per-character boxes for PDFs)\n  → token-bounded, page-aware chunking\n  → task queue → Rust `redact_text` command\n  → regex / ONNX inference (ort + tokenizers)\n  → matches + redacted text\n  → review & toggle matches in the UI\n  → export (burned-in PDF redaction or redacted text)\n```\n\nThe frontend (React) handles document parsing, chunking, review, and export. The Rust backend (`src-tauri/`\n\n) owns the detection engines, model lifecycle (download / verify / delete), and file I/O — all writes are confined to the Tauri app data directory.\n\n```\ncd tauri\npnpm install\npnpm tauri dev\ncd tauri\npnpm tauri build\ncd tauri\npnpm test:unit              # frontend unit tests (vitest)\npnpm build                  # typecheck + frontend build\n\ncd src-tauri\ncargo test                  # Rust backend tests\n```\n\n- Local regex detection and review workflow\n- Optional ONNX backend wiring for OpenAI Privacy Filter and BardsAI EU PII\n- Burned-in PDF redaction export\n- Local tab, custom-rule, and result persistence\n- Broader import/export QA for large PDFs and multilingual documents\n- Accessibility and keyboard-only review pass\n- Integration with coding agents (Codex, Claude Code, Cursor)\n\n```\ntauri/                      # the desktop app\n  src/                      # React frontend\n    App.tsx                 # orchestrator: tabs, routing, workbench\n    components/             # PDF preview, shadcn/Radix UI primitives\n    lib/\n      pdf-document.ts       # pdf.js text + char-box extraction\n      pii-text-chunks.ts    # token-bounded chunking\n      pii-task-queue.ts     # detection task queue\n      redaction-policy.ts   # match merge/select/restore logic\n      pdf-redacted-export.ts# burned-in PDF redaction export\n      app-persistence.ts    # SQLite + result-file persistence\n      i18n.ts               # en / ko / ja UI copy\n  src-tauri/                # Rust backend\n    src/lib.rs              # Tauri commands: redact_text, model lifecycle, file I/O\n    src/redact_engine.rs    # regex / ONNX / BardsAI detection backends\ndocs/assets/                # README thumbnail and screenshot assets\n.github/workflows/release.yml  # cross-platform release builds\n```\n\nContributions are welcome!\n\n**Bug reports & feature requests**— open an[issue](https://github.com/sophia486/pii-gui/issues)with steps to reproduce or a short description of the use case.**Pull requests**— keep changes small and focused. Before submitting, run the checks for the area you touched:- Frontend:\n`pnpm test:unit`\n\nand`pnpm build`\n\nfrom`tauri/`\n\n- Rust backend:\n`cargo test`\n\nfrom`tauri/src-tauri/`\n\n- Frontend:\n**Detection quality**— false positives/negatives are especially useful to report; include the backend (regex / Privacy Filter / BardsAI) and a minimal,**PII-free** sample that reproduces the issue.**Benchmarks**— keep local benchmark scripts and outputs out of commits;`/benchmarks/`\n\nis ignored.\n\nPII GUI is licensed under the [GNU Affero General Public License v3.0](/sophia486/pii-gui/blob/main/LICENSE).\n\nPII GUI builds on several open-source projects and model releases:\n\n[pdf.js](https://mozilla.github.io/pdf.js/)and[pdf-lib](https://pdf-lib.js.org/)for PDF parsing and export.[ONNX Runtime](https://onnxruntime.ai/)and[tokenizers](https://github.com/huggingface/tokenizers)for local model inference.[OpenAI Privacy Filter](https://huggingface.co/openai/privacy-filter)and[BardsAI EU PII](https://huggingface.co/bardsai/eu-pii-anonimization-multilang)for optional local PII detection models.\n\nRun the smallest check that proves the change, then widen as needed:\n\n```\ncd tauri && pnpm test:unit\ncd tauri && pnpm build\ncd tauri/src-tauri && cargo check\ngit diff --check\n```\n\nFor packaging, run `pnpm tauri build`\n\non the target platform before making release claims.", "url": "https://wpnews.pro/news/show-hn-local-personal-data-redaction-for-any-ai-tools", "canonical_source": "https://github.com/sophia486/pii-gui", "published_at": "2026-06-18 01:52:52+00:00", "updated_at": "2026-06-18 02:53:01.371535+00:00", "lang": "en", "topics": ["ai-tools", "ai-safety", "developer-tools"], "entities": ["PII GUI", "Tauri", "React", "Rust", "Hugging Face", "pdf.js", "pdf-lib", "ONNX"], "alternates": {"html": "https://wpnews.pro/news/show-hn-local-personal-data-redaction-for-any-ai-tools", "markdown": "https://wpnews.pro/news/show-hn-local-personal-data-redaction-for-any-ai-tools.md", "text": "https://wpnews.pro/news/show-hn-local-personal-data-redaction-for-any-ai-tools.txt", "jsonld": "https://wpnews.pro/news/show-hn-local-personal-data-redaction-for-any-ai-tools.jsonld"}}