Overview Version History Q & A Rating & Review
EnvDrift for VS Code
Detect and sync .env drift directly in VS Code. Never leak secrets in .env.example again.
✨ Features
🔍 Auto-detect drift - Automatically checks for drift when .env files change
📊 Status bar indicator - Shows sync status at a glance
⚡ One-click sync - Sync .env.example with smart scrubbing
🔐 Smart scrubbing - Detects secrets from 30+ providers (AWS, Stripe, GitHub, etc.)
📋 Visual diff - Compare .env and .env.example side-by-side
⚙️ Configurable - Uses .envdriftrc.json for project settings
📦 Installation
Open VS Code
Go to Extensions (Ctrl+Shift+X)
Search for "EnvDrift"
Click Install
Or install from the command line:
code --install-extension sol-21.envdrift-vscode
🚀 Commands
Command
Description
EnvDrift: Check for Drift
Check if .env and .env.example are in sync
EnvDrift: Sync .env.example
Sync and scrub .env.example
EnvDrift: Show Diff
Open visual diff between files
EnvDrift: Initialize Config
Create .envdriftrc.json config file
Access commands via Command Palette (Ctrl+Shift+P).
⚙️ Settings
Setting
Default
Description
envdrift.autoCheck
true
Auto-check for drift on file changes
envdrift.showStatusBar
true
Show status in status bar
envdrift.inputFile
.env
Input file path
envdrift.outputFile
.env.example
Output file path
🔧 Configuration
Create .envdriftrc.json in your project root (or use EnvDrift: Initialize Config):
{
"input": ".env",
"output": ".env.example",
"strict": false,
"ignore": ["NODE_ENV", "DEBUG"],
"alwaysScrub": [],
"sensitiveKeywords": [],
"preserveComments": true
}
🛠️ Development
# Clone the repo
git clone https://github.com/sol-21/envdrift-vscode.git
cd envdrift-vscode
# Install dependencies
npm install
# Compile
npm run compile
# Run extension in debug mode
# Press F5 in VS Code
📝 License
MIT © sol-21