@creatoon/envmerge
v1.0.3
Published
CLI tool to recursively merge multiple .env files into a single consolidated output
Downloads
10
Maintainers
Readme
envmerge
🔧 CLI tool to recursively merge multiple
.envfiles into a single consolidated file.
✨ Features
- 🔍 Recursively scans folders to find
.envfiles - 🧠 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/envmergenpx @creatoon/envmerge --help🚀 Usage
envmerge --path <folder> --output <out-folder> [--verbose]Example:
envmerge --path ./projects --output ./env --verboseThis will generate:
./env/merged.txtWith 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
| Flag | Description | Type | Required |
| ----------- | ------------------------------------ | ------- | -------- |
| --path | Root folder to scan | string | ✅ |
| --output | Output directory to save merged file | string | ✅ |
| --verbose | Enable detailed logs | boolean | ❌ |
| --help | Show usage help | boolean | ❌ |
🧠 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
