streamer-mode-x

A Visual Studio Code extension that protects sensitive files like .env, especially useful while streaming your screen.
Installation
The extension for VS Code is available on the Visual Studio Marketplace
Key Features
- Zero-Leak Protection: Unlike other extensions, this uses VS Code's Custom Editor API to intercept files before they render, ensuring no content ever flashes on screen.
- Auto-Detection: Automatically enables protection when streaming apps (OBS, Streamlabs) are running.
- Seamless & Easy to Use: Designed to be "set and forget" with simple one-click toggles via status bar or keybindings.
- Visual Confidence: A clear 'S' badge and color coding in the Explorer lets you know exactly which files are safe.
- Comprehensive Security: Out-of-the-box protection for
.env, .pem, .key, .pfx, and more, with support for custom file patterns.
Usage
Protected File Types
The extension automatically protects the following file types:
- Environment files (
.env)
- Certificate and key files (
.pem, .key, .cer, .crt)
- Certificate stores (
.p12, .pfx)
Toggling Streamer Mode
You can enable/disable the protection in multiple ways:
- Status Bar: Click on the "Streamer Mode" indicator in the status bar
- Keybinding: Press
Cmd+Option+S (Mac) or Ctrl+Alt+S (Windows/Linux)
- Command Palette:
- Open the command palette (Ctrl+Shift+P / Cmd+Shift+P)
- Type "Toggle Streamer Mode"
- Select to enable/disable
When disabled, protected files will open normally without the warning screen.
Auto-Detection
The extension can automatically enable Streamer Mode when it detects streaming software running on your computer.
[!WARNING]
This feature has only been tested on VS Code Version: 1.106.3 (Universal) on macOS.
- Supported Apps: OBS Studio, Streamlabs, XSplit.
- Configuration:
streamer-mode.autoDetected.enable: Enable/disable auto-detection (default: false).
streamer-mode.autoDetected.interval.active: Polling interval when Streamer Mode is enabled (default: 60 seconds).
streamer-mode.autoDetected.interval.inactive: Polling interval when Streamer Mode is disabled (default: 30 seconds).
streamer-mode.autoDetected.additionalApps: List of additional process names to detect as streaming apps.
Hiding/Unhiding Files
You can quickly hide or unhide the current file:
- Editor Title Menu: Click the Lock Icon in the top-right corner of the editor.
- Keybinding: Press
Cmd+Option+P (Mac) or Ctrl+Alt+P (Windows/Linux).
- Context Menu: Right-click a file in Explorer and select "Toggle File Protection".
Development
Runtime Environment
[!WARNING]
This project currently uses Bun instead of Node.js as a runtime environment. While it's working in the current state, there are some limitations I've encountered. If you fork or clone this repository, you might face compatibility issues. This is an experimental setup as I explore Bun's capabilities compared to Node.js.
Prerequisites
- Bun 1.3+
- Node.js 24+ (recommended)
- VSCode: 1.95.0+
Installation
- Clone the repository:
git clone https://github.com/staciax/vscode-streamer-mode-x.git
- Install dependencies:
bun install
- Compile the extension:
bun run compile
- Run in debug mode:
- Open the project in VS Code
- Press
F5 to launch a new Extension Development Host window
License
This project is licensed under the GNUv3 License - see the LICENSE file for details.