Your terminal leaks secrets. This makes them disappear — playfully.
$ secret-mask -- npm run dev
Server running on http://localhost:3000
API key loaded: Sleepy Owl in Teacup
Connected to DB: postgresql://Dancing Cat on Banana@db.example.com
Not ***. Each secret becomes a memorable phrase like "Brave Fox under Lighthouse." Readable, unsuspicious, and weirdly fun.
20+ patterns. Detects API keys (OpenAI, AWS, GitHub, Stripe, Slack, Google, and more), Bearer tokens, URLs with embedded credentials, private keys, and PASSWORD=... style env vars.
Deterministic. Same secret always maps to the same phrase within a session. You can still follow your logs.
npm install -g @lorb/secret-maskSpawn a persistent subshell where everything is masked. No need to prefix every command.
secret-mask shellYour $SHELL is used (falls back to /bin/bash). Type commands as usual — all output flows through the masking layer. Type exit or press Ctrl-D to leave.
Custom patterns work too:
secret-mask shell --pattern "INTERNAL_.*"Everything that command prints to stdout/stderr gets masked in real-time.
secret-mask -- npm run dev
secret-mask -- docker compose up
secret-mask -- env
secret-mask -- kubectl logs pod-nameExit codes pass through — your CI scripts still work.
cat .env | secret-mask
heroku config | secret-mask
kubectl get secret my-secret -o yaml | secret-maskCatch secrets that don't match built-in patterns.
secret-mask --pattern "INTERNAL_.*" -- ./deploy.sh# GitHub Actions
- run: npx @lorb/secret-mask -- npm testimport { createMaskStream } from '@lorb/secret-mask';
const stream = createMaskStream();
process.stdin.pipe(stream).pipe(process.stdout);| Category | Examples |
|---|---|
| AI/ML | OpenAI (sk-...), Anthropic (sk-ant-...) |
| Cloud | AWS access keys, AWS secrets, Google API keys |
| Code | GitHub PAT/OAuth/App tokens, GitLab PAT, npm tokens |
| Payments | Stripe secret/public keys |
| Communication | Slack tokens, Slack webhooks, SendGrid, Twilio |
| Infrastructure | Heroku, Firebase |
| Auth | Bearer tokens, URL-embedded credentials (user:pass@host) |
| Generic | PASSWORD=, SECRET=, TOKEN=, API_KEY=, private keys, base64 credentials |
Each secret is hashed to an index in a dictionary of Adjective + Animal + Preposition + Object combinations. Same secret = same phrase within a session. Session salt changes between runs, so phrases aren't stable across restarts.
- Zero network calls. Fully offline
- Zero dependencies
- Processes stdout and stderr as stream transforms (real-time, not buffered)
- Passes through the wrapped command's exit code
𖦹 MIT — Lorb.studio