EnvGuard is a professional development tool that automatically masks sensitive environment variables in VS Code, ensuring your secrets remain secure during screen sharing, live coding and pair programming sessions. Trusted by developers worldwide, EnvGuard provides robust protection without modifying your files.
EnvGuard is a professional-grade VS Code extension designed to protect sensitive environment variables during live streaming, screen sharing, or pair programming sessions. It automatically detects and masks sensitive values in .env
files without affecting the actual file content.
Website: envguard
Suggest a feature: Submit feedback or ideas →
- Auto-detection: Instantly recognizes
.env
,.env.local
,.env.production
and other environment files - Smart masking: Only the values are hidden—keys remain visible for easy identification
- Real-time updates: Masking applies as you type with zero performance impact
- Dots (••••••••): Clean and professional
- Asterisks (********): Classic masking style
- Blur effect: Semi-transparent overlay for modern aesthetics
- Pattern-based: Mask only values matching patterns like
SECRET
,KEY
,TOKEN
,PASSWORD
- Whitelist support: Exclude harmless variables like
PORT
,DEBUG
,NODE_ENV
- Regex patterns: Advanced users can define custom regex patterns
- Mask everything: Option to hide all values regardless of patterns
- Command Palette:
EnvGuard: Toggle Masking
(F1 → search "EnvGuard") - Keyboard shortcut:
Ctrl+Shift+M
(customizable) - Status bar: Quick toggle button appears when editing .env files
- Sidebar panel: Dedicated EnvGuard sidebar for full control
- One-click activation: Instantly mask ALL environment values across all open files
- Extra protection: Disables hover reveals and clipboard access
- Visual indicator: Status bar shows streaming mode is active
- Perfect for: Live coding, tutorials and screen recordings
- Clipboard protection: Prevents copying masked values to clipboard
- Auto-lock timer: Automatically re-enable masking after period of inactivity
- Hover reveal: Temporarily show values on hover (configurable duration)
- No file modification: Masking is purely visual—your files remain unchanged
- Visual Studio Code 1.74.0 or higher
- Node.js 16.0.0 or higher (for development)
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
) - Search for "judeotine.envguard"
- Click Install
code --install-extension judeotine.envguard
- Download the
.vsix
file from Releases - Run
code --install-extension envguard-1.0.0.vsix
- Install EnvGuard from the VS Code Marketplace
- Open any
.env
file in VS Code - View sensitive values automatically masked
- Toggle masking with
Ctrl+Shift+M
(Windows/Linux) orCmd+Shift+M
(Mac)
Add these settings to your VS Code settings (File > Preferences > Settings > Extensions > EnvGuard
) for optimal security:
{
"envguard.enabled": true,
"envguard.maskStyle": "dots",
"envguard.patterns": [
"SECRET",
"KEY",
"TOKEN",
"PASSWORD",
"API_KEY",
"AUTH_TOKEN",
"CREDENTIALS",
"PRIVATE_KEY"
],
"envguard.whitelist": [
"PORT",
"DEBUG",
"NODE_ENV",
"ENVIRONMENT",
"APP_NAME",
"LOG_LEVEL"
],
"envguard.maskAllValues": false,
"envguard.autoMaskOnOpen": true,
"envguard.clipboardProtection": true,
"envguard.hoverRevealDuration": 3,
"envguard.autoLockTimer": 300,
"envguard.supportedFileExtensions": [
".env",
".env.local",
".env.development",
".env.production",
".env.staging",
".env.test",
".env.example"
]
}
Customize EnvGuard behavior through VS Code settings. Access via File > Preferences > Settings
and search for "EnvGuard":
{
"envguard.enabled": true,
"envguard.maskStyle": "dots",
"envguard.patterns": ["SECRET", "KEY", "TOKEN", "PASSWORD", "API_KEY"],
"envguard.whitelist": ["PORT", "DEBUG", "NODE_ENV", "ENVIRONMENT"],
"envguard.maskAllValues": false,
"envguard.autoMaskOnOpen": true,
"envguard.clipboardProtection": true,
"envguard.hoverRevealDuration": 3,
"envguard.autoLockTimer": 5,
"envguard.supportedFileExtensions": [
".env",
".env.local",
".env.development",
".env.production",
".env.staging",
".env.test"
]
}
Create a .vscode/settings.json
file in your project:
{
"envguard.patterns": ["CUSTOM_SECRET", "PROJECT_KEY"],
"envguard.maskStyle": "blur",
"envguard.streamingMode": false
}
Command | Shortcut | Description |
---|---|---|
EnvGuard: Toggle Masking |
Ctrl+Shift+M /Cmd+Shift+M |
Toggle masking for current session |
EnvGuard: Toggle Streaming Mode |
Ctrl+Alt+S /Cmd+Alt+S |
Toggle maximum protection for streaming |
EnvGuard: Refresh Patterns |
- | Reload masking patterns |
EnvGuard: Open Settings |
- | Open EnvGuard settings |
For detailed documentation, including API reference and advanced usage, please visit our official documentation.
- Community Support: GitHub Discussions
- Bug Reports: GitHub Issues
- Security Issues: Please email [email protected] (PGP: public key)
For enterprise support, custom integrations, or volume licensing, please contact [email protected].
- Live streaming: Keep API keys hidden during coding streams
- Screen sharing: Safe to share screen during meetings
- Pair programming: Protect secrets when working with others
- Code reviews: Screenshot code without exposing credentials
- Tutorials: Create educational content without security risks
- Enterprise: Maintain security standards in collaborative environments
EnvGuard supports multiple pattern types:
{
"envguard.patterns": [
"SECRET", // Simple substring matching
"API_*", // Wildcard patterns
"/^PRIVATE_/", // Regex patterns
"TOKEN"
]
}
By default, EnvGuard works with:
.env
.env.local
.env.development
.env.production
.env.staging
.env.test
Customize the list in settings to match your project structure.
- Node.js 18+ (LTS)
- VS Code 1.80.0+
- pnpm 8.x
- Clone the repository
- Install dependencies:
pnpm install
- Build the extension:
pnpm run compile
- Press F5 to launch the extension in development mode
pnpm run compile
: Compile TypeScriptpnpm run watch
: Watch for changespnpm run test
: Run testspnpm run package
: Create VSIX package
- Basic environment variable masking
- Multiple masking styles (dots, asterisks, blur)
- Pattern-based selective masking
- Streaming mode for live coding
- Clipboard protection
- Status bar integration
- Sidebar management panel
- Multi-language support (Python, PHP, Ruby env files)
- Team sharing (shared masking rules via Git)
- Custom masking characters (emoji, symbols)
- Audit logging (track when secrets are revealed)
- Integration with secret managers (Azure Key Vault, AWS Secrets)
- Mobile development support (React Native, Flutter env files)
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- Add tests for new features
- Update documentation
- Ensure backward compatibility
- Bug Reports: GitHub Issues
- Feature Requests: canny
- Documentation: Wiki
EnvGuard is licensed under the MIT License. See LICENSE for the full license text.
Security is our top priority. If you discover any security issues, please review our Security Policy for reporting vulnerabilities.
VS Code is a trademark of Microsoft Corporation. EnvGuard is not affiliated with or endorsed by Microsoft Corporation.
- VS Code Extension API team for excellent documentation
- The open-source community for inspiration and feedback
- Beta testers who helped refine the user experience
jude otine
- GitHub: @judeotine
- Website: judeotine
Star this repo if EnvGuard helps keep your secrets safe!