A VS Code/Windsurf extension for managing and switching between different .env environments.
Features
- Manage Multiple Environments: Create and maintain separate .env files for development, staging, production, etc.
- Quick Switching: Switch between environments with a single click
- Environment Explorer: View all your environments in a dedicated sidebar panel
- Duplicate & Delete: Easily duplicate existing environments or remove unused ones
Usage
- Open a workspace with a
.envfile or create one - The Environments panel will appear in the Explorer sidebar
- Click the + button to add a new environment
- Click on an environment to switch to it
- Right-click for more options (duplicate, delete, open file)
Configuration
envSwitcher.environmentsDirectory: Directory where environment files are stored (default:.envs)envSwitcher.targetEnvFile: Target .env file name (default:.env)
How It Works
The extension stores environment files in a configurable directory (default: .envs/). When you switch environments, it copies the selected environment file to your target .env file in the workspace root.
Example Structure
workspace/
├── .env (active environment - links to one of the files below)
├── .envs/
│ ├── development.env
│ ├── staging.env
│ └── production.env
└── ...