Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Protect DotEnv from GitNew to Visual Studio Code? Get it now.
Protect DotEnv from Git

Protect DotEnv from Git

Manixh Corp.

|
3 installs
| (1) | Free
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.
Copied to clipboard
More Info

Protect DotEnv from Git

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.

From source:

npm install
npm run compile
# Press F5 to debug

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft