|
1 | 1 | # envsync |
2 | 2 |
|
| 3 | +> Effortless environment file synchronization |
| 4 | +
|
3 | 5 | [](https://npmjs.com//envsync) |
4 | 6 | [](./LICENSE) |
5 | 7 |
|
6 | | -> Effortless environment file synchronization and management for modern projects. |
7 | | -
|
8 | 8 | > *Did you receive the .env file I shared in Discord?* |
9 | 9 |
|
10 | 10 | **envsync** helps you keep your `.env` files in sync across local and remote backends (local, Azure Storage, Azure Key Vault, Azure App Configuration). It provides a simple CLI to initialize, sync, update, check status, and clear environment files for your project. |
|
15 | 15 |
|
16 | 16 | - 🔍 **Auto-detects** `.env` files in your project (root and subfolders) |
17 | 17 | - 🗂️ **Supports multiple backends powered by unstorage**: Currently supported Azure Storage, Azure Key Vault, Azure App Configuration |
18 | | -- 📝 **Interactive CLI** for setup and management |
19 | | -- 🛡️ **Respects `.gitignore`** for file discovery |
20 | | -- 🔄 **Sync, update, status, and clear** commands |
| 18 | +- **Supports merging**: Supports merging with existing settings in .env files. Duplicate keys will be overwritten by the remote state |
| 19 | +- 📝 **Interactive CLI** for setup and management - Run `envsync --help` for available options |
21 | 20 |
|
22 | 21 | ### Planned |
23 | 22 |
|
|
27 | 26 |
|
28 | 27 | --- |
29 | 28 |
|
| 29 | +## Quickstart |
| 30 | + |
| 31 | +1. Initialize new envsync config with `envsync init` |
| 32 | +2. Execute `envsync update` to push the configured `.env` files to the remote location |
| 33 | +3. Execute `envsync sync` anywhere you want to pull the current version from the remote location |
| 34 | + |
| 35 | +### For syncing only |
| 36 | + |
| 37 | +1. Execute `envsync sync` |
| 38 | + |
| 39 | +⚠️ **Important** |
| 40 | + |
| 41 | +- The preferred way of authenticating to remote storage (for example Azure Key Vault) should be an interactive login session with `az login` or `Connect-AzAccount`. Adding more env variables to authenticate to a service is not what we want to achieve. |
| 42 | +- Please cofigure permissions for reading and writing with your storage provider. For example in Azure you should only provide write permissions to people you want to update the .env files by assigning the respective RBAC (Role-Based Access Control) roles. |
| 43 | +- Remember that secrets stored in `.env` files are unecrypted and should only be for local services or extremely temporary. They cannot be recalled once they are on someones computer. |
| 44 | + |
30 | 45 | ## Install |
31 | 46 |
|
32 | 47 | ```bash |
|
0 commit comments