Monitors your workspace for sensitive files (.env, keys, secrets) and ensures they are safely ignored by Git. Provides warnings, auto-.gitignore management, status bar indicators, sidebar view, and editor content blurring.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Monitors your workspace for sensitive files (.env, *.key, secrets.json, etc.) and warns you if they're not in .gitignore. One-click fixes, status bar indicator, sidebar view, and value blurring.
Features
Auto-scan on startup — detects sensitive files and checks .gitignore
Real-time file watcher — triggers on create/change/delete of sensitive files
Smart warnings — "Add to .gitignore" / "Create .gitignore" buttons in notifications
Status bar — $(shield) Safe or $(alert) X Sensitive Files
Sidebar panel — lists all sensitive files with ignored/not-ignored status
Content blur — applies CSS blur to values in .env files (toggle on/off)
.env.example generator — strips values, keeps keys as placeholders
Commands
Command
What it does
Protect DotEnv: Scan Workspace Now
Full workspace scan for sensitive files
Protect DotEnv: Add File to .gitignore
Add a pattern to .gitignore
Protect DotEnv: Toggle Sensitive File Blur
Enable/disable blur on .env values
Protect DotEnv: Create .env.example from .env
Generate .env.example from active file
Settings
Setting
Default
Description
protectDotEnv.patterns
[".env", ".env.*", "*.key", "*.pem", ...]
Sensitive file patterns
protectDotEnv.scanOnStartup
true
Scan on workspace open
protectDotEnv.blurSensitiveFiles
false
Blur values in sensitive files
protectDotEnv.showStatusBar
true
Show status bar indicator
protectDotEnv.showSidebar
true
Show sidebar tree view
protectDotEnv.suggestEnvExample
true
Suggest creating .env.example
Install
From VSIX: Extensions → ··· → Install from VSIX → select .vsix file.