envilder 0.7.12 → 0.9.1
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.
- package/README.md +284 -37
- package/ROADMAP.md +81 -16
- package/docs/CHANGELOG.md +43 -101
- package/docs/SECURITY.md +26 -2
- package/lib/apps/cli/Cli.d.ts.map +1 -1
- package/lib/apps/cli/Cli.js +68 -11
- package/lib/apps/cli/Cli.js.map +1 -1
- package/lib/apps/cli/Startup.d.ts +3 -9
- package/lib/apps/cli/Startup.d.ts.map +1 -1
- package/lib/apps/cli/Startup.js +4 -54
- package/lib/apps/cli/Startup.js.map +1 -1
- package/lib/apps/gha/Gha.d.ts.map +1 -1
- package/lib/apps/gha/Gha.js +36 -19
- package/lib/apps/gha/Gha.js.map +1 -1
- package/lib/apps/gha/Startup.d.ts +3 -9
- package/lib/apps/gha/Startup.d.ts.map +1 -1
- package/lib/apps/gha/Startup.js +4 -54
- package/lib/apps/gha/Startup.js.map +1 -1
- package/lib/apps/shared/ContainerConfiguration.d.ts +7 -0
- package/lib/apps/shared/ContainerConfiguration.d.ts.map +1 -0
- package/lib/apps/shared/ContainerConfiguration.js +62 -0
- package/lib/apps/shared/ContainerConfiguration.js.map +1 -0
- package/lib/envilder/application/dispatch/DispatchActionCommand.d.ts +2 -2
- package/lib/envilder/application/dispatch/DispatchActionCommand.d.ts.map +1 -1
- package/lib/envilder/application/dispatch/DispatchActionCommand.js +6 -6
- package/lib/envilder/application/dispatch/DispatchActionCommand.js.map +1 -1
- package/lib/envilder/application/dispatch/DispatchActionCommandHandler.d.ts +3 -3
- package/lib/envilder/application/dispatch/DispatchActionCommandHandler.d.ts.map +1 -1
- package/lib/envilder/application/dispatch/DispatchActionCommandHandler.js +13 -13
- package/lib/envilder/application/dispatch/DispatchActionCommandHandler.js.map +1 -1
- package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommand.d.ts +7 -0
- package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommand.d.ts.map +1 -0
- package/lib/envilder/application/{pullSsmToEnv/PullSsmToEnvCommand.js → pullSecretsToEnv/PullSecretsToEnvCommand.js} +3 -3
- package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommand.js.map +1 -0
- package/lib/envilder/application/{pullSsmToEnv/PullSsmToEnvCommandHandler.d.ts → pullSecretsToEnv/PullSecretsToEnvCommandHandler.d.ts} +7 -7
- package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommandHandler.d.ts.map +1 -0
- package/lib/envilder/application/{pullSsmToEnv/PullSsmToEnvCommandHandler.js → pullSecretsToEnv/PullSecretsToEnvCommandHandler.js} +18 -18
- package/lib/envilder/application/pullSecretsToEnv/PullSecretsToEnvCommandHandler.js.map +1 -0
- package/lib/envilder/application/{pushEnvToSsm/PushEnvToSsmCommand.d.ts → pushEnvToSecrets/PushEnvToSecretsCommand.d.ts} +3 -3
- package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommand.d.ts.map +1 -0
- package/lib/envilder/application/{pushEnvToSsm/PushEnvToSsmCommand.js → pushEnvToSecrets/PushEnvToSecretsCommand.js} +3 -3
- package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommand.js.map +1 -0
- package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommandHandler.d.ts +34 -0
- package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommandHandler.d.ts.map +1 -0
- package/lib/envilder/application/{pushEnvToSsm/PushEnvToSsmCommandHandler.js → pushEnvToSecrets/PushEnvToSecretsCommandHandler.js} +36 -32
- package/lib/envilder/application/pushEnvToSecrets/PushEnvToSecretsCommandHandler.js.map +1 -0
- package/lib/envilder/application/pushSingle/PushSingleCommand.d.ts +3 -3
- package/lib/envilder/application/pushSingle/PushSingleCommand.d.ts.map +1 -1
- package/lib/envilder/application/pushSingle/PushSingleCommand.js +4 -4
- package/lib/envilder/application/pushSingle/PushSingleCommand.js.map +1 -1
- package/lib/envilder/application/pushSingle/PushSingleCommandHandler.d.ts +2 -2
- package/lib/envilder/application/pushSingle/PushSingleCommandHandler.d.ts.map +1 -1
- package/lib/envilder/application/pushSingle/PushSingleCommandHandler.js +6 -6
- package/lib/envilder/application/pushSingle/PushSingleCommandHandler.js.map +1 -1
- package/lib/envilder/domain/CliOptions.d.ts +3 -3
- package/lib/envilder/domain/CliOptions.d.ts.map +1 -1
- package/lib/envilder/domain/EnvironmentVariable.d.ts +5 -0
- package/lib/envilder/domain/EnvironmentVariable.d.ts.map +1 -1
- package/lib/envilder/domain/EnvironmentVariable.js +12 -3
- package/lib/envilder/domain/EnvironmentVariable.js.map +1 -1
- package/lib/envilder/domain/MapFileConfig.d.ts +10 -0
- package/lib/envilder/domain/MapFileConfig.d.ts.map +1 -0
- package/lib/envilder/domain/MapFileConfig.js +2 -0
- package/lib/envilder/domain/MapFileConfig.js.map +1 -0
- package/lib/envilder/domain/OperationMode.d.ts +2 -2
- package/lib/envilder/domain/OperationMode.d.ts.map +1 -1
- package/lib/envilder/domain/OperationMode.js +2 -2
- package/lib/envilder/domain/OperationMode.js.map +1 -1
- package/lib/envilder/domain/ports/IVariableStore.d.ts +2 -0
- package/lib/envilder/domain/ports/IVariableStore.d.ts.map +1 -1
- package/lib/envilder/infrastructure/aws/AwsSecretProviderFactory.d.ts +4 -0
- package/lib/envilder/infrastructure/aws/AwsSecretProviderFactory.d.ts.map +1 -0
- package/lib/envilder/infrastructure/aws/AwsSecretProviderFactory.js +10 -0
- package/lib/envilder/infrastructure/aws/AwsSecretProviderFactory.js.map +1 -0
- package/lib/envilder/infrastructure/aws/AwsSsmSecretProvider.d.ts.map +1 -1
- package/lib/envilder/infrastructure/aws/AwsSsmSecretProvider.js +3 -1
- package/lib/envilder/infrastructure/aws/AwsSsmSecretProvider.js.map +1 -1
- package/lib/envilder/infrastructure/azure/AzureKeyVaultSecretProvider.d.ts +17 -0
- package/lib/envilder/infrastructure/azure/AzureKeyVaultSecretProvider.d.ts.map +1 -0
- package/lib/envilder/infrastructure/azure/AzureKeyVaultSecretProvider.js +113 -0
- package/lib/envilder/infrastructure/azure/AzureKeyVaultSecretProvider.js.map +1 -0
- package/lib/envilder/infrastructure/azure/AzureSecretProviderFactory.d.ts +9 -0
- package/lib/envilder/infrastructure/azure/AzureSecretProviderFactory.d.ts.map +1 -0
- package/lib/envilder/infrastructure/azure/AzureSecretProviderFactory.js +24 -0
- package/lib/envilder/infrastructure/azure/AzureSecretProviderFactory.js.map +1 -0
- package/lib/envilder/infrastructure/azure/AzureVaultUrlValidator.d.ts +3 -0
- package/lib/envilder/infrastructure/azure/AzureVaultUrlValidator.d.ts.map +1 -0
- package/lib/envilder/infrastructure/azure/AzureVaultUrlValidator.js +28 -0
- package/lib/envilder/infrastructure/azure/AzureVaultUrlValidator.js.map +1 -0
- package/lib/envilder/infrastructure/variableStore/FileVariableStore.d.ts +4 -0
- package/lib/envilder/infrastructure/variableStore/FileVariableStore.d.ts.map +1 -1
- package/lib/envilder/infrastructure/variableStore/FileVariableStore.js +46 -0
- package/lib/envilder/infrastructure/variableStore/FileVariableStore.js.map +1 -1
- package/lib/envilder/types.d.ts +4 -4
- package/lib/envilder/types.js +2 -2
- package/lib/envilder/types.js.map +1 -1
- package/lib/iac/bin/main.d.ts +28 -0
- package/lib/iac/bin/main.d.ts.map +1 -0
- package/lib/iac/bin/main.js +201 -0
- package/lib/iac/bin/main.js.map +1 -0
- package/lib/iac/lib/core/types.d.ts +5 -0
- package/lib/iac/lib/core/types.d.ts.map +1 -0
- package/lib/iac/lib/core/types.js +9 -0
- package/lib/iac/lib/core/types.js.map +1 -0
- package/lib/iac/lib/stacks/customStack.d.ts +23 -0
- package/lib/iac/lib/stacks/customStack.d.ts.map +1 -0
- package/lib/iac/lib/stacks/customStack.js +34 -0
- package/lib/iac/lib/stacks/customStack.js.map +1 -0
- package/lib/iac/lib/stacks/staticWebsiteStack.d.ts +10 -0
- package/lib/iac/lib/stacks/staticWebsiteStack.d.ts.map +1 -0
- package/lib/iac/lib/stacks/staticWebsiteStack.js +163 -0
- package/lib/iac/lib/stacks/staticWebsiteStack.js.map +1 -0
- package/lib/iac/lib/stacks/utils.d.ts +6 -0
- package/lib/iac/lib/stacks/utils.d.ts.map +1 -0
- package/lib/iac/lib/stacks/utils.js +18 -0
- package/lib/iac/lib/stacks/utils.js.map +1 -0
- package/package.json +33 -23
- package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommand.d.ts +0 -7
- package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommand.d.ts.map +0 -1
- package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommand.js.map +0 -1
- package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommandHandler.d.ts.map +0 -1
- package/lib/envilder/application/pullSsmToEnv/PullSsmToEnvCommandHandler.js.map +0 -1
- package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommand.d.ts.map +0 -1
- package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommand.js.map +0 -1
- package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommandHandler.d.ts +0 -34
- package/lib/envilder/application/pushEnvToSsm/PushEnvToSsmCommandHandler.d.ts.map +0 -1
- 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/
|
|
4
|
+
<img src="https://github.com/user-attachments/assets/8a7188ef-9d8d-45fb-8c37-3af718fb5103" 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
|

|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
|
|
21
21
|
## Why centralize environment variables?
|
|
22
22
|
|
|
23
|
-
Envilder is a CLI tool for .env automation,
|
|
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
|
|
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
|
|
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
|
|
79
|
-
|
|
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 what
|
|
82
|
-
- 🧱 **Zero infrastructure** — Fully based on native
|
|
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
|
|
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
|
-
-
|
|
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.
|
|
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
|
|
143
|
-
|
|
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,79 +206,273 @@ 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 --
|
|
209
|
+
envilder --push --key=DB_PASSWORD --value=12345 --secret-path=/my-app/db/password
|
|
157
210
|
```
|
|
158
211
|
|
|
159
|
-
|
|
212
|
+
3. **Generate your .env file from AWS SSM:**
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
envilder --map=param-map.json --envfile=.env
|
|
216
|
+
```
|
|
160
217
|
|
|
161
|
-
|
|
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
|
-
|
|
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
|
|
171
248
|
|
|
249
|
+
- [📖 Full Documentation](https://envilder.com) — Visit envilder.com for the complete guide
|
|
172
250
|
- [Requirements & Installation](docs/requirements-installation.md)
|
|
173
251
|
- [Push Command Guide](docs/push-command.md)
|
|
174
252
|
- [Pull Command Guide](docs/pull-command.md)
|
|
175
253
|
|
|
176
254
|
---
|
|
177
255
|
|
|
256
|
+
## 🗺️ Mapping File Format
|
|
257
|
+
|
|
258
|
+
The mapping file (`param-map.json`) is the core of Envilder. It maps environment variable names to secret paths
|
|
259
|
+
in your cloud provider. You can optionally include a `$config` section to declare which provider and settings to use.
|
|
260
|
+
|
|
261
|
+
### Basic Format (AWS SSM — default)
|
|
262
|
+
|
|
263
|
+
When no `$config` is present, Envilder defaults to AWS SSM Parameter Store:
|
|
264
|
+
|
|
265
|
+
```json
|
|
266
|
+
{
|
|
267
|
+
"API_KEY": "/myapp/prod/api-key",
|
|
268
|
+
"DB_PASSWORD": "/myapp/prod/db-password",
|
|
269
|
+
"SECRET_TOKEN": "/myapp/prod/secret-token"
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Values are SSM parameter paths (e.g., `/myapp/prod/api-key`).
|
|
274
|
+
|
|
275
|
+
### With `$config` (explicit provider)
|
|
276
|
+
|
|
277
|
+
Add a `$config` key to declare the provider and its settings. Envilder reads `$config` for configuration
|
|
278
|
+
and uses all other keys as secret mappings:
|
|
279
|
+
|
|
280
|
+
**AWS SSM with profile:**
|
|
281
|
+
|
|
282
|
+
```json
|
|
283
|
+
{
|
|
284
|
+
"$config": {
|
|
285
|
+
"provider": "aws",
|
|
286
|
+
"profile": "prod-account"
|
|
287
|
+
},
|
|
288
|
+
"API_KEY": "/myapp/prod/api-key",
|
|
289
|
+
"DB_PASSWORD": "/myapp/prod/db-password"
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Azure Key Vault:**
|
|
294
|
+
|
|
295
|
+
```json
|
|
296
|
+
{
|
|
297
|
+
"$config": {
|
|
298
|
+
"provider": "azure",
|
|
299
|
+
"vaultUrl": "https://my-vault.vault.azure.net"
|
|
300
|
+
},
|
|
301
|
+
"API_KEY": "myapp-prod-api-key",
|
|
302
|
+
"DB_PASSWORD": "myapp-prod-db-password"
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
> **Azure naming:** Key Vault secret names only allow alphanumeric characters and hyphens.
|
|
307
|
+
> Envilder automatically normalizes names — slashes and underscores become hyphens
|
|
308
|
+
> (e.g., `/myapp/db/password` → `myapp-db-password`).
|
|
309
|
+
|
|
310
|
+
### `$config` Options
|
|
311
|
+
|
|
312
|
+
| Key | Type | Default | Description |
|
|
313
|
+
| --- | --- | --- | --- |
|
|
314
|
+
| `provider` | `"aws"` \| `"azure"` | `"aws"` | Cloud provider to use |
|
|
315
|
+
| `vaultUrl` | `string` | — | Azure Key Vault URL (required when `provider` is `"azure"`) |
|
|
316
|
+
| `profile` | `string` | — | AWS CLI profile for multi-account setups (AWS only) |
|
|
317
|
+
|
|
318
|
+
### Configuration Priority
|
|
319
|
+
|
|
320
|
+
CLI flags and GitHub Action inputs always override `$config` values:
|
|
321
|
+
|
|
322
|
+
```txt
|
|
323
|
+
CLI flags / GHA inputs > $config in map file > defaults (AWS)
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
This means you can set a default provider in `$config` and override it per invocation:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# Uses $config from the map file
|
|
330
|
+
envilder --map=param-map.json --envfile=.env
|
|
331
|
+
|
|
332
|
+
# Overrides provider and vault URL from the map file
|
|
333
|
+
envilder --provider=azure --vault-url=https://other-vault.vault.azure.net --map=param-map.json --envfile=.env
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
178
338
|
## 🛠️ How it works
|
|
179
339
|
|
|
180
340
|
```mermaid
|
|
181
341
|
graph LR
|
|
182
|
-
A["Mapping File
|
|
183
|
-
C["Environment File
|
|
184
|
-
D["AWS
|
|
185
|
-
E["AWS SSM"]:::
|
|
186
|
-
B --> F["Pull/Push Secrets
|
|
342
|
+
A["Mapping File (param-map.json)"] --> B[Envilder]:::core
|
|
343
|
+
C["Environment File (.env or --key)"] --> B
|
|
344
|
+
D["Cloud Credentials (AWS or Azure)"]:::cloud --> B
|
|
345
|
+
E["AWS SSM / Azure Key Vault"]:::cloud --> B
|
|
346
|
+
B --> F["Pull/Push Secrets"]
|
|
187
347
|
|
|
188
|
-
classDef
|
|
348
|
+
classDef cloud fill:#ffcc66,color:#000000,stroke:#333,stroke-width:1.5px;
|
|
189
349
|
classDef core fill:#1f3b57,color:#fff,stroke:#ccc,stroke-width:2px;
|
|
190
350
|
```
|
|
191
351
|
|
|
192
|
-
1.
|
|
193
|
-
2.
|
|
194
|
-
3.
|
|
195
|
-
4. Envilder syncs secrets securely with AWS SSM
|
|
196
|
-
5.
|
|
352
|
+
1. Define mappings in a JSON file: `{"DB_PASSWORD": "/myapp/db/password"}`
|
|
353
|
+
2. **Pull** secrets into a `.env` file: `envilder --map=param-map.json --envfile=.env`
|
|
354
|
+
3. **Push** local values back: `envilder --push --map=param-map.json --envfile=.env`
|
|
355
|
+
4. Envilder syncs secrets securely with AWS SSM or Azure Key Vault using your cloud credentials
|
|
356
|
+
5. Use `--provider=azure` to switch from the default AWS provider
|
|
357
|
+
6. Result: your secrets are always up-to-date, secure, and ready for any environment
|
|
197
358
|
|
|
198
359
|
---
|
|
199
360
|
|
|
200
361
|
## Frequently Asked Questions (FAQ)
|
|
201
362
|
|
|
202
363
|
**Q: What is Envilder?**
|
|
203
|
-
A: Envilder is a CLI tool for automating .env and secret management using AWS SSM Parameter Store.
|
|
364
|
+
A: Envilder is a CLI tool for automating .env and secret management using AWS SSM Parameter Store or Azure Key Vault.
|
|
365
|
+
|
|
366
|
+
**Q: Which cloud providers are supported?**
|
|
367
|
+
A: AWS SSM Parameter Store (default) and Azure Key Vault. Use `--provider=azure` to switch providers.
|
|
204
368
|
|
|
205
369
|
**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
|
|
370
|
+
A: Secrets are never stored in code or shared via chat/email. All secrets are managed and synced securely via your
|
|
371
|
+
cloud provider.
|
|
207
372
|
|
|
208
373
|
**Q: Can I use Envilder in CI/CD pipelines?**
|
|
209
|
-
A: Yes!
|
|
374
|
+
A: Yes! Use the official [Envilder GitHub Action](./github-action/README.md) to pull secrets directly
|
|
375
|
+
in your workflows — no extra setup needed.
|
|
210
376
|
|
|
211
377
|
**Q: Does Envilder support multiple AWS profiles?**
|
|
212
378
|
A: Yes, you can use the `--profile` flag to select different AWS credentials.
|
|
213
379
|
|
|
380
|
+
**Q: How do I configure Azure Key Vault?**
|
|
381
|
+
A: Add a `$config` section to your map file with `"provider": "azure"` and `"vaultUrl": "https://my-vault.vault.azure.net"`,
|
|
382
|
+
or use `--provider=azure --vault-url=https://my-vault.vault.azure.net` CLI flags. Authentication uses Azure
|
|
383
|
+
Default Credentials (Azure CLI, managed identity, etc.).
|
|
384
|
+
|
|
214
385
|
**Q: What environments does Envilder support?**
|
|
215
|
-
A: Any environment supported by
|
|
386
|
+
A: Any environment supported by your cloud provider—dev, test, staging, production, etc.
|
|
216
387
|
|
|
217
388
|
**Q: Is Envilder open source?**
|
|
218
389
|
A: Yes, licensed under MIT.
|
|
219
390
|
|
|
220
391
|
---
|
|
221
392
|
|
|
393
|
+
## 🔍 Envilder vs. Alternatives
|
|
394
|
+
|
|
395
|
+
Envilder is not a secrets manager. It is a **deterministic projection layer** from cloud secret
|
|
396
|
+
stores into `.env` files. It does not store secrets, does not require a backend, and integrates
|
|
397
|
+
cleanly into CI/CD pipelines.
|
|
398
|
+
|
|
399
|
+
To make a fair comparison, it's important to separate tools by what they actually do:
|
|
400
|
+
|
|
401
|
+
### Secrets sync tools (direct alternatives)
|
|
402
|
+
|
|
403
|
+
These tools manage secrets as data and project them into `.env` or runtime:
|
|
404
|
+
|
|
405
|
+
| Feature | Envilder | dotenv-vault | infisical |
|
|
406
|
+
|---------|----------|-------------|----------|
|
|
407
|
+
| **Source of truth** | External (SSM / Key Vault) | dotenv vault (SaaS) | Infisical backend |
|
|
408
|
+
| **Sync direction** | Bidirectional | Pull only | Bidirectional |
|
|
409
|
+
| **Declarative mapping** | ✅ JSON mapping | ❌ | ❌ |
|
|
410
|
+
| **Multi-provider (AWS + Azure)** | ✅ | ❌ | ⚠️ (primarily its own backend) |
|
|
411
|
+
| **Local `.env` generation** | ✅ | ✅ | ✅ |
|
|
412
|
+
| **CI/CD integration** | ✅ Native GitHub Action | Manual | ✅ Native |
|
|
413
|
+
| **Requires SaaS** | ❌ | ✅ | Optional |
|
|
414
|
+
| **Self-hosted** | N/A (no server needed) | ❌ | ✅ |
|
|
415
|
+
| **Complexity** | Low | Low | Medium |
|
|
416
|
+
| **Vendor lock-in** | Low | High | Medium |
|
|
417
|
+
| **Open source** | ✅ MIT | Partial | ✅ |
|
|
418
|
+
|
|
419
|
+
### Runtime & credential tools (not direct alternatives)
|
|
420
|
+
|
|
421
|
+
These tools serve different purposes and are better seen as **complements**, not competitors:
|
|
422
|
+
|
|
423
|
+
| Tool | Purpose | Manages app secrets? | Works with `.env`? |
|
|
424
|
+
|------|---------|---------------------|-------------------|
|
|
425
|
+
| **chamber** | Injects SSM params at runtime (`exec` with env) | ❌ | ❌ |
|
|
426
|
+
| **aws-vault** | Safely assumes AWS IAM roles / STS credentials | ❌ | ❌ |
|
|
427
|
+
|
|
428
|
+
### When to use what
|
|
429
|
+
|
|
430
|
+
- **Need a full vault with its own backend?** → [Infisical](https://infisical.com)
|
|
431
|
+
- **Need SaaS simplicity for `.env` sync?** → [dotenv-vault](https://www.dotenv.org/vault)
|
|
432
|
+
- **Need a projection layer from existing cloud stores?** → **Envilder**
|
|
433
|
+
|
|
434
|
+
### Why choose Envilder?
|
|
435
|
+
|
|
436
|
+
If you already use AWS SSM or Azure Key Vault and want a lightweight, zero-infrastructure CLI
|
|
437
|
+
that generates `.env` files from a declarative JSON mapping — without a SaaS dependency or extra
|
|
438
|
+
servers — Envilder is the simplest path.
|
|
439
|
+
|
|
440
|
+
Envilder also brings unique strengths in **determinism** and **testability**:
|
|
441
|
+
|
|
442
|
+
- **Versioned mappings** — your `param-map.json` lives in source control, making secret
|
|
443
|
+
projections reproducible across environments
|
|
444
|
+
- **Mockable architecture** — hexagonal design with port interfaces makes offline testing
|
|
445
|
+
and CI validation straightforward
|
|
446
|
+
- **Audit trail** — all reads/writes are logged by your cloud provider
|
|
447
|
+
(AWS CloudTrail / Azure Monitor), not by a third-party SaaS
|
|
448
|
+
|
|
449
|
+
### Where Envilder fits best
|
|
450
|
+
|
|
451
|
+
Envilder generates `.env` files on disk. This is ideal for:
|
|
452
|
+
|
|
453
|
+
- **Local development** — onboard new team members with a single command
|
|
454
|
+
- **CI/CD pipelines** — inject secrets at build time without hardcoding them
|
|
455
|
+
- **SSG/SSR builds** — frameworks like Next.js, Nuxt, or Astro that read env vars at build time
|
|
456
|
+
|
|
457
|
+
For **production runtime**, container orchestrators (ECS, Kubernetes) and platform services
|
|
458
|
+
(Vercel, Fly.io) can inject secrets directly as environment variables — no `.env` file needed.
|
|
459
|
+
In those cases, prefer native secret injection over writing secrets to disk.
|
|
460
|
+
|
|
461
|
+
> **Coming soon:** An `--exec` mode is planned to inject secrets directly into a child process
|
|
462
|
+
> without writing to disk (e.g., `envilder exec -- node server.js`). See the [Roadmap](./ROADMAP.md).
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
222
466
|
## 🏁 Roadmap
|
|
223
467
|
|
|
224
468
|
We're continuously improving Envilder based on community feedback. Upcoming features include:
|
|
225
469
|
|
|
226
|
-
-
|
|
470
|
+
- ✅ **Azure Key Vault support** — now available alongside AWS SSM
|
|
471
|
+
- � **Exec mode** — inject secrets into a child process without writing to disk
|
|
227
472
|
- 🔍 **Check/sync mode** for drift detection
|
|
473
|
+
- 🌐 **Documentation website** — dedicated docs site with guides and examples
|
|
228
474
|
- 🧠 **Auto-discovery** for bulk parameter fetching
|
|
475
|
+
- 🔌 **More backends** (HashiCorp Vault, GCP Secret Manager, etc.)
|
|
229
476
|
|
|
230
477
|
👉 **[View full roadmap with priorities](./ROADMAP.md)**
|
|
231
478
|
|
package/ROADMAP.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# 🛣️ Envilder Roadmap
|
|
2
2
|
|
|
3
|
-
Envilder
|
|
4
|
-
|
|
3
|
+
Envilder is evolving from a CLI tool into a **multi-runtime secret management platform**.
|
|
4
|
+
The goal: one declarative map-file format becomes the universal standard for resolving
|
|
5
|
+
environment variables from cloud secret stores (AWS SSM Parameter Store, AWS Secrets Manager,
|
|
6
|
+
Azure Key Vault, GCP Secret Manager) — whether in local development, CI/CD pipelines,
|
|
7
|
+
or directly inside application code at runtime.
|
|
5
8
|
|
|
9
|
+
> **Vision:** One map-file. Every cloud. Every language. Every runtime.
|
|
10
|
+
>
|
|
6
11
|
> **Note:** This roadmap contains ideas and potential features based on initial vision and community feedback.
|
|
7
12
|
> Not all features are guaranteed to be implemented. Priorities may change based on user needs, feedback,
|
|
8
13
|
> and real-world usage patterns. Your input matters—feel free to share your thoughts and suggestions!
|
|
@@ -11,20 +16,80 @@ Envilder aims to be the simplest, most reliable way to generate `.env` files fro
|
|
|
11
16
|
|
|
12
17
|
## Feature Status & Roadmap
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
|
19
|
-
|
|
20
|
-
| **
|
|
21
|
-
|
|
|
22
|
-
| **
|
|
23
|
-
| **
|
|
24
|
-
| **
|
|
25
|
-
| **
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
19
|
+
<!-- markdownlint-disable MD013 -->
|
|
20
|
+
|
|
21
|
+
### ✅ Shipped
|
|
22
|
+
|
|
23
|
+
| Feature | Notes |
|
|
24
|
+
|---------|-------|
|
|
25
|
+
| **Mapping-based resolution** | Core functionality |
|
|
26
|
+
| **`.env` file generation** | Core functionality |
|
|
27
|
+
| **AWS SSM Parameter Store** | Default provider |
|
|
28
|
+
| **AWS profile support** | `--profile` flag |
|
|
29
|
+
| **Push mode** (`--push`) | [Guide](./docs/push-command.md) |
|
|
30
|
+
| **GitHub Action** | [Documentation](./github-action/README.md) |
|
|
31
|
+
| **Azure Key Vault** | Multi-backend via `$config` map-file section ([#90](https://github.com/macalbert/envilder/pull/90)) |
|
|
32
|
+
| **Documentation website** | [envilder.com](https://envilder.com) |
|
|
33
|
+
| **Onboarding documentation** | [Setup guide](./docs/requirements-installation.md) |
|
|
34
|
+
|
|
35
|
+
### 🔥 Up Next
|
|
36
|
+
|
|
37
|
+
| Feature | Priority | Notes |
|
|
38
|
+
|---------|----------|-------|
|
|
39
|
+
| **Exec mode** (`--exec`) | 🔴 High | Inject secrets into a child process env without writing to disk (`envilder exec -- node server.js`) |
|
|
40
|
+
| **TypeScript SDK** (`@envilder/sdk`) | 🔴 High | Native runtime library — load secrets directly into `process.env` from a map-file. No `.env` file needed. Published to npm |
|
|
41
|
+
| **GCP Secret Manager** | 🔴 High | Third cloud provider — similar DX to AWS SSM. Completes the multi-cloud trident (AWS + Azure + GCP) |
|
|
42
|
+
| **Map-file JSON Schema** | 🔴 High | Formal spec for the map-file format at `spec/` — serves as the contract between all SDKs and tools |
|
|
43
|
+
| **AWS Secrets Manager** | 🟡 Medium | Support AWS Secrets Manager alongside SSM Parameter Store for teams using JSON-structured secrets |
|
|
44
|
+
| **Python SDK** (`envilder`) | 🟡 Medium | Runtime library for Python — Django/FastAPI/data pipelines. Published to PyPI |
|
|
45
|
+
| **Check/sync mode** (`--check`) | 🟡 Medium | Validate cloud secrets vs local `.env`, fail CI if out-of-sync |
|
|
46
|
+
|
|
47
|
+
### 💡 Planned
|
|
48
|
+
|
|
49
|
+
| Feature | Priority | Notes |
|
|
50
|
+
|---------|----------|-------|
|
|
51
|
+
| **Go SDK** (`envilder`) | Medium | Runtime library for Go — cloud-native apps, Kubernetes tooling. Published as Go module |
|
|
52
|
+
| **.NET SDK** (`Envilder`) | Medium | Runtime library for .NET — enterprise apps, Azure-native shops. Published to NuGet |
|
|
53
|
+
| **Java SDK** (`envilder`) | Medium | Runtime library for Java/Kotlin — Spring Boot, Android backends. Published to Maven Central |
|
|
54
|
+
| **SDK conformance tests** | Medium | Language-agnostic test fixtures (JSON input → expected output) that all SDKs must pass |
|
|
55
|
+
| **Auto-discovery mode** (`--auto`) | Medium | Fetch all parameters matching a given prefix (e.g., `/my-app/prod/*`) |
|
|
56
|
+
| **Exec with refresh** (`--refresh-interval`) | Low | Kill & restart child process periodically with fresh secrets (requires `--exec`) |
|
|
57
|
+
| **Hierarchical mapping** | Low | Per-environment `param-map.json` with inheritance/overrides |
|
|
58
|
+
|
|
59
|
+
<!-- markdownlint-enable MD013 -->
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 🏗️ Platform Architecture
|
|
64
|
+
|
|
65
|
+
All tools and SDKs live in a single monorepo and share the same map-file format:
|
|
66
|
+
|
|
67
|
+
```txt
|
|
68
|
+
param-map.json (universal contract)
|
|
69
|
+
│
|
|
70
|
+
├── envilder CLI → generates .env files
|
|
71
|
+
├── envilder GitHub Action → CI/CD secret injection
|
|
72
|
+
├── @envilder/sdk (npm) → Node.js / TypeScript runtime
|
|
73
|
+
├── envilder (PyPI) → Python runtime
|
|
74
|
+
├── Envilder (NuGet) → .NET runtime
|
|
75
|
+
├── envilder (Go module) → Go runtime
|
|
76
|
+
└── envilder (Maven) → Java / Kotlin runtime
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### SDK Rollout Phases
|
|
80
|
+
|
|
81
|
+
| Phase | Scope | Rationale |
|
|
82
|
+
|-------|-------|-----------|
|
|
83
|
+
| **Phase 1** | TypeScript SDK | Core already exists in TypeScript — refactor + package |
|
|
84
|
+
| **Phase 2** | Python SDK | Massive adoption in data engineering, ML, and scripting where secrets are critical |
|
|
85
|
+
| **Phase 3** | Go, .NET, Java SDKs | Enterprise reach and cloud-native coverage, prioritized by community demand |
|
|
86
|
+
|
|
87
|
+
### Monorepo Principles
|
|
88
|
+
|
|
89
|
+
- **One map-file spec** — formal JSON Schema at `spec/` is the source of truth for all SDKs
|
|
90
|
+
- **Conformance tests** — language-agnostic fixtures that every SDK must pass
|
|
91
|
+
- **Independent versioning** — each SDK has its own semver (`sdk-ts@1.2.0`, `sdk-py@0.3.0`)
|
|
92
|
+
- **Shared test infrastructure** — LocalStack (AWS) and Lowkey Vault (Azure) via Docker Compose serve all SDKs
|
|
28
93
|
|
|
29
94
|
---
|
|
30
95
|
|