bash
# Required
npm install -g cloakclaw
# Optional but recommended
brew install poppler # Better PDF text extraction
ollama pull qwen2.5:7b # AI-powered name/company detection
Verify: cloakclaw --version should return 0.1.2 or higher.
CategoryTypesIdentityPeople, Companies, Passports, Drivers LicenseContactEmails, Phones, AddressesFinancialDollars, Percentages, Accounts, Banks, SSNsLegalCase Numbers, JurisdictionsTechIP Addresses, MAC Addresses, Passwords/Secrets, API Keys, URLsOtherCrypto Wallets, GPS Coordinates, VIN Numbers, Medical IDs, Dates
Always cloak (document attached):
legal profilefinancial profilecode profilegeneral profileAlways cloak (sensitive content in text):
Skip cloaking:
bash
node scripts/cloak.js --profile <general|legal|financial|email|code|medical> --input /path/to/file
Output JSON:
json
{
"sessionId": "a5cc1496-15b9-4b43-8506-3ea75dfe1304",
"cloaked": "...cloaked text...",
"entityCount": 20,
"profile": "legal"
}
Or use the CLI directly:
bash
cloakclaw cloak document.pdf --profile legal -o cloaked.txt
Use the cloaked text as the document content. The user's question stays unchanged — only the document data is cloaked.
bash
node scripts/decloak.js --session <sessionId> --input /path/to/response.txt
Or CLI:
bash
cloakclaw decloak -s <sessionId> -f response.txt
Output: restored text with original entities.
Append to the response:
text
🔒 CloakClaw: {entityCount} entities protected | Profile: {profile} | Session: {sessionId_short}
cloakclaw off — disable auto-cloaking for this sessioncloakclaw on — re-enable auto-cloakingcloakclaw status — show current settings and recent sessionscloakclaw diff <sessionId> — show what was cloakedConfig at ~/.cloakclaw/config.yaml:
yaml
ollama:
url: http://localhost:11434
model: qwen2.5:7b
RAMModelQuality8GBqwen2.5:3bBasic (regex does most work)16GBqwen2.5:7bGood32GB+qwen2.5:32bVery good64GB+qwen2.5:72bExcellent
cloakclaw password set)CloakClaw is NOT HIPAA, GDPR, SOC 2, PCI-DSS, or CCPA compliant. It is a best-effort privacy tool. Users are responsible for reviewing cloaked output before sharing.