Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>EnvGuard Local — .env validatorNew to Visual Studio Code? Get it now.
EnvGuard Local — .env validator

EnvGuard Local — .env validator

JUNNING HOU

|
1 install
| (0) | Free
Spot missing and undocumented .env variables before they break a teammate's setup — local-only, with no telemetry.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

EnvGuard Local — .env validator for VS Code

VS Code Marketplace Installs [License]

Find missing and undocumented environment variables before they turn into runtime surprises or a broken teammate setup. Free, local-only, and with no telemetry.

Install

In VS Code, open Extensions (Ctrl+Shift+X), search for EnvGuard Local, and select Install. Or run this in a terminal:

code --install-extension JUNNINGHOU.envguard-local

Your .env values stay local. EnvGuard inspects variable names only; it makes no network requests and has no telemetry.

What it catches

EnvGuard adds diagnostics to VS Code's Problems panel for three common forms of configuration drift:

  1. Used in code, missing from .env — for example, process.env.SENTRY_DSN is referenced but never defined in a configured runtime environment file.
  2. In .env, missing from .env.example — a local configuration key was added without documenting it for the next developer.
  3. In .env.example, missing from .env — an onboarding template entry is stale, or a required key was not set locally.

Supported code patterns: process.env.X, process.env["X"], import.meta.env.X (Vite), Deno.env.get("X"), os.environ["X"], os.environ.get("X"), and os.getenv("X") (Python).

See it in action

Imagine a teammate adds SENTRY_DSN to the source code but forgets to update the onboarding template. Run EnvGuard: Scan workspace for env problems and EnvGuard reports the mismatch in the Problems panel. Choose its Quick Fix to add a blank SENTRY_DSN= entry; fill in the secret yourself, locally.

Use it

  1. Open a project folder in VS Code.
  2. Run EnvGuard: Scan workspace for env problems from the Command Palette.
  3. Review the inline diagnostics in the Problems panel.

EnvGuard also re-scans when you save a supported source file or .env file. The status bar shows the current issue count; select it to run a fresh scan.

Safe Quick Fixes

For a missing key, select the lightbulb next to the diagnostic to append KEY= to .env or .env.example. EnvGuard never fills or copies secret values, and it changes a file only after you choose the Quick Fix.

Settings

Setting Default Purpose
envguard.envFiles [".env", ".env.local"] Runtime files that define variables.
envguard.exampleFile .env.example Template file compared with runtime files.

Source scanning is intentionally focused on src, app, lib, pages, server, and scripts folders for JavaScript, TypeScript, and Python files.

Privacy and security

EnvGuard runs entirely inside VS Code. It makes no network requests, sends no telemetry, creates no account, and stores no data outside the workspace. It reads configured .env files, .env.example, and supported source files only to identify variable names; values are never transmitted or used for analytics.

EnvGuard is a static checker, not a secret scanner. It does not validate whether a secret value is correct, execute your code, modify .env files, or upload any workspace content.

Limitations

  • The analyzer recognizes the explicit patterns listed above; dynamic key access and custom environment wrappers are intentionally out of scope.
  • Comment handling is line-based and is designed to avoid common false positives.
  • A missing variable can be valid when supplied by a deployment platform or test runner; configure your environment files accordingly before treating a diagnostic as an error.

Development

npm install
npm run test:core

Press F5 in VS Code to launch the Extension Development Host against the bundled fixture project.

Support

Ask a question or report a problem in the Marketplace Q&A. Please remove secret values before sharing examples.

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