Env Protector
GitHub↗ | Releases↗ | VS Code Marketplace↗ | Open VSX↗
Why this extension?
In the modern development era, live streaming, screen sharing, and recording are part of daily routines. However, most existing VS Code extensions that manage environment variables have a critical flaw: they process .env files only after the file has been opened. This results in a brief millisecond window where sensitive keys, API tokens, and passwords might be visible on screen before being hidden or masked. For streamers and security-conscious developers, this split-second exposure is unacceptable.
Env Protector solves this problem essentially by intercepting the file open request. Instead of reacting to an opened file, it proactively asks you how you want to view the file before it is rendered. This "security-first" architecture ensures that sensitive data never hits the screen unless you explicitly authorize it, providing a robust layer of privacy for your development environment.
Features
-
File Visibility Control: The extension allows you to toggle the visibility of environment files (e.g., .env) within the VS Code sidebar. It automates the management of
files.excludein your workspace settings, hiding sensitive files from the file explorer view to prevent accidental clicks during screen shares.
-
Proactive Interception Prompt: Unlike other tools, this extension intercepts the request to open an enviroment file. It presents a confirmation dialog asking how you wish to proceed, ensuring you are always aware before sensitive context is loaded into the editor buffer.

-
Secure Masked View: When you choose to view a file securely, the extension renders a virtual document where all values are replaced with asterisks (masking). This allows you to verify the presence of keys and structure without exposing the actual secrets (values).

-
Safe Variable Management: Manage your environment variables without ever opening the file itself:
- Add Variable: Insert new key-value pairs via the Command Palette.
- Edit Variable: Modify existing values safely through input boxes.
- Remove Variable: Delete keys without exposing the rest of the file content.
