envsyncer
v1.1.4
Published
Sync your root .env files into monorepo subfolders with ease
Downloads
13
Maintainers
Readme
envsyncer
A smart CLI tool to sync .env files across your monorepo projects with ease.
Features
- Automatically detects all projects in your monorepo
- Syncs multiple env files (
.env,.env.local,.env.development,.env.production) - Interactive selection of target projects
- Smart project detection (looks for
package.jsonfiles) - Beautiful CLI interface with clear feedback
- Safe operation with error handling
- Works with any monorepo structure
Installation
```bash
Global installation
npm install -g envsyncer
Or use directly with npx
npx envsyncer ```
Usage
Navigate to your monorepo root: ```bash cd your-monorepo ```
Run envsyncer: ```bash npx envsyncer ```
Select the projects where you want to sync your env files
Done! Your env files are now synced across all selected projects
Supported Env Files
The following env files are automatically detected and synced:
.env.env.local.env.development.env.production
Example
A typical monorepo structure where envsyncer works:
``` monorepo/ ├── .env # Your root env files ├── .env.local │ ├── apps/ │ ├── web/ # Will sync env files here │ │ └── package.json │ └── api/ # And here │ └── package.json │ └── packages/ └── shared/ # And here └── package.json ```
Development
```bash
Install dependencies
pnpm install
Run in development mode
pnpm dev
Build
pnpm build ```
Contributing
Contributions and feature requests are welcome! Feel free to check the issues page.
License
MIT © NovinCode
