Streamer Mode Plus Extension
A VS Code extension that automatically detects streaming software and masks API keys and secrets in code to protect secrets during live coding sessions.
Features
- Automatic Detection: Monitors running processes to detect popular streaming software like OBS Studio, Streamlabs, and XSplit.
- Smart Secret Detection: Automatically detects and masks high-entropy API keys and secrets in both .envfiles and code files using GitGuardian-inspired detection rules
- Granular .env Control: In .envfiles, by default only masks detected secrets (keeps regular values like names, ports visible). Optionally, enable "Hide all environment variables" to mask all values
- Manual Toggle: Status bar button to manually enable/disable streamer mode
- Configurable: Customize detection settings and streaming software list
How It Works
- Process Detection: The extension periodically scans running processes for known streaming applications
- Auto-Activation: When streaming software is detected, it automatically enables streamer mode
- Secret Masking:
- Automatically detects and masks high-entropy API keys and secrets across both .envfiles and code files
- .envfiles: By default, only detected secrets are masked. Use the status bar menu to enable "Hide all environment variables" and mask all values
- Code files: High-entropy secrets assigned to sensitive identifiers are detected and only the secret substring is masked
 
- Visual Feedback: Status bar shows current streamer mode state with eye icons
Commands
- Streamer Mode: Menu(status bar) — opens a menu with:- 
- Toggle Streamer Mode (on/off)
- Hide all environment variables (checkbox)
 
- Toggle Streamer Mode- Manually toggle streamer mode on/off
- Enable Streamer Mode- Force enable streamer mode
- Disable Streamer Mode- Force disable streamer mode
Configuration
Access these settings via VS Code Settings (search for "Streamer Mode"):
- streamingMode.autoDetect(default:- true) - Automatically detect streaming software
- streamingMode.detectionInterval(default:- 5000) - Detection interval in milliseconds
- streamingMode.streamingProcesses- List of process names to detect as streaming software (exact match, case-insensitive;- .exe/- .appstripped)
Default detected processes (tight to avoid false positives):
- OBS Studio (obs,obs64)
- Streamlabs (streamlabs obs,streamlabs desktop)
- XSplit (xsplit)
Usage
- Install and activate the extension
- Open any .envfile
- Start your streaming software (OBS, etc.)
- The extension will automatically detect it and mask detected secrets in your files
- Use the status bar button (eye icon) to open the menu and optionally enable "Hide all environment variables" for complete .env masking
Development
To run the extension in development:
- Clone this repository
- Run npm install
- Run npm run compile
- Press F5 to launch Extension Development Host
- Open a .envfile to test masking functionality
Secret Detection Rules (Code)
The secret detector focuses on assignments where the assigned identifier contains one of: secret, token, api[_.-]?key, credential, or auth. It considers assignment tokens :, =, :=, =>, ,, (, and <-, covering patterns such as:
- Variable/property assignments: api_key = "...",secret: value,token := value,object['auth'] = "...",{"credential": "..."}
- Function patterns: o.set("auth", "..."),set_apikey("...")
Values must pass high-entropy checks similar to GitGuardian’s Generic High Entropy detector:
- Match a constrained charset/length with specific backslash rules
- Shannon entropy ≥ 3 and contain ≥ 2 digits
- Pass value and context banlists to reduce false positives
Masking is visual-only and targets only the matched secret substring.
Privacy & Security
- The extension only scans process names, not process content
- No sensitive data is transmitted or stored
- Masking is visual only - your actual file content remains unchanged
- Works entirely locally within VS Code
Status Bar
The status bar shows:
- 👁 Streaming- Streamer mode OFF
- 🙈 Streaming- Streamer mode ON (with warning background)
Click the status bar item to toggle streamer mode manually.