Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Dotenv Key CheckerNew to Visual Studio Code? Get it now.
Dotenv Key Checker

Dotenv Key Checker

Irfan ali

| (0) | Free
Finds keys your .env is missing from .env.example, and keys you never documented. Quick fixes for both. Never shows your values.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Dotenv Key Checker

Your .env and your .env.example drift apart. Someone adds a variable, forgets to document it, and the next person clones the repo and spends twenty minutes finding out why the app will not start.

It tells you, in the editor, the moment they disagree.

status

What it does

Open a .env and you get:

  • Missing keys — documented in .env.example, absent from your .env. These are the ones that break startup. Reported at the top of the file, with a quick fix that adds them all.
  • Undocumented keys — present in your .env, missing from .env.example. These are the ones your teammates will not know to set. Reported on the exact line, with a quick fix that documents the key.
  • A status bar count — ✓ .env 12/12 when in sync, ⚠ .env 10/12 when not.

Run Dotenv Key Checker: Check All .env Files to audit an entire monorepo at once.

It never shows your values

Only key names appear in diagnostics, hovers, the status bar and the report. The values in your .env are read to find the keys and are never displayed, logged, or sent anywhere. Nothing leaves your machine — there is no network code in this extension.

The one place values move is deliberate and one-way:

Adding a missing key to .env Copies the placeholder from .env.example — that file is committed, so its values are not secret
Documenting a key in .env.example Writes KEY= with no value — your real secret is never written into a committed file

Turn the first off with dotenvDoctor.copyExampleValues.

Templates it recognises

.env.example, .env.sample, .env.template, .env.dist, .env.defaults, and example.env / sample.env. Change or reorder with dotenvDoctor.templateNames.

Everything else matching .env or .env.<name> is treated as a real env file, including .env.local and .env.production. Each is compared against the template sitting next to it, so a monorepo with one .env per service works without configuration.

Settings

Setting Default What it does
dotenvDoctor.missingKeySeverity warning Severity for keys missing from your .env. off disables
dotenvDoctor.undocumentedKeySeverity information Severity for keys missing from the template. off disables
dotenvDoctor.templateNames .env.example, … Which filenames count as the template
dotenvDoctor.ignoreKeys — Key names to skip. Trailing * works, e.g. npm_*
dotenvDoctor.copyExampleValues true Copy placeholder values from the template when adding a key

Commands

  • Dotenv Key Checker: Add Missing Keys to This File
  • Dotenv Key Checker: Check All .env Files — workspace report in the Output panel

Author

Irfan Ali

MIT licensed.

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