Skip to content

sol-21/envdrift-vscode

Repository files navigation

EnvDrift for VS Code

Detect and sync .env drift directly in VS Code. Never leak secrets in .env.example again.

VS Code Marketplace License: MIT

✨ 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

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "EnvDrift"
  4. 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

🔗 Related

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors