EnvToggler is a Visual Studio Code extension that allows you to switch between multiple .env environment configuration files directly from the status bar. It simplifies the process of managing different environments like development, testing, and production by providing a quick and intuitive way to
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
EnvToggler is a Visual Studio Code extension that allows you to switch between multiple .env environment configuration files directly from the status bar. It simplifies the process of managing different environments like development, testing, and production by providing a quick and intuitive way to activate the desired environment.
Donations
If you find this extension helpful, consider supporting the developer by buying them a coffee:
Features
Quick Environment Switching
Detects all .env.* files in your workspace.
Lets you switch the active environment via the command palette or status bar.
Automatically copies the selected file to .env in the root of your workspace.
Status Bar Indicator
Shows the current active environment in the status bar.
Useful for avoiding mistakes when running or deploying apps.
Works with Any Stack
Supports any backend or frontend project using .env files: Node.js, Python, Docker Compose, React, etc.
Safe Overwrite
Ensures .env is always the correct one by safely overwriting it from the selected .env.* file.
Example
Here’s an example workflow:
You have the following files in your project:
.env.dev
.env.prod
.env.test
From the command palette (Ctrl+Shift+P), run: "EnvToggler: Select Environment"