Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Env Tools — .env linting, masking & .env.example syncNew to Visual Studio Code? Get it now.
Env Tools — .env linting, masking & .env.example sync

Env Tools — .env linting, masking & .env.example sync

KhangNY

|
1 install
| (0) | Free
Catch duplicate and missing keys, blur secrets for screen sharing, and keep .env.example in sync with your .env. Fully offline, no telemetry, no account.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Env Tools — .env linting, masking & .env.example sync

Everyday .env problems, caught in the editor. Fully offline: no telemetry, no account, no network calls of any kind.

What it does

Blurs your secrets so you can screen-share. Values in .env are blurred by default; keys stay readable. One click in the status bar reveals them. .env.example and other template files are never blurred, because they hold placeholders. This is a visual guard, not encryption — the file on disk is never modified.

Finds the mistakes that cost an afternoon.

Problem Why it matters
Duplicate key The later assignment silently wins. Easy to miss, hard to debug.
Key in .env.example but not .env Your app reads it as undefined.
Key in .env but not .env.example Works for you, breaks for whoever clones the repo.
Unquoted value containing spaces Some loaders read only the first word.
Unterminated quote / stray text after a quote Silently corrupts the value.
Real credential committed to .env.example A leaked key in version control.

Keeps the example file honest. Env: Sync Missing Keys Into .env.example appends every key your .env has and the example lacks, with values blanked. Existing content, comments and ordering are preserved.

Tidies up. Sort keys alphabetically; remove duplicate assignments, keeping the one that actually wins.

Syntax highlighting for .env, .env.local, .env.production, .env.example and friends — including export prefixes, all three quote styles, ${INTERPOLATION} and trailing comments.

Commands

All are under Env: in the Command Palette.

  • Toggle Value Blur (screen-share safe) — also on the status bar
  • Copy File With Values Masked — keys and comments kept, values replaced by a fixed-width mask so the mask does not leak a secret's length. Useful for pasting into an issue.
  • Sync Missing Keys Into .env.example
  • Compare Keys With Counterpart File
  • Sort Keys Alphabetically
  • Remove Duplicate Assignments

Settings

Setting Default Description
envTools.blurValues true Blur values in real .env files. Template files are never blurred.

Privacy

The extension reads only the .env file you have open and its neighbouring example file, both locally. It makes no network requests, collects no telemetry, and never transmits, uploads or stores your values anywhere.

Verification

The parsing, diffing, masking, linting and sorting logic is pure and unit-tested offline:

node test/test_env.js     # 77 passed, 0 failed, exit code 0

Licence

MIT — see LICENSE.

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