npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

multi-env-cli

v1.0.2

Published

Hot-editable multi-instance environment manager for Node.js projects

Readme

🚀 Multi-Env CLI

NPM version NPM downloads

The ultimate environment wizard for Node.js developers.

Ever wanted to run multiple versions of your app with different .env files simultaneously? Ever wished you could tweak env variables on the fly while your app is running, without restarting it manually or touching your code?

Say hello to Multi-Env CLI – your new best friend for dev magic.


⚡ TL;DR Quick Start

# 1️⃣ Run an instance with a temp env
npx multi-env run --env-file .env.staging --cmd "node server.js" --auto-cleanup

# 2️⃣ Edit the temp env while app is running → auto-restart happens

# 3️⃣ List all running instances
npx multi-env list

# 4️⃣ Kill a specific instance
npx multi-env kill --id <instance-id>

# 5️⃣ Repeat for multiple instances (staging, prod, dev)
npx multi-env run --env-file .env.prod --cmd "npm run dev"

🔥 Tip: Your temp env files live in .multi-env/ — you can freely edit them, watch the CLI restart, and never touch your original .env files.


⚡ Features

  • Hot-editable temp env files: edit your temp env, save, and the CLI automatically restarts your app with updated values.
  • Multiple simultaneous instances: spin up as many environments as your RAM allows.
  • CLI-managed temp envs: no more messing with your original .env files.
  • Crash-safe & auto-cleanup: dead instances are automatically cleaned from .multi-env, temp files removed if enabled.
  • Fully customizable commands: run npm run dev, node server.js, or literally anything.
  • No changes to your code needed: works out-of-the-box with any Node.js project.

📦 Installation

Global install

npm install -g multi-env-cli
npx multi-env run

🛠️ Usage

Interactive Mode

npx multi-env run
  • Enter env file path (e.g., .env.staging)
  • Enter command to run (npm run dev, node server.js, etc.)
  • Choose whether to auto-cleanup temp env after exit

🔥 Tip: Save the temp env file while your app is running to trigger automatic restarts with updated values!


Flags / Non-Interactive Mode

npx multi-env run --env-file .env.prod --cmd "node server.js" --auto-cleanup
  • --env-file: path to the env file to base the temp env on
  • --cmd: command to run for the instance
  • --auto-cleanup: deletes the temp env after instance exits

Listing Instances

npx multi-env list

Example output:

ID: 171234567890, PID: 12345, EnvFile: .multi-env/env.temp.171234567890, Command: node server.js

Killing an Instance

npx multi-env kill --id 171234567890
  • Deletes temp env if auto-cleanup enabled
  • Updates instances.json automatically

🧪 Example Workflow

# Run staging instance
npx multi-env run --env-file .env.staging --cmd "node server.js"

# Open .multi-env/env.temp.<id> and edit PORT=4000 → 5000
# CLI automatically restarts app with updated env

# Run production instance simultaneously
npx multi-env run --env-file .env.prod --cmd "node server.js"

# List running instances
npx multi-env list

# Kill staging instance
npx multi-env kill --id <staging-id>

💡 Use Cases

  • Run staging, dev, and prod instances side-by-side on your machine
  • Test feature flags or environment-dependent configs without restarting
  • Hot-edit configs in real-time while testing APIs, bots, servers, or scripts
  • Perfect for rapid prototyping, CI/CD simulations, or multi-tenant apps

📝 Notes & Tips

  • Temp envs are stored in .multi-env/ inside your project.
  • The original env file is never modified.

⚡ Pro Tips

  • Keep multiple projects running without conflicts — each project has its own .multi-env folder.

🏆 Why Multi-Env CLI?

Because life’s too short to:

  • Manually copy .env files
  • Restart your app every time you tweak a variable
  • Lose track of multiple running instances

Multi-Env CLI handles it all — hot, safe, and simultaneously.


👨‍💻 Author — The Env Whisperer

Created by cinfinit, a developer who treats environment files like a deck of cards: shuffle, duplicate, or vanish them — all without breaking a sweat.

Motto: “Temp files are my playground .”

Special Moves:

  • Env Mirage — make multiple instances appear from thin air.

  • Hot-Reload Blink — edit .env and watch the app instantly obey.

  • Phantom Cleanup — temp envs disappear as if they were never real.

Signature Style: casually spawns multiple Node processes while everyone else hits refresh.

Fun Fact: once convinced a server to restart itself just by editing a temp env file. True story.

⚡ Warning: staring too long at the temp env may cause sudden urges to create another instance.