SkillAgentSearch skills...

AutoRedact

šŸ›”ļø Client-side, privacy-first image redaction tool. Automatically detects and blurs PII (Emails, IPs, Keys) using local OCR. No server, no data leaks.

Install / Use

/learn @karant-dev/AutoRedact
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

šŸ›”ļø AutoRedact

Secure, client-side image redaction powered by OCR.

CI Release License: GPL v3

Deploy to Cloudflare

All processing happens 100% in your browser. Your images never touch a server.

✨ Features

  • šŸ” Automatic Detection - Finds emails, IP addresses, credit cards, and API keys
  • šŸŽÆ Precise Redaction - Uses OCR word-level bounding boxes for accurate redaction
  • šŸ”’ Privacy First - Everything runs locally via Tesseract.js
  • šŸ“¦ Batch Processing - Process unlimited images at once
  • ⚔ ZIP Download - Download all redacted files in one click

šŸš€ Quick Start

# Option 1: NPM (Local Dev)
npm install
npm run dev

# Option 2: Docker (Easiest)
docker run -p 8080:8080 karantdev/autoredact:latest

# Option 3: Docker Compose
docker compose up -d

Open http://localhost:5173 and drop your images.

Command Line Interface (CLI)

AutoRedact now supports a fully offline CLI mode using the same powerful engine. (jpg and png support only, for now. PDF support incoming)

# Process a single image
npm run cli -- input.jpg

# Disable specific redactors
npm run cli -- input.jpg --no-emails --no-ips

# Use custom rules
npm run cli -- input.jpg --block-words "Confidential" --custom-regex "Project-\d+"

šŸŽÆ What Gets Redacted

| Type | Pattern | |------|---------| | šŸ“§ Emails | user@example.com | | 🌐 IPs | 192.168.1.1 | | šŸ’³ Credit Cards | 4242-4242-4242-4242 | | šŸ”‘ API Keys | Stripe, GitHub, AWS |

šŸ› ļø Tech Stack

  • React + Vite + TypeScript
  • Tesseract.js v6 (OCR)
  • JSZip (batch exports)
  • Tailwind CSS

šŸ“ Structure

src/
ā”œā”€ā”€ adapters/     # Interface implementations (Browser/Node)
ā”œā”€ā”€ components/   # UI Components
ā”œā”€ā”€ core/         # Pure Logic (Regex, Math, Image Proc)
ā”œā”€ā”€ hooks/        # Custom Hooks
ā”œā”€ā”€ utils/        # Helpers
ā”œā”€ā”€ types/        # TS Interfaces
ā”œā”€ā”€ cli.ts        # CLI Entry Point
└── App.tsx       # Main Entry

šŸ“„ License

GNU General Public License v3.0

šŸ“– Real-World Recipes

šŸ› ļø CLI Power Usage

1. Batch Process a Directory

The CLI processes one file at a time. Use a shell loop to process entire folders:

# Process all JPGs in 'input' dir and save to 'output' dir
mkdir -p output
for f in input/*.jpg; do
  npm run cli -- "$f" -o "output/$(basename "$f")"
done

2. Strict Redaction for Finance/Invoices

Enable strict blocking for sensitive documents:

npm run cli -- invoice.jpg \
  --block-words "Confidential,SSN,Account" \
  --custom-regex "(?i)account\s*#?\s*\d+" \
  --no-ips # Disable IP scanner if irrelevant to boost speed

3. Allowlist for Internal Docs

Prevent redaction of known internal terms or headers:

npm run cli -- internal-doc.jpg \
  --allowlist "CorpCorp,192.168.1.1,ProjectX"

The Docker API runs on port 3000 by default. It uses standard detection settings (Emails, IPs, Keys, PII) by default, but is fully configurable via the settings parameter.

šŸ‘‰ View Full API Documentation for detailed usage, schema, and Python/Node.js examples.

Quick Test (Curl)

curl -X POST http://localhost:3000/redact \
  -F "image=@/path/to/doc.jpg" \
  -o redacted.png
View on GitHub
GitHub Stars73
CategoryDevelopment
Updated4d ago
Forks1

Languages

TypeScript

Security Score

100/100

Audited on Apr 5, 2026

No findings