1.0.3 • Published 7 months ago

@creatoon/envmerge v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

envmerge

CI npm version

License: MIT

🔧 CLI tool to recursively merge multiple .env files into a single consolidated file.


✨ Features

  • 🔍 Recursively scans folders to find .env files
  • 🧠 Skips common junk/build folders (node_modules, dist, .venv, etc.)
  • 📦 Merges all key-value pairs into one file (with comments showing file origin)
  • ✅ Supports verbose logging
  • ⚡️ Blazing fast and TypeScript-powered

📦 Installation

npm install -g @creatoon/envmerge
npx @creatoon/envmerge --help

🚀 Usage

envmerge --path <folder> --output <out-folder> [--verbose]

Example:

envmerge --path ./projects --output ./env --verbose

This will generate:

./env/merged.txt

With content like:

# From: ./projects/service-a/.env
PORT=3000
DB_URL=postgres://a

# From: ./projects/service-b/.env
PORT=5000
API_KEY=abc123

🛠 CLI Options

FlagDescriptionTypeRequired
--pathRoot folder to scanstring
--outputOutput directory to save merged filestring
--verboseEnable detailed logsboolean
--helpShow usage helpboolean

🧠 Why Use This?

Managing .env files in monorepos or multi-service projects is painful.
envmerge makes it easy to consolidate configs while keeping source context.


📄 License

MIT © Creatoon

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago