VS Code Extensions
D

DotEnv Switcher

by TylerThompson

Manage and switch between multiple .env environments with ease

Downloads

29

Rating

— (0)

Version

0.1.0

Last updated

Apr 17, 2026

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
└── ...

Related extensions