Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Dotenv-diffNew to Visual Studio Code? Get it now.
Dotenv-diff

Dotenv-diff

Chrilleweb

|
1 install
| (0) | Free
Catch missing and unused process.env variables against your .env file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Dotenv-diff

Catch missing and unused environment variables before they catch you.

VS Code Marketplace Installs Rating

vscode-dotenv-diff is a lightweight VS Code extension that warns you when your .ts or .js files reference environment variables that aren't defined in your .env file — and when your .env file has variables that are never used in your codebase.


Features

Missing variables in code

Not Defined

If your .ts or .js file references process.env.MY_KEY and MY_KEY is not defined in the nearest .env file, you'll see a warning underline directly in the editor.

Environment variable "MY_KEY" is not defined in .env

Unused variables in .env

Unused

If a key in your .env file is never referenced, the line is flagged with a warning.

Environment variable "MY_KEY" is defined in .env but never used

Monorepo support

The extension automatically finds the nearest .env file by walking up the directory tree from your source file. This means you can have multiple .env files in a monorepo and the extension will always compare against the correct one.

apps/
├── frontend/
│   ├── .env          ← used for files inside frontend/
│   └── src/
│       └── app.ts
└── backend/
    ├── .env          ← used for files inside backend/
    └── src/
        └── server.ts

Requirements

  • VS Code 1.109.0 or higher
  • A .env file somewhere in your project tree

Extension settings

This extension has no configuration. It works out of the box.


Documentation

Full documentation is available in the docs/ folder:

  • Capabilities — what the extension can do
  • Architecture — how the codebase is structured

Feedback & contributions

Issues and pull requests are welcome.
→ See CONTRIBUTING for details.

License

Licensed under the MIT license.

Created by chrilleweb

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