Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>EnvGuard — .env Sync & Secret Leak LinterNew to Visual Studio Code? Get it now.
EnvGuard — .env Sync & Secret Leak Linter

EnvGuard — .env Sync & Secret Leak Linter

B2 Apps

| (0) | Free
Compare .env vs .env.example, highlight missing keys in Diagnostics, sync keys-only to .env.example without copying secrets, and warn on hardcoded API key patterns.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

EnvGuard — .env Sync & Secret Leak Linter

EnvGuard keeps your .env and .env.example files in sync without ever leaking secret values, and warns you in real time if hardcoded API keys appear in your code or template files.

Features

  • .env vs .env.example Diagnostics: Instantly highlights keys present in .env that are missing from .env.example, and flags keys required by .env.example that are missing from .env.
  • Safe Key-Only Sync (EnvGuard: Sync .env.example (Keys Only)): Appends missing keys as KEY= with empty values. Never copies secret values.
  • Hardcoded Secret Leak Linter: Scans open files and .env.example for common API key patterns (sk_live_, sk_test_, ghp_, github_pat_, AIza, AKIA, xoxb-, sk-proj-, private key headers) while ignoring obvious placeholders.
  • Workspace Secret Scan (EnvGuard: Scan Workspace for Secret Leaks): One-click scan across your workspace excluding node_modules, .git, dist, out, and build.

Commands

Command Description
EnvGuard: Sync .env.example (Keys Only) Add missing .env keys to .env.example with empty values (never copies secrets).
EnvGuard: Compare .env vs .env.example Compare both files and display a summary of missing keys.
EnvGuard: Scan Workspace for Secret Leaks Scan workspace files for accidental hardcoded API keys.

Extension Settings

  • envguard.enableSecretLinter (default: true): Enable real-time hardcoded API key warnings.
  • envguard.enableEnvDiffDiagnostics (default: true): Highlight .env vs .env.example key mismatches in Problems.
  • envguard.ignoredKeys (default: []): List of keys to ignore during .env comparison.
  • envguard.ignoredPaths: Glob patterns excluded from workspace secret scans.

Privacy & Security

EnvGuard runs 100% locally inside VS Code. It makes zero network requests and never transmits your environment variables or code anywhere.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft