@neocrev/jsonmask
v1.0.0
Published
Pipe-safe JSON masking for logs, debug output, and CI
Maintainers
Readme
Use cases
- Debug logging without leaking tokens
- Sharing API responses with colleagues
- CI pipelines that dump JSON
- Any
curl | jsonmasksituation
Quick start
# Basic usage
echo '{"user":"admin","password":"supersecret"}' | npx @neocrev/jsonmask
# Mask everything
kubectl get secrets -o json | npx @neocrev/jsonmask -f all
# Custom fields
cat response.json | npx @neocrev/jsonmask -f ssn,credit_card,api_key
# Custom mask character
echo '{"token":"abc123"}' | npx @neocrev/jsonmask -c █Install
# No install needed
npx @neocrev/jsonmask --help
# Or globally
npm install -g @neocrev/jsonmaskOptions
| Flag | Description | Default |
|------|-------------|---------|
| -f, --fields | Fields to mask (comma-separated or all) | built-in list |
| -i, --file | Read from file | stdin |
| -c, --char | Mask character | * |
| -l, --list | Show default sensitive fields | |
| -h, --help | Show help | |
Runs with 20+ built-in field names: password, secret, token, api_key, jwt, session, cookie, ssn, credit_card and more.
License
MIT
