env-switcher-cli-omax
v1.1.3
Published
CLI tool to switch between .env files
Maintainers
Readme
🔄 env-switcher-cli-omax
A CLI tool to switch between different .env files in your project—perfect for developers working across multiple environments (dev, test, prod, staging).
⚡ Manage environment variables effortlessly with one command.
📦 Installation
Install globally via npm:
bash
npm install -g env-switcher-cli-omax
🚀 Quick Start Make sure your project root has environment files:
bash
.env.dev
.env.test
.env.prodUse the CLI:
bash
env-switch devThis will replace your current .env with the contents of .env.dev.
🧩 Usage
bash env-switch 🔁 Examples:
Command Action
env-switch dev Copies .env.dev → .env
env-switch test Copies .env.test → .env
env-switch prod Copies .env.prod → .env📁 File Structure
my-project/ │ ├── .env # Active file used by app ├── .env.dev # Development environment ├── .env.test # Testing environment ├── .env.prod # Production environment └── ...
💼 Why Use This? Managing .env files manually is error-prone and tedious. With env-switcher-cli-omax, you:
✅ Eliminate rename errors ✅ Save time in dev/stage/prod context switching ✅ Keep your project root clean and consistent
🛠 Tech Stack Node.js File System (fs) Commander (for CLI interface) npm 📄 License (MIT License)
👨💻 Author Built with 💙 by Omkar Patil
npm: env-switcher-cli-omax
🧠 Coming Soon Support for .env.local, .env.stage Default fallback if file is missing Interactive prompt version
Happy switching!
