Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>DotEnv SwitcherNew to Visual Studio Code? Get it now.
DotEnv Switcher

DotEnv Switcher

Tyler Thompson

| (0) | Free
Manage and switch between multiple .env environments with ease
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Environment Switcher

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

  1. Open a workspace with a .env file or create one
  2. The Environments panel will appear in the Explorer sidebar
  3. Click the + button to add a new environment
  4. Click on an environment to switch to it
  5. 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
└── ...
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft