🔧 CLI tool to recursively merge multiple
.envfiles into a single consolidated file.
- 🔍 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
npm install -g @creatoon/envmergenpx @creatoon/envmerge --help
envmerge --path <folder> --output <out-folder> [--verbose]envmerge --path ./projects --output ./env --verboseThis 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| 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 | ❌ |
Managing .env files in monorepos or multi-service projects is painful.
envmerge makes it easy to consolidate configs while keeping source context.
MIT © Creatoon