Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Private EnvNew to Visual Studio Code? Get it now.
Private Env

Private Env

RUverse

|
2 installs
| (0) | Free
Mask values in .env files with asterisks until a line is focused to prevent accidental secret exposure during screen sharing.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Private Env

Mask values in .env files with asterisks until you focus (place the cursor on) a given line. Helpful while screen sharing or pairing to avoid accidental secret exposure or screenshots.

Features

  • Automatically masks value portions of lines like KEY=VALUE in *.env and .env.* files.
  • Unmasks a line while the cursor/selection is on it (re-masks after a short delay when leaving the line).
  • Hover tooltip (configurable) can reveal the real value without unmasking inline.
  • Status bar lock icon to toggle masking on/off globally.
  • Command Palette command: Private Env: Toggle Masking.

Settings

Setting Default Description
privateEnv.alwaysMask true If false, start disabled until toggled.
privateEnv.revealOnHover true Show the real value inside a hover tooltip.
privateEnv.revealDelayMs 150 Delay before a previously focused line is re-masked.

Security & Limitations

  • This is a visual masking aid only. Secrets remain in the file on disk and in the editor buffer; other extensions, git, search, or screen capture outside VS Code can still access them.
  • Copying a masked selection will still copy the real value (because the underlying text is unchanged).
  • Large values are truncated to 32 asterisks visually; the hover shows up to 200 characters.
  • Hover reveal can be disabled via settings.

Development

npm install
npm run watch

Press F5 to launch an Extension Development Host.

Test

npm test

License

MIT

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