Env Tools —
|
| 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.