Learn how to use VaultGuard to scan for secrets and store them securely.
Install VaultGuard CLI globally using npm:
Or use it directly with npx:
VaultGuard is a minimal developer tool designed to help you:
Scan a file for potential secrets.
Store a key-value pair in the local vault.
Display all stored secrets (masked).
Export stored secrets as a .env file.
Protects your .env file by creating multiple encoded .vg files with fake data and removes the original .env file.
Creates files like: env1.vg, env2.vg, env3.vg with encoded real data mixed with decoy data.
Decodes your .vg files back to .env format. Optionally specify a specific file.
Creates a secure folder structure (vaultguard/vault/key/env) and stores the .env file there.
With --protect flag: combines safeadd with protect functionality.
Add a custom regex pattern for secret detection.
Show the CLI version.
Show CLI usage information.
VaultGuard scans for these common secret patterns:
sk_ - Stripe API keysghp_ - GitHub personal access tokensAKIA - AWS access keysAIza - Google API keysxoxb- - Slack bot tokenspk_ - Stripe publishable keysCustom patterns - Added via addpattern command