envilder 0.7.11 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +283 -37
  2. package/ROADMAP.md +10 -4
  3. package/docs/CHANGELOG.md +44 -0
  4. package/docs/SECURITY.md +26 -2
  5. package/lib/apps/cli/Cli.d.ts.map +1 -1
  6. package/lib/apps/cli/Cli.js +68 -11
  7. package/lib/apps/cli/Cli.js.map +1 -1
  8. package/lib/apps/cli/Startup.d.ts +3 -9
  9. package/lib/apps/cli/Startup.d.ts.map +1 -1
  10. package/lib/apps/cli/Startup.js +4 -54
  11. package/lib/apps/cli/Startup.js.map +1 -1
  12. package/lib/apps/gha/Gha.d.ts.map +1 -1
  13. package/lib/apps/gha/Gha.js +36 -19
  14. package/lib/apps/gha/Gha.js.map +1 -1
  15. package/lib/apps/gha/Startup.d.ts +3 -9
  16. package/lib/apps/gha/Startup.d.ts.map +1 -1
  17. package/lib/apps/gha/Startup.js +4 -54
  18. package/lib/apps/gha/Startup.js.map +1 -1
  19. package/lib/apps/shared/ContainerConfiguration.d.ts +7 -0
  20. package/lib/apps/shared/ContainerConfiguration.d.ts.map +1 -0
  21. package/lib/apps/shared/ContainerConfiguration.js +62 -0
  22. package/lib/apps/shared/ContainerConfiguration.js.map +1 -0
  23. package/lib/envilder/application/dispatch/DispatchActionCommand.d.ts +2 -2
  24. package/lib/envilder/application/dispatch/DispatchActionCommand.d.ts.map +1 -1
  25. package/lib/envilder/application/dispatch/DispatchActionCommand.js +6 -6
  26. package/lib/envilder/application/dispatch/DispatchActionCommand.js.map +1 -1
  27. package/lib/envilder/application/dispatch/DispatchActionCommandHandler.d.ts +3 -3
  28. package/lib/envilder/application/dispatch/DispatchActionCommandHandler.d.ts.map +1 -1
  29. package/lib/envilder/application/dispatch/DispatchActionCommandHandler.js +13 -13
  30. package/lib/envilder/application/dispatch/DispatchActionCommandHandler.js.map +1 -1
  31. package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommand.d.ts +7 -0
  32. package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommand.d.ts.map +1 -0
  33. package/lib/envilder/application/{pullSsmToEnv/PullSsmToEnvCommand.js → pullSecretsToEnv/PullSecretsToEnvCommand.js} +3 -3
  34. package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommand.js.map +1 -0
  35. package/lib/envilder/application/{pullSsmToEnv/PullSsmToEnvCommandHandler.d.ts → pullSecretsToEnv/PullSecretsToEnvCommandHandler.d.ts} +7 -7
  36. package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommandHandler.d.ts.map +1 -0
  37. package/lib/envilder/application/{pullSsmToEnv/PullSsmToEnvCommandHandler.js → pullSecretsToEnv/PullSecretsToEnvCommandHandler.js} +18 -18
  38. package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommandHandler.js.map +1 -0
  39. package/lib/envilder/application/{pushEnvToSsm/PushEnvToSsmCommand.d.ts → pushEnvToSecrets/PushEnvToSecretsCommand.d.ts} +3 -3
  40. package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommand.d.ts.map +1 -0
  41. package/lib/envilder/application/{pushEnvToSsm/PushEnvToSsmCommand.js → pushEnvToSecrets/PushEnvToSecretsCommand.js} +3 -3
  42. package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommand.js.map +1 -0
  43. package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommandHandler.d.ts +34 -0
  44. package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommandHandler.d.ts.map +1 -0
  45. package/lib/envilder/application/{pushEnvToSsm/PushEnvToSsmCommandHandler.js → pushEnvToSecrets/PushEnvToSecretsCommandHandler.js} +36 -32
  46. package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommandHandler.js.map +1 -0
  47. package/lib/envilder/application/pushSingle/PushSingleCommand.d.ts +3 -3
  48. package/lib/envilder/application/pushSingle/PushSingleCommand.d.ts.map +1 -1
  49. package/lib/envilder/application/pushSingle/PushSingleCommand.js +4 -4
  50. package/lib/envilder/application/pushSingle/PushSingleCommand.js.map +1 -1
  51. package/lib/envilder/application/pushSingle/PushSingleCommandHandler.d.ts +2 -2
  52. package/lib/envilder/application/pushSingle/PushSingleCommandHandler.d.ts.map +1 -1
  53. package/lib/envilder/application/pushSingle/PushSingleCommandHandler.js +6 -6
  54. package/lib/envilder/application/pushSingle/PushSingleCommandHandler.js.map +1 -1
  55. package/lib/envilder/domain/CliOptions.d.ts +3 -3
  56. package/lib/envilder/domain/CliOptions.d.ts.map +1 -1
  57. package/lib/envilder/domain/EnvironmentVariable.d.ts +5 -0
  58. package/lib/envilder/domain/EnvironmentVariable.d.ts.map +1 -1
  59. package/lib/envilder/domain/EnvironmentVariable.js +12 -3
  60. package/lib/envilder/domain/EnvironmentVariable.js.map +1 -1
  61. package/lib/envilder/domain/MapFileConfig.d.ts +10 -0
  62. package/lib/envilder/domain/MapFileConfig.d.ts.map +1 -0
  63. package/lib/envilder/domain/MapFileConfig.js +2 -0
  64. package/lib/envilder/domain/MapFileConfig.js.map +1 -0
  65. package/lib/envilder/domain/OperationMode.d.ts +2 -2
  66. package/lib/envilder/domain/OperationMode.d.ts.map +1 -1
  67. package/lib/envilder/domain/OperationMode.js +2 -2
  68. package/lib/envilder/domain/OperationMode.js.map +1 -1
  69. package/lib/envilder/domain/ports/IVariableStore.d.ts +2 -0
  70. package/lib/envilder/domain/ports/IVariableStore.d.ts.map +1 -1
  71. package/lib/envilder/infrastructure/aws/AwsSecretProviderFactory.d.ts +4 -0
  72. package/lib/envilder/infrastructure/aws/AwsSecretProviderFactory.d.ts.map +1 -0
  73. package/lib/envilder/infrastructure/aws/AwsSecretProviderFactory.js +10 -0
  74. package/lib/envilder/infrastructure/aws/AwsSecretProviderFactory.js.map +1 -0
  75. package/lib/envilder/infrastructure/aws/AwsSsmSecretProvider.d.ts.map +1 -1
  76. package/lib/envilder/infrastructure/aws/AwsSsmSecretProvider.js +3 -1
  77. package/lib/envilder/infrastructure/aws/AwsSsmSecretProvider.js.map +1 -1
  78. package/lib/envilder/infrastructure/azure/AzureKeyVaultSecretProvider.d.ts +17 -0
  79. package/lib/envilder/infrastructure/azure/AzureKeyVaultSecretProvider.d.ts.map +1 -0
  80. package/lib/envilder/infrastructure/azure/AzureKeyVaultSecretProvider.js +113 -0
  81. package/lib/envilder/infrastructure/azure/AzureKeyVaultSecretProvider.js.map +1 -0
  82. package/lib/envilder/infrastructure/azure/AzureSecretProviderFactory.d.ts +9 -0
  83. package/lib/envilder/infrastructure/azure/AzureSecretProviderFactory.d.ts.map +1 -0
  84. package/lib/envilder/infrastructure/azure/AzureSecretProviderFactory.js +24 -0
  85. package/lib/envilder/infrastructure/azure/AzureSecretProviderFactory.js.map +1 -0
  86. package/lib/envilder/infrastructure/azure/AzureVaultUrlValidator.d.ts +3 -0
  87. package/lib/envilder/infrastructure/azure/AzureVaultUrlValidator.d.ts.map +1 -0
  88. package/lib/envilder/infrastructure/azure/AzureVaultUrlValidator.js +28 -0
  89. package/lib/envilder/infrastructure/azure/AzureVaultUrlValidator.js.map +1 -0
  90. package/lib/envilder/infrastructure/variableStore/FileVariableStore.d.ts +4 -0
  91. package/lib/envilder/infrastructure/variableStore/FileVariableStore.d.ts.map +1 -1
  92. package/lib/envilder/infrastructure/variableStore/FileVariableStore.js +46 -0
  93. package/lib/envilder/infrastructure/variableStore/FileVariableStore.js.map +1 -1
  94. package/lib/envilder/types.d.ts +4 -4
  95. package/lib/envilder/types.js +2 -2
  96. package/lib/envilder/types.js.map +1 -1
  97. package/package.json +26 -8
  98. package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommand.d.ts +0 -7
  99. package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommand.d.ts.map +0 -1
  100. package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommand.js.map +0 -1
  101. package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommandHandler.d.ts.map +0 -1
  102. package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommandHandler.js.map +0 -1
  103. package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommand.d.ts.map +0 -1
  104. package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommand.js.map +0 -1
  105. package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommandHandler.d.ts +0 -34
  106. package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommandHandler.d.ts.map +0 -1
  107. package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommandHandler.js.map +0 -1
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # 🗝️ Envilder ☁️
2
2
 
3
3
  <p align="center">
4
- <img src="https://github.com/user-attachments/assets/70635670-9235-4400-83a9-cb6543915ed9" alt="Envilder">
4
+ <img src="https://github.com/user-attachments/assets/31ca58a9-1f6e-4dce-9ba6-c56f26856efa" alt="Envilder">
5
5
  </p>
6
6
 
7
7
  <p align="center">
8
8
  <b>Automate .env and secret management with Envilder</b><br>
9
- <span>Streamline your environment setup with AWS Parameter Store</span>
9
+ <span>Streamline your environment setup with AWS SSM Parameter Store or Azure Key Vault</span>
10
10
  </p>
11
11
 
12
12
  ![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/macalbert/envilder?utm_source=oss&utm_medium=github&utm_campaign=macalbert%2Fenvilder&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)
@@ -20,12 +20,12 @@
20
20
 
21
21
  ## Why centralize environment variables?
22
22
 
23
- Envilder is a CLI tool for .env automation, AWS SSM secrets management, and secure environment variable sync.
23
+ Envilder is a CLI tool for .env automation, cloud secrets management, and secure environment variable sync.
24
24
  Generating and maintaining consistent .env files is a real pain point for any development team. From outdated
25
25
  secrets to insecure practices, the risks are tangible. Envilder eliminates these pitfalls by centralizing and
26
26
  automating secret management across real-world environments (dev, test, production) in a simple, secure, and
27
- efficient way. Use Envilder to automate .env files, sync secrets with AWS Parameter Store, and streamline
28
- onboarding and CI/CD workflows.
27
+ efficient way. Use Envilder to automate .env files, sync secrets with AWS SSM Parameter Store or Azure Key Vault,
28
+ and streamline onboarding and CI/CD workflows.
29
29
 
30
30
  ---
31
31
 
@@ -40,10 +40,11 @@ onboarding and CI/CD workflows.
40
40
 
41
41
  ## ✅ How Envilder makes life easier
42
42
 
43
- - 🛡️ Centralizes secrets in AWS Parameter Store
43
+ - 🛡️ Centralizes secrets in AWS SSM Parameter Store or Azure Key Vault
44
+ - ☁️ Multi-provider support — choose `aws` or `azure` with the `--provider` flag
44
45
  - ⚙️ Generates .env files automatically for every environment
45
46
  - 🔄 Applies changes idempotently and instantly
46
- - 🔐 Improves security: no need to share secrets manually; everything is managed via AWS SSM
47
+ - 🔐 Improves security: no need to share secrets manually; everything is managed via your cloud provider
47
48
  - 👥 Simplifies onboarding and internal rotations
48
49
  - 🚀 Enables cloud-native, infrastructure-as-code secret management
49
50
  - 🤖 Perfect for DevOps, CI/CD, and team sync
@@ -64,9 +65,22 @@ onboarding and CI/CD workflows.
64
65
  - [🚀 Quick Start](#-quick-start)
65
66
  - [🎥 Video Demonstration](#-video-demonstration)
66
67
  - [🏁 Get Started (3 steps)](#-get-started-3-steps)
68
+ - [AWS SSM (default)](#aws-ssm-default)
69
+ - [Azure Key Vault](#azure-key-vault)
67
70
  - [📚 Quick Links](#-quick-links)
71
+ - [🗺️ Mapping File Format](#️-mapping-file-format)
72
+ - [Basic Format (AWS SSM — default)](#basic-format-aws-ssm--default)
73
+ - [With `$config` (explicit provider)](#with-config-explicit-provider)
74
+ - [`$config` Options](#config-options)
75
+ - [Configuration Priority](#configuration-priority)
68
76
  - [🛠️ How it works](#️-how-it-works)
69
77
  - [Frequently Asked Questions (FAQ)](#frequently-asked-questions-faq)
78
+ - [🔍 Envilder vs. Alternatives](#-envilder-vs-alternatives)
79
+ - [Secrets sync tools (direct alternatives)](#secrets-sync-tools-direct-alternatives)
80
+ - [Runtime \& credential tools (not direct alternatives)](#runtime--credential-tools-not-direct-alternatives)
81
+ - [When to use what](#when-to-use-what)
82
+ - [Why choose Envilder?](#why-choose-envilder)
83
+ - [Where Envilder fits best](#where-envilder-fits-best)
70
84
  - [🏁 Roadmap](#-roadmap)
71
85
  - [🤝 Contributing](#-contributing)
72
86
  - [📜 License](#-license)
@@ -75,16 +89,18 @@ onboarding and CI/CD workflows.
75
89
 
76
90
  ## ⚙️ Features
77
91
 
78
- - 🔒 **Strict access control** — IAM policies define access to secrets across stages (dev, staging, prod)
79
- - 📊 **Auditable** — All reads/writes are logged in AWS CloudTrail
92
+ - 🔒 **Strict access control** — IAM policies (AWS) or RBAC (Azure) define access to secrets across stages
93
+ (dev, staging, prod)
94
+ - 📊 **Auditable** — All reads/writes are logged in AWS CloudTrail or Azure Monitor
80
95
  - 🧩 **Single source of truth** — No more Notion, emails or copy/paste of envs
81
- - 🔁 **Idempotent sync** — Only whats in your map gets updated. Nothing else is touched
82
- - 🧱 **Zero infrastructure** — Fully based on native AWS SSM. No Lambdas, no servers, no fuss
96
+ - 🔁 **Idempotent sync** — Only what's in your map gets updated. Nothing else is touched
97
+ - 🧱 **Zero infrastructure** — Fully based on native cloud services. No Lambdas, no servers, no fuss
83
98
 
84
99
  ### 🧱 Feature Status
85
100
 
86
101
  - 🤖 **GitHub Action** — [Integrate directly in CI/CD workflows](./github-action/README.md)
87
- - 📤 **Push & Pull** — Bidirectional sync between local `.env` and AWS SSM
102
+ - 📤 **Push & Pull** — Bidirectional sync between local `.env` and your cloud provider
103
+ - ☁️ **Multi-provider** — AWS SSM Parameter Store and Azure Key Vault
88
104
  - 🎯 **AWS Profile support** — Use `--profile` flag for multi-account setups
89
105
 
90
106
  ---
@@ -94,23 +110,40 @@ onboarding and CI/CD workflows.
94
110
  🛠 Requirements:
95
111
 
96
112
  - Node.js **v20+** (cloud-native compatible)
97
- - AWS CLI installed and configured
98
- - IAM user/role with `ssm:GetParameter`, `ssm:PutParameter`
113
+ - **AWS provider**: AWS CLI installed and configured; IAM user/role with `ssm:GetParameter`, `ssm:PutParameter`
114
+ - **Azure provider**: Azure CLI installed; vault URL configured via
115
+ `$config.vaultUrl` in your map file or `--vault-url` flag
99
116
 
100
117
  ```bash
101
118
  pnpm add -g envilder
102
119
  ```
103
120
 
121
+ Or use your preferred package manager:
122
+
123
+ ```bash
124
+ npm install -g envilder
125
+ ```
126
+
127
+ > 💡 **Want to try without installing?** Run `npx envilder --help` to explore the CLI instantly.
128
+ >
104
129
  > 💡 **New to AWS SSM?** AWS Systems Manager Parameter Store provides secure storage for configuration data and secrets:
105
130
  >
106
131
  > - [AWS SSM Parameter Store Overview](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html)
107
132
  > - [Setting up AWS CLI credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
108
133
  > - [IAM permissions for SSM](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html)
134
+ >
135
+ > 💡 **New to Azure Key Vault?** Azure Key Vault safeguards cryptographic keys and secrets used by cloud apps:
136
+ >
137
+ > - [Azure Key Vault Overview](https://learn.microsoft.com/en-us/azure/key-vault/general/overview)
138
+ > - [Setting up Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
139
+ > - [Key Vault access policies](https://learn.microsoft.com/en-us/azure/key-vault/general/assign-access-policy)
109
140
 
110
141
  ### 🤖 GitHub Action
111
142
 
112
143
  Use Envilder directly in your CI/CD workflows with our official GitHub Action:
113
144
 
145
+ **AWS SSM (default):**
146
+
114
147
  ```yaml
115
148
  - name: Configure AWS Credentials
116
149
  uses: aws-actions/configure-aws-credentials@v5
@@ -119,10 +152,29 @@ Use Envilder directly in your CI/CD workflows with our official GitHub Action:
119
152
  aws-region: us-east-1
120
153
 
121
154
  - name: Pull secrets from AWS SSM
122
- uses: macalbert/envilder/github-action@v0.7.11
155
+ uses: macalbert/envilder/github-action@v0.8.0
156
+ with:
157
+ map-file: param-map.json
158
+ env-file: .env
159
+ ```
160
+
161
+ **Azure Key Vault:**
162
+
163
+ ```yaml
164
+ - name: Azure Login
165
+ uses: azure/login@v2
166
+ with:
167
+ client-id: ${{ secrets.AZURE_CLIENT_ID }}
168
+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}
169
+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
170
+
171
+ - name: Pull secrets from Azure Key Vault
172
+ uses: macalbert/envilder/github-action@v0.8.0
123
173
  with:
124
174
  map-file: param-map.json
125
175
  env-file: .env
176
+ provider: azure
177
+ vault-url: ${{ secrets.AZURE_KEY_VAULT_URL }}
126
178
  ```
127
179
 
128
180
  📖 **[View full GitHub Action documentation](./github-action/README.md)**
@@ -139,8 +191,9 @@ Watch how easy it is to automate your .env management in less than 1 minute:
139
191
 
140
192
  ### 🏁 Get Started (3 steps)
141
193
 
142
- After configuring the AWS CLI and ensuring you have the necessary permissions to create SSM parameters,
143
- you can begin pushing your first environment variables.
194
+ After configuring your cloud provider credentials, you can begin managing your secrets.
195
+
196
+ #### AWS SSM (default)
144
197
 
145
198
  1. **Create a mapping file:**
146
199
 
@@ -153,18 +206,42 @@ you can begin pushing your first environment variables.
153
206
  2. **Push a secret to AWS SSM:**
154
207
 
155
208
  ```bash
156
- envilder --push --key=DB_PASSWORD --value=12345 --ssm-path=/my-app/db/password
209
+ envilder --push --key=DB_PASSWORD --value=12345 --secret-path=/my-app/db/password
157
210
  ```
158
211
 
159
- Once your secrets are stored in AWS, you can easily generate or synchronize your local .env files:
212
+ 3. **Generate your .env file from AWS SSM:**
213
+
214
+ ```bash
215
+ envilder --map=param-map.json --envfile=.env
216
+ ```
160
217
 
161
- 1. **Generate your .env file from AWS SSM:**
218
+ #### Azure Key Vault
219
+
220
+ 1. **Add `$config` to your mapping file:**
221
+
222
+ ```json
223
+ {
224
+ "$config": {
225
+ "provider": "azure",
226
+ "vaultUrl": "https://my-vault.vault.azure.net"
227
+ },
228
+ "DB_PASSWORD": "my-app-db-password"
229
+ }
230
+ ```
231
+
232
+ 2. **Pull secrets from Azure Key Vault:**
162
233
 
163
234
  ```bash
164
235
  envilder --map=param-map.json --envfile=.env
165
236
  ```
166
237
 
167
- Your secrets are now managed and versioned from AWS SSM. Add `.env` to your `.gitignore` for security.
238
+ Or use CLI flags to override:
239
+
240
+ ```bash
241
+ envilder --provider=azure --vault-url=https://my-vault.vault.azure.net --map=param-map.json --envfile=.env
242
+ ```
243
+
244
+ Your secrets are now managed and versioned from your cloud provider. Add `.env` to your `.gitignore` for security.
168
245
  Envilder is designed for automation, onboarding, and secure cloud-native workflows.
169
246
 
170
247
  ### 📚 Quick Links
@@ -175,57 +252,226 @@ Envilder is designed for automation, onboarding, and secure cloud-native workflo
175
252
 
176
253
  ---
177
254
 
255
+ ## 🗺️ Mapping File Format
256
+
257
+ The mapping file (`param-map.json`) is the core of Envilder. It maps environment variable names to secret paths
258
+ in your cloud provider. You can optionally include a `$config` section to declare which provider and settings to use.
259
+
260
+ ### Basic Format (AWS SSM — default)
261
+
262
+ When no `$config` is present, Envilder defaults to AWS SSM Parameter Store:
263
+
264
+ ```json
265
+ {
266
+ "API_KEY": "/myapp/prod/api-key",
267
+ "DB_PASSWORD": "/myapp/prod/db-password",
268
+ "SECRET_TOKEN": "/myapp/prod/secret-token"
269
+ }
270
+ ```
271
+
272
+ Values are SSM parameter paths (e.g., `/myapp/prod/api-key`).
273
+
274
+ ### With `$config` (explicit provider)
275
+
276
+ Add a `$config` key to declare the provider and its settings. Envilder reads `$config` for configuration
277
+ and uses all other keys as secret mappings:
278
+
279
+ **AWS SSM with profile:**
280
+
281
+ ```json
282
+ {
283
+ "$config": {
284
+ "provider": "aws",
285
+ "profile": "prod-account"
286
+ },
287
+ "API_KEY": "/myapp/prod/api-key",
288
+ "DB_PASSWORD": "/myapp/prod/db-password"
289
+ }
290
+ ```
291
+
292
+ **Azure Key Vault:**
293
+
294
+ ```json
295
+ {
296
+ "$config": {
297
+ "provider": "azure",
298
+ "vaultUrl": "https://my-vault.vault.azure.net"
299
+ },
300
+ "API_KEY": "myapp-prod-api-key",
301
+ "DB_PASSWORD": "myapp-prod-db-password"
302
+ }
303
+ ```
304
+
305
+ > **Azure naming:** Key Vault secret names only allow alphanumeric characters and hyphens.
306
+ > Envilder automatically normalizes names — slashes and underscores become hyphens
307
+ > (e.g., `/myapp/db/password` → `myapp-db-password`).
308
+
309
+ ### `$config` Options
310
+
311
+ | Key | Type | Default | Description |
312
+ | --- | --- | --- | --- |
313
+ | `provider` | `"aws"` \| `"azure"` | `"aws"` | Cloud provider to use |
314
+ | `vaultUrl` | `string` | — | Azure Key Vault URL (required when `provider` is `"azure"`) |
315
+ | `profile` | `string` | — | AWS CLI profile for multi-account setups (AWS only) |
316
+
317
+ ### Configuration Priority
318
+
319
+ CLI flags and GitHub Action inputs always override `$config` values:
320
+
321
+ ```txt
322
+ CLI flags / GHA inputs > $config in map file > defaults (AWS)
323
+ ```
324
+
325
+ This means you can set a default provider in `$config` and override it per invocation:
326
+
327
+ ```bash
328
+ # Uses $config from the map file
329
+ envilder --map=param-map.json --envfile=.env
330
+
331
+ # Overrides provider and vault URL from the map file
332
+ envilder --provider=azure --vault-url=https://other-vault.vault.azure.net --map=param-map.json --envfile=.env
333
+ ```
334
+
335
+ ---
336
+
178
337
  ## 🛠️ How it works
179
338
 
180
339
  ```mermaid
181
340
  graph LR
182
- A["Mapping File<br/>(param-map.json)"] --> B[Envilder]:::core
183
- C["Environment File<br/> '.env' or --key"] --> B
184
- D["AWS Credentials"]:::aws --> B
185
- E["AWS SSM"]:::aws --> B
186
- B --> F["Pull/Push Secrets 💾"]
341
+ A["Mapping File (param-map.json)"] --> B[Envilder]:::core
342
+ C["Environment File (.env or --key)"] --> B
343
+ D["Cloud Credentials (AWS or Azure)"]:::cloud --> B
344
+ E["AWS SSM / Azure Key Vault"]:::cloud --> B
345
+ B --> F["Pull/Push Secrets"]
187
346
 
188
- classDef aws fill:#ffcc66,color:#000000,stroke:#333,stroke-width:1.5px;
347
+ classDef cloud fill:#ffcc66,color:#000000,stroke:#333,stroke-width:1.5px;
189
348
  classDef core fill:#1f3b57,color:#fff,stroke:#ccc,stroke-width:2px;
190
349
  ```
191
350
 
192
- 1. Create a new `.env` file like `'ENV_VAR=12345'`
193
- 2. Define mappings in a JSON file : `{"ENV_VAR": "ssm/path"}`
194
- 3. Run Envilder: `--push` to upload, or `--map` + `--envfile` to generate
195
- 4. Envilder syncs secrets securely with AWS SSM Parameter Store using your AWS credentials
196
- 5. Result: your secrets are always up-to-date, secure, and ready for any environment
351
+ 1. Define mappings in a JSON file: `{"DB_PASSWORD": "/myapp/db/password"}`
352
+ 2. **Pull** secrets into a `.env` file: `envilder --map=param-map.json --envfile=.env`
353
+ 3. **Push** local values back: `envilder --push --map=param-map.json --envfile=.env`
354
+ 4. Envilder syncs secrets securely with AWS SSM or Azure Key Vault using your cloud credentials
355
+ 5. Use `--provider=azure` to switch from the default AWS provider
356
+ 6. Result: your secrets are always up-to-date, secure, and ready for any environment
197
357
 
198
358
  ---
199
359
 
200
360
  ## Frequently Asked Questions (FAQ)
201
361
 
202
362
  **Q: What is Envilder?**
203
- A: Envilder is a CLI tool for automating .env and secret management using AWS SSM Parameter Store.
363
+ A: Envilder is a CLI tool for automating .env and secret management using AWS SSM Parameter Store or Azure Key Vault.
364
+
365
+ **Q: Which cloud providers are supported?**
366
+ A: AWS SSM Parameter Store (default) and Azure Key Vault. Use `--provider=azure` to switch providers.
204
367
 
205
368
  **Q: How does Envilder improve security?**
206
- A: Secrets are never stored in code or shared via chat/email. All secrets are managed and synced securely via AWS SSM.
369
+ A: Secrets are never stored in code or shared via chat/email. All secrets are managed and synced securely via your
370
+ cloud provider.
207
371
 
208
372
  **Q: Can I use Envilder in CI/CD pipelines?**
209
- A: Yes! Envilder is designed for automation and works seamlessly in CI/CD workflows.
373
+ A: Yes! Use the official [Envilder GitHub Action](./github-action/README.md) to pull secrets directly
374
+ in your workflows — no extra setup needed.
210
375
 
211
376
  **Q: Does Envilder support multiple AWS profiles?**
212
377
  A: Yes, you can use the `--profile` flag to select different AWS credentials.
213
378
 
379
+ **Q: How do I configure Azure Key Vault?**
380
+ A: Add a `$config` section to your map file with `"provider": "azure"` and `"vaultUrl": "https://my-vault.vault.azure.net"`,
381
+ or use `--provider=azure --vault-url=https://my-vault.vault.azure.net` CLI flags. Authentication uses Azure
382
+ Default Credentials (Azure CLI, managed identity, etc.).
383
+
214
384
  **Q: What environments does Envilder support?**
215
- A: Any environment supported by AWS SSM—dev, test, staging, production, etc.
385
+ A: Any environment supported by your cloud provider—dev, test, staging, production, etc.
216
386
 
217
387
  **Q: Is Envilder open source?**
218
388
  A: Yes, licensed under MIT.
219
389
 
220
390
  ---
221
391
 
392
+ ## 🔍 Envilder vs. Alternatives
393
+
394
+ Envilder is not a secrets manager. It is a **deterministic projection layer** from cloud secret
395
+ stores into `.env` files. It does not store secrets, does not require a backend, and integrates
396
+ cleanly into CI/CD pipelines.
397
+
398
+ To make a fair comparison, it's important to separate tools by what they actually do:
399
+
400
+ ### Secrets sync tools (direct alternatives)
401
+
402
+ These tools manage secrets as data and project them into `.env` or runtime:
403
+
404
+ | Feature | Envilder | dotenv-vault | infisical |
405
+ |---------|----------|-------------|----------|
406
+ | **Source of truth** | External (SSM / Key Vault) | dotenv vault (SaaS) | Infisical backend |
407
+ | **Sync direction** | Bidirectional | Pull only | Bidirectional |
408
+ | **Declarative mapping** | ✅ JSON mapping | ❌ | ❌ |
409
+ | **Multi-provider (AWS + Azure)** | ✅ | ❌ | ⚠️ (primarily its own backend) |
410
+ | **Local `.env` generation** | ✅ | ✅ | ✅ |
411
+ | **CI/CD integration** | ✅ Native GitHub Action | Manual | ✅ Native |
412
+ | **Requires SaaS** | ❌ | ✅ | Optional |
413
+ | **Self-hosted** | N/A (no server needed) | ❌ | ✅ |
414
+ | **Complexity** | Low | Low | Medium |
415
+ | **Vendor lock-in** | Low | High | Medium |
416
+ | **Open source** | ✅ MIT | Partial | ✅ |
417
+
418
+ ### Runtime & credential tools (not direct alternatives)
419
+
420
+ These tools serve different purposes and are better seen as **complements**, not competitors:
421
+
422
+ | Tool | Purpose | Manages app secrets? | Works with `.env`? |
423
+ |------|---------|---------------------|-------------------|
424
+ | **chamber** | Injects SSM params at runtime (`exec` with env) | ❌ | ❌ |
425
+ | **aws-vault** | Safely assumes AWS IAM roles / STS credentials | ❌ | ❌ |
426
+
427
+ ### When to use what
428
+
429
+ - **Need a full vault with its own backend?** → [Infisical](https://infisical.com)
430
+ - **Need SaaS simplicity for `.env` sync?** → [dotenv-vault](https://www.dotenv.org/vault)
431
+ - **Need a projection layer from existing cloud stores?** → **Envilder**
432
+
433
+ ### Why choose Envilder?
434
+
435
+ If you already use AWS SSM or Azure Key Vault and want a lightweight, zero-infrastructure CLI
436
+ that generates `.env` files from a declarative JSON mapping — without a SaaS dependency or extra
437
+ servers — Envilder is the simplest path.
438
+
439
+ Envilder also brings unique strengths in **determinism** and **testability**:
440
+
441
+ - **Versioned mappings** — your `param-map.json` lives in source control, making secret
442
+ projections reproducible across environments
443
+ - **Mockable architecture** — hexagonal design with port interfaces makes offline testing
444
+ and CI validation straightforward
445
+ - **Audit trail** — all reads/writes are logged by your cloud provider
446
+ (AWS CloudTrail / Azure Monitor), not by a third-party SaaS
447
+
448
+ ### Where Envilder fits best
449
+
450
+ Envilder generates `.env` files on disk. This is ideal for:
451
+
452
+ - **Local development** — onboard new team members with a single command
453
+ - **CI/CD pipelines** — inject secrets at build time without hardcoding them
454
+ - **SSG/SSR builds** — frameworks like Next.js, Nuxt, or Astro that read env vars at build time
455
+
456
+ For **production runtime**, container orchestrators (ECS, Kubernetes) and platform services
457
+ (Vercel, Fly.io) can inject secrets directly as environment variables — no `.env` file needed.
458
+ In those cases, prefer native secret injection over writing secrets to disk.
459
+
460
+ > **Coming soon:** An `--exec` mode is planned to inject secrets directly into a child process
461
+ > without writing to disk (e.g., `envilder exec -- node server.js`). See the [Roadmap](./ROADMAP.md).
462
+
463
+ ---
464
+
222
465
  ## 🏁 Roadmap
223
466
 
224
467
  We're continuously improving Envilder based on community feedback. Upcoming features include:
225
468
 
226
- - 🔌 **Multi-backend support** (Azure Key Vault, HashiCorp Vault, etc.)
469
+ - **Azure Key Vault support** now available alongside AWS SSM
470
+ - � **Exec mode** — inject secrets into a child process without writing to disk
227
471
  - 🔍 **Check/sync mode** for drift detection
472
+ - 🌐 **Documentation website** — dedicated docs site with guides and examples
228
473
  - 🧠 **Auto-discovery** for bulk parameter fetching
474
+ - 🔌 **More backends** (HashiCorp Vault, GCP Secret Manager, etc.)
229
475
 
230
476
  👉 **[View full roadmap with priorities](./ROADMAP.md)**
231
477
 
package/ROADMAP.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # 🛣️ Envilder Roadmap
2
2
 
3
- Envilder aims to be the simplest, most reliable way to generate `.env` files from AWS SSM Parameter Store
4
- — for both local development and CI/CD pipelines.
3
+ Envilder aims to be the simplest, most reliable way to generate `.env` files from cloud secret stores
4
+ (AWS SSM Parameter Store, Azure Key Vault) — for both local development and CI/CD pipelines.
5
5
 
6
6
  > **Note:** This roadmap contains ideas and potential features based on initial vision and community feedback.
7
7
  > Not all features are guaranteed to be implemented. Priorities may change based on user needs, feedback,
@@ -11,6 +11,8 @@ Envilder aims to be the simplest, most reliable way to generate `.env` files fro
11
11
 
12
12
  ## Feature Status & Roadmap
13
13
 
14
+ <!-- markdownlint-disable MD013 -->
15
+
14
16
  | Feature | Status | Priority | Notes |
15
17
  |---------|--------|----------|-------|
16
18
  | **Mapping-based resolution** | ✅ Implemented | - | Core functionality |
@@ -19,12 +21,16 @@ Envilder aims to be the simplest, most reliable way to generate `.env` files fro
19
21
  | **Push mode** (`--push`) | ✅ Implemented | - | [Guide](./docs/push-command.md) |
20
22
  | **GitHub Action** | ✅ Implemented | - | [Documentation](./github-action/README.md) |
21
23
  | **Onboarding documentation** | ✅ Implemented | - | [Setup guide](./docs/requirements-installation.md) |
22
- | **Plugin system / Multi-backend** | Planned | 🔥 Next | Starting with Azure Key Vault support |
24
+ | **Plugin system / Multi-backend** | Implemented | - | Azure Key Vault support with `$config` map-file section ([#90](https://github.com/macalbert/envilder/pull/90)) |
25
+ | **Exec mode** (`--exec`) | ❌ Planned | High | Inject secrets into child process env without writing to disk (`envilder exec -- node server.js`) |
23
26
  | **Check/sync mode** (`--check`) | ❌ Planned | High | Validate SSM vs `.env`, fail CI if out-of-sync |
27
+ | **Documentation website** | ❌ Planned | Medium | Dedicated docs site with guides, examples, and API reference |
24
28
  | **Auto-discovery mode** (`--auto`) | ❌ Planned | Medium | Fetch all parameters with a given prefix |
29
+ | **Exec with refresh** (`--refresh-interval`) | ❌ Future | Low | Kill & restart child process periodically with fresh secrets (requires `--exec`) |
25
30
  | **Webhook/Slack notifications** | ❌ Planned | Low | Notify on secret sync for audit/logging |
26
31
  | **Hierarchical mapping** | ❌ Future | Low | Per-environment `param-map.json` |
27
- | **Web-based demo** | ❌ Future | Low | Interactive mapping tester |
32
+
33
+ <!-- markdownlint-enable MD013 -->
28
34
 
29
35
  ---
30
36
 
package/docs/CHANGELOG.md CHANGED
@@ -1,6 +1,50 @@
1
1
  <!-- markdownlint-disable MD024 -->
2
2
  # Changelog
3
3
 
4
+ ## [0.8.0] - 2026-03-22
5
+
6
+ ### Added
7
+
8
+ * **`$config` section in map files** — Map files now support an optional `$config` key to declare provider and connection
9
+ details inline (e.g., `"provider": "azure"`, `"vaultUrl": "https://..."`, `"profile": "dev-account"`)
10
+ * New CLI flag `--vault-url <url>` — Azure Key Vault URL, overrides `$config.vaultUrl` in the map file
11
+ * New GitHub Action input `vault-url` — Azure Key Vault URL, overrides `$config.vaultUrl` in the map file
12
+ * Precedence chain: CLI flags / GHA inputs > `$config` in map file > defaults
13
+ * Backward compatible: existing map files without `$config` continue to work (defaults to AWS provider)
14
+ * **Azure Key Vault support** — Use `--provider=azure` (CLI) or `provider: azure` (GitHub Action) to pull/push secrets
15
+ from Azure Key Vault ([#90](https://github.com/macalbert/envilder/pull/90))
16
+ * New infrastructure adapter: `AzureKeyVaultSecretProvider` implementing `ISecretProvider`
17
+ * New CLI option `--provider <name>` to select cloud provider (`aws` or `azure`, default: `aws`)
18
+ * New GitHub Action input `provider` for selecting the cloud provider
19
+ * Azure authentication via `DefaultAzureCredential` (supports Azure CLI, managed identity, etc.)
20
+ * Automatic secret name normalization for Azure Key Vault naming constraints
21
+
22
+ ### Changed
23
+
24
+ * **CLI flag `--ssm-path` renamed to `--secret-path`** — The old flag is still accepted as a deprecated alias and
25
+ prints a warning. It will be removed in a future release.
26
+ * `configureInfrastructureServices()` now receives a single `MapFileConfig` object instead of separate parameters
27
+ * CLI and GHA entry points read `$config` from the map file and merge with CLI flags / GHA inputs
28
+ * Extracted shared `ContainerConfiguration` module (`src/apps/shared/`) for DI setup reused by CLI and GitHub Action
29
+ * Both `Startup.ts` files (CLI and GHA) now delegate to shared `configureInfrastructureServices()` and `configureApplicationServices()`
30
+ * Updated CLI description to include Azure Key Vault examples
31
+ * Updated `action.yml` description and inputs to reflect multi-provider support
32
+
33
+ ### Dependencies
34
+
35
+ * Added `@azure/keyvault-secrets`
36
+ * Added `@azure/identity`
37
+ * Added `@azure/core-rest-pipeline`
38
+
39
+ ### Documentation
40
+
41
+ * Updated all documentation to reflect `$config` map-file section and `--vault-url` flag
42
+ * Updated architecture diagrams and DI code snippets
43
+ * Updated GitHub Action examples to use `vault-url` input
44
+ * Updated ROADMAP to mark Azure Key Vault as fully implemented
45
+
46
+ ---
47
+
4
48
  ## [0.7.6] - 2026-01-16
5
49
 
6
50
  ### Fixed
package/docs/SECURITY.md CHANGED
@@ -54,9 +54,25 @@ When using Envilder, follow these security guidelines:
54
54
  - ❌ Store AWS access keys in code or environment variables
55
55
  - ❌ Share AWS credentials via Slack, email, or chat
56
56
 
57
+ ### Azure Credentials
58
+
59
+ **DO**:
60
+
61
+ - ✅ Use workload identity federation (OIDC) for GitHub Actions ([setup guide](https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation-create-trust-github))
62
+ - ✅ Use managed identities in Azure-hosted environments
63
+ - ✅ Scope Key Vault access to specific secrets and operations
64
+ - ✅ Set vault URL via `$config.vaultUrl` in your map file or `--vault-url` flag—never hardcode secrets in code
65
+
66
+ **DON'T**:
67
+
68
+ - ❌ Store Azure client secrets in code
69
+ - ❌ Use overly broad Key Vault access policies
70
+
57
71
  ### IAM Permissions
58
72
 
59
- Envilder requires these AWS permissions:
73
+ Envilder requires these cloud provider permissions:
74
+
75
+ #### AWS
60
76
 
61
77
  ```json
62
78
  {
@@ -107,7 +123,7 @@ When using Envilder GitHub Action:
107
123
  **DO**:
108
124
 
109
125
  - ✅ Use OIDC authentication instead of static credentials ([OIDC setup guide](https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services))
110
- - ✅ Pin action versions (e.g., `@v1.0.0` instead of `@main`)
126
+ - ✅ Pin action versions (e.g., `@v0.8.0` instead of `@main`)
111
127
  - ✅ Review action code before using in production
112
128
 
113
129
  **DON'T**:
@@ -135,6 +151,14 @@ View current security status: [![Known Vulnerabilities](https://snyk.io/test/git
135
151
  - Access is controlled via IAM policies
136
152
  - Supports versioning and automatic rotation
137
153
 
154
+ ### Azure Key Vault
155
+
156
+ - Secrets are encrypted at rest using Azure-managed or customer-managed keys
157
+ - All access is logged in Azure Monitor and Activity Log
158
+ - Access is controlled via Azure RBAC or Key Vault access policies
159
+ - Supports secret versioning, expiration dates, and soft delete
160
+ - Network isolation available via private endpoints and firewall rules
161
+
138
162
  ### Local Environment Files
139
163
 
140
164
  - Generated `.env` files contain sensitive data
@@ -1 +1 @@
1
- {"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../../../src/apps/cli/Cli.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAuB1B,wBAAsB,IAAI,kBAgDzB"}
1
+ {"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../../../src/apps/cli/Cli.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AA0B1B,wBAAsB,IAAI,kBAqHzB"}