envilder 0.9.2 → 0.9.4
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 +204 -278
- package/ROADMAP.md +5 -5
- package/docs/CHANGELOG.md +9 -513
- package/docs/changelogs/cli.md +498 -0
- package/docs/changelogs/gha.md +74 -0
- package/docs/changelogs/sdk-dotnet.md +80 -0
- package/docs/changelogs/sdk-nodejs.md +22 -0
- package/docs/changelogs/sdk-python.md +82 -0
- package/lib/envilder/core/application/pushEnvToSecrets/PushEnvToSecretsCommandHandler.js +3 -3
- package/lib/envilder/core/application/pushEnvToSecrets/PushEnvToSecretsCommandHandler.js.map +1 -1
- package/lib/sdks/nodejs/src/application/envilder-client.d.ts +29 -0
- package/lib/sdks/nodejs/src/application/envilder-client.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/application/envilder-client.js +60 -0
- package/lib/sdks/nodejs/src/application/envilder-client.js.map +1 -0
- package/lib/sdks/nodejs/src/application/envilder.d.ts +64 -0
- package/lib/sdks/nodejs/src/application/envilder.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/application/envilder.js +168 -0
- package/lib/sdks/nodejs/src/application/envilder.js.map +1 -0
- package/lib/sdks/nodejs/src/application/map-file-parser.d.ts +14 -0
- package/lib/sdks/nodejs/src/application/map-file-parser.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/application/map-file-parser.js +55 -0
- package/lib/sdks/nodejs/src/application/map-file-parser.js.map +1 -0
- package/lib/sdks/nodejs/src/application/secret-validation.d.ts +18 -0
- package/lib/sdks/nodejs/src/application/secret-validation.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/application/secret-validation.js +32 -0
- package/lib/sdks/nodejs/src/application/secret-validation.js.map +1 -0
- package/lib/sdks/nodejs/src/domain/envilder-options.d.ts +7 -0
- package/lib/sdks/nodejs/src/domain/envilder-options.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/domain/envilder-options.js +2 -0
- package/lib/sdks/nodejs/src/domain/envilder-options.js.map +1 -0
- package/lib/sdks/nodejs/src/domain/map-file-config.d.ts +7 -0
- package/lib/sdks/nodejs/src/domain/map-file-config.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/domain/map-file-config.js +2 -0
- package/lib/sdks/nodejs/src/domain/map-file-config.js.map +1 -0
- package/lib/sdks/nodejs/src/domain/parsed-map-file.d.ts +6 -0
- package/lib/sdks/nodejs/src/domain/parsed-map-file.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/domain/parsed-map-file.js +2 -0
- package/lib/sdks/nodejs/src/domain/parsed-map-file.js.map +1 -0
- package/lib/sdks/nodejs/src/domain/ports/secret-provider.d.ts +18 -0
- package/lib/sdks/nodejs/src/domain/ports/secret-provider.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/domain/ports/secret-provider.js +2 -0
- package/lib/sdks/nodejs/src/domain/ports/secret-provider.js.map +1 -0
- package/lib/sdks/nodejs/src/domain/secret-provider-type.d.ts +5 -0
- package/lib/sdks/nodejs/src/domain/secret-provider-type.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/domain/secret-provider-type.js +6 -0
- package/lib/sdks/nodejs/src/domain/secret-provider-type.js.map +1 -0
- package/lib/sdks/nodejs/src/index.d.ts +12 -0
- package/lib/sdks/nodejs/src/index.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/index.js +11 -0
- package/lib/sdks/nodejs/src/index.js.map +1 -0
- package/lib/sdks/nodejs/src/infrastructure/aws/aws-ssm-secret-provider.d.ts +17 -0
- package/lib/sdks/nodejs/src/infrastructure/aws/aws-ssm-secret-provider.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/infrastructure/aws/aws-ssm-secret-provider.js +56 -0
- package/lib/sdks/nodejs/src/infrastructure/aws/aws-ssm-secret-provider.js.map +1 -0
- package/lib/sdks/nodejs/src/infrastructure/azure/azure-key-vault-secret-provider.d.ts +15 -0
- package/lib/sdks/nodejs/src/infrastructure/azure/azure-key-vault-secret-provider.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/infrastructure/azure/azure-key-vault-secret-provider.js +68 -0
- package/lib/sdks/nodejs/src/infrastructure/azure/azure-key-vault-secret-provider.js.map +1 -0
- package/lib/sdks/nodejs/src/infrastructure/secret-provider-factory.d.ts +5 -0
- package/lib/sdks/nodejs/src/infrastructure/secret-provider-factory.d.ts.map +1 -0
- package/lib/sdks/nodejs/src/infrastructure/secret-provider-factory.js +42 -0
- package/lib/sdks/nodejs/src/infrastructure/secret-provider-factory.js.map +1 -0
- package/package.json +17 -8
package/README.md
CHANGED
|
@@ -5,144 +5,114 @@
|
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<b>
|
|
9
|
-
<span>
|
|
8
|
+
<b>One model. Your secrets. Every runtime.</b><br>
|
|
9
|
+
<span>Define secret mappings once. Resolve them consistently from AWS SSM or Azure Key Vault.</span>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
-

|
|
13
|
-
|
|
14
12
|
[](https://www.npmjs.com/package/envilder)
|
|
15
13
|
[](https://npmcharts.com/compare/envilder)
|
|
16
14
|
[](https://github.com/macalbert/envilder/actions/workflows/tests.yml)
|
|
17
|
-
[](https://snyk.io/test/github/macalbert/envilder)
|
|
15
|
+
[](https://macalbert.github.io/envilder/)
|
|
19
16
|
[](./LICENSE)
|
|
20
17
|
|
|
21
|
-
## Why
|
|
18
|
+
## Why Envilder?
|
|
19
|
+
|
|
20
|
+
Your new developer joins the team. They need environment variables to run the app locally.
|
|
21
|
+
What happens next? Someone sends API keys over Slack. Someone else digs up a wiki page
|
|
22
|
+
with outdated credentials. Forty-five minutes later, their `.env` file is "probably correct".
|
|
23
|
+
|
|
24
|
+
**Envilder fixes this in one command.**
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
You create a JSON mapping between variable names and cloud secret paths. Envilder resolves
|
|
27
|
+
them from AWS SSM or Azure Key Vault. The same mapping file works in local dev (CLI),
|
|
28
|
+
CI/CD (GitHub Action), and application startup (runtime SDKs).
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
envilder --map=param-map.json --envfile=.env
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
No SaaS middleman. No vendor lock-in. Secrets stay in your cloud.
|
|
29
35
|
|
|
30
36
|
---
|
|
31
37
|
|
|
32
|
-
##
|
|
38
|
+
## The problem
|
|
33
39
|
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
+
- **Onboarding takes hours, not seconds.** Every new developer needs someone to explain which
|
|
41
|
+
secrets go where. Keys get shared over Slack, pasted from wikis, or copied from a colleague's
|
|
42
|
+
machine. It's slow, error-prone, and insecure.
|
|
43
|
+
- **Every environment has its own workflow.** Local dev reads `.env` files. CI/CD uses vault
|
|
44
|
+
integrations. Production has its own method. Same app, three different secret workflows.
|
|
45
|
+
- **No single source of truth.** Without a versioned contract, dev/staging/production configs
|
|
46
|
+
drift apart. Deployments break. Nobody knows which config is correct.
|
|
40
47
|
|
|
41
|
-
##
|
|
48
|
+
## How Envilder solves it
|
|
42
49
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
- 🚀 Enables cloud-native, infrastructure-as-code secret management
|
|
50
|
-
- 🤖 Perfect for DevOps, CI/CD, and team sync
|
|
50
|
+
- 📋 **One mapping file for everything.** A single `param-map.json` defines what secrets your app
|
|
51
|
+
needs. Git-versioned, PR-reviewable, the same across every environment.
|
|
52
|
+
- ⚡ **Works everywhere your code runs.** CLI for local dev, GitHub Action for CI/CD, runtime SDKs
|
|
53
|
+
for application startup. Same file, same result.
|
|
54
|
+
- 🛡️ **Your cloud, zero infrastructure.** Secrets stay in AWS SSM or Azure Key Vault. No SaaS
|
|
55
|
+
proxy, no extra servers, no data to migrate.
|
|
51
56
|
|
|
52
57
|
---
|
|
53
58
|
|
|
54
|
-
##
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [🤖 GitHub Action](#-github-action)
|
|
65
|
-
- [🚀 Quick Start](#-quick-start)
|
|
66
|
-
- [🎥 Video Demonstration](#-video-demonstration)
|
|
67
|
-
- [🏁 Get Started (3 steps)](#-get-started-3-steps)
|
|
68
|
-
- [AWS SSM (default)](#aws-ssm-default)
|
|
69
|
-
- [Azure Key Vault](#azure-key-vault)
|
|
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)
|
|
76
|
-
- [🛠️ How it works](#️-how-it-works)
|
|
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)
|
|
84
|
-
- [🏁 Roadmap](#-roadmap)
|
|
85
|
-
- [🤝 Contributing](#-contributing)
|
|
86
|
-
- [💜 Sponsors](#-sponsors)
|
|
87
|
-
- [📜 License](#-license)
|
|
59
|
+
## ⚙️ Features
|
|
60
|
+
|
|
61
|
+
| Feature | Description |
|
|
62
|
+
|---------|-------------|
|
|
63
|
+
| 📋 **Declarative Mapping** | One JSON file defines all secrets. Git-versioned, PR-reviewable, diff-able |
|
|
64
|
+
| ☁️ **Multi-Provider** | AWS SSM + Azure Key Vault. No vendor lock-in |
|
|
65
|
+
| 🔌 **Runtime SDKs** | Load secrets into memory at app startup: [.NET](./src/sdks/dotnet/README.md), [Python](./src/sdks/python/README.md), [Node.js](./src/sdks/nodejs/README.md). No `.env` on disk |
|
|
66
|
+
| ⚙️ **GitHub Action** | Pull secrets in CI/CD. Same mapping, zero manual config |
|
|
67
|
+
| 🔄 **Bidirectional Sync** | Pull secrets to `.env` or push values back to the cloud |
|
|
68
|
+
| 🧱 **Zero Infrastructure** | No servers, no proxies, no SaaS. Uses cloud services you already have |
|
|
88
69
|
|
|
89
70
|
---
|
|
90
71
|
|
|
91
|
-
##
|
|
72
|
+
## 🚀 Quick Start
|
|
92
73
|
|
|
93
|
-
|
|
94
|
-
(dev, staging, prod)
|
|
95
|
-
- 📊 **Auditable** — All reads/writes are logged in AWS CloudTrail or Azure Monitor
|
|
96
|
-
- 🧩 **Single source of truth** — No more Notion, emails or copy/paste of envs
|
|
97
|
-
- 🔁 **Idempotent sync** — Only what's in your map gets updated. Nothing else is touched
|
|
98
|
-
- 🧱 **Zero infrastructure** — Fully based on native cloud services. No Lambdas, no servers, no fuss
|
|
74
|
+
### 🎥 See it in action
|
|
99
75
|
|
|
100
|
-
|
|
76
|
+
Watch how easy it is to automate your .env management in less than 1 minute:
|
|
101
77
|
|
|
102
|
-
|
|
103
|
-
- 📤 **Push & Pull** — Bidirectional sync between local `.env` and your cloud provider
|
|
104
|
-
- ☁️ **Multi-provider** — AWS SSM Parameter Store and Azure Key Vault
|
|
105
|
-
- 🎯 **AWS Profile support** — Use `--profile` flag for multi-account setups
|
|
78
|
+

|
|
106
79
|
|
|
107
|
-
|
|
80
|
+
### 🏁 Get Started (2 steps)
|
|
108
81
|
|
|
109
|
-
|
|
82
|
+
**1. Create a mapping file** (`param-map.json`):
|
|
110
83
|
|
|
111
|
-
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"DB_PASSWORD": "/my-app/db/password",
|
|
87
|
+
"API_KEY": "/my-app/api-key"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
112
90
|
|
|
113
|
-
|
|
114
|
-
- **AWS provider**: AWS CLI installed and configured; IAM user/role with `ssm:GetParameter`, `ssm:PutParameter`
|
|
115
|
-
- **Azure provider**: Azure CLI installed; vault URL configured via
|
|
116
|
-
`$config.vaultUrl` in your map file or `--vault-url` flag
|
|
91
|
+
**2. Generate your `.env` file:**
|
|
117
92
|
|
|
118
93
|
```bash
|
|
119
|
-
|
|
94
|
+
npx envilder --map=param-map.json --envfile=.env
|
|
120
95
|
```
|
|
121
96
|
|
|
122
|
-
|
|
97
|
+
That's it. Your secrets are pulled from AWS SSM and written to `.env`.
|
|
98
|
+
Add `.env` to `.gitignore`. The mapping file is versioned and reviewable in PRs.
|
|
99
|
+
|
|
100
|
+
> 💡 Using Azure Key Vault? Add a `$config` section to your mapping file.
|
|
101
|
+
> See [Mapping File Format](#️-mapping-file-format) below.
|
|
102
|
+
|
|
103
|
+
### 💾 Installation
|
|
123
104
|
|
|
124
105
|
```bash
|
|
125
106
|
npm install -g envilder
|
|
126
107
|
```
|
|
127
108
|
|
|
128
|
-
> 💡 **
|
|
109
|
+
> 💡 **No install needed?** `npx envilder` works out of the box.
|
|
129
110
|
>
|
|
130
|
-
>
|
|
131
|
-
>
|
|
132
|
-
> - [AWS SSM Parameter Store Overview](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html)
|
|
133
|
-
> - [Setting up AWS CLI credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
|
|
134
|
-
> - [IAM permissions for SSM](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html)
|
|
135
|
-
>
|
|
136
|
-
> 💡 **New to Azure Key Vault?** Azure Key Vault safeguards cryptographic keys and secrets used by cloud apps:
|
|
137
|
-
>
|
|
138
|
-
> - [Azure Key Vault Overview](https://learn.microsoft.com/en-us/azure/key-vault/general/overview)
|
|
139
|
-
> - [Setting up Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
|
|
140
|
-
> - [Key Vault access policies](https://learn.microsoft.com/en-us/azure/key-vault/general/assign-access-policy)
|
|
111
|
+
> **Requirements:** Node.js v20+. AWS CLI or Azure CLI configured.
|
|
112
|
+
> See [full requirements](docs/requirements-installation.md).
|
|
141
113
|
|
|
142
114
|
### 🤖 GitHub Action
|
|
143
115
|
|
|
144
|
-
Use Envilder directly in your CI/CD workflows with our official GitHub Action:
|
|
145
|
-
|
|
146
116
|
**AWS SSM (default):**
|
|
147
117
|
|
|
148
118
|
```yaml
|
|
@@ -178,77 +148,11 @@ Use Envilder directly in your CI/CD workflows with our official GitHub Action:
|
|
|
178
148
|
vault-url: ${{ secrets.AZURE_KEY_VAULT_URL }}
|
|
179
149
|
```
|
|
180
150
|
|
|
181
|
-
📖 **[
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## 🚀 Quick Start
|
|
186
|
-
|
|
187
|
-
### 🎥 Video Demonstration
|
|
188
|
-
|
|
189
|
-
Watch how easy it is to automate your .env management in less than 1 minute:
|
|
190
|
-
|
|
191
|
-

|
|
192
|
-
|
|
193
|
-
### 🏁 Get Started (3 steps)
|
|
194
|
-
|
|
195
|
-
After configuring your cloud provider credentials, you can begin managing your secrets.
|
|
196
|
-
|
|
197
|
-
#### AWS SSM (default)
|
|
198
|
-
|
|
199
|
-
1. **Create a mapping file:**
|
|
200
|
-
|
|
201
|
-
```json
|
|
202
|
-
{
|
|
203
|
-
"DB_PASSWORD": "/my-app/db/password"
|
|
204
|
-
}
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
2. **Push a secret to AWS SSM:**
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
envilder --push --key=DB_PASSWORD --value=12345 --secret-path=/my-app/db/password
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
3. **Generate your .env file from AWS SSM:**
|
|
151
|
+
📖 **[Full GitHub Action docs](./github-action/README.md)**
|
|
214
152
|
|
|
215
|
-
|
|
216
|
-
envilder --map=param-map.json --envfile=.env
|
|
217
|
-
```
|
|
153
|
+
### 📚 More resources
|
|
218
154
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
1. **Add `$config` to your mapping file:**
|
|
222
|
-
|
|
223
|
-
```json
|
|
224
|
-
{
|
|
225
|
-
"$config": {
|
|
226
|
-
"provider": "azure",
|
|
227
|
-
"vaultUrl": "https://my-vault.vault.azure.net"
|
|
228
|
-
},
|
|
229
|
-
"DB_PASSWORD": "my-app-db-password"
|
|
230
|
-
}
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
2. **Pull secrets from Azure Key Vault:**
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
envilder --map=param-map.json --envfile=.env
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
Or use CLI flags to override:
|
|
240
|
-
|
|
241
|
-
```bash
|
|
242
|
-
envilder --provider=azure --vault-url=https://my-vault.vault.azure.net --map=param-map.json --envfile=.env
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Your secrets are now managed and versioned from your cloud provider. Add `.env` to your `.gitignore` for security.
|
|
246
|
-
Envilder is designed for automation, onboarding, and secure cloud-native workflows.
|
|
247
|
-
|
|
248
|
-
### 📚 Quick Links
|
|
249
|
-
|
|
250
|
-
- [📖 Full Documentation](https://envilder.com) — Visit envilder.com for the complete guide
|
|
251
|
-
- [Requirements & Installation](docs/requirements-installation.md)
|
|
155
|
+
- [📖 Full Documentation](https://envilder.com): the complete guide at envilder.com
|
|
252
156
|
- [Push Command Guide](docs/push-command.md)
|
|
253
157
|
- [Pull Command Guide](docs/pull-command.md)
|
|
254
158
|
|
|
@@ -256,10 +160,12 @@ Envilder is designed for automation, onboarding, and secure cloud-native workflo
|
|
|
256
160
|
|
|
257
161
|
## 🗺️ Mapping File Format
|
|
258
162
|
|
|
259
|
-
The mapping file (`param-map.json`) is the core of Envilder. It
|
|
260
|
-
|
|
163
|
+
The mapping file (`param-map.json`) is the core of Envilder. It's the single model that defines
|
|
164
|
+
what secrets your app needs and where they live in your cloud provider. The same file is used by
|
|
165
|
+
the CLI, the GitHub Action, and the runtime SDKs. You can optionally include a `$config` section
|
|
166
|
+
to declare which provider and settings to use.
|
|
261
167
|
|
|
262
|
-
### Basic Format (AWS SSM
|
|
168
|
+
### Basic Format (AWS SSM, default)
|
|
263
169
|
|
|
264
170
|
When no `$config` is present, Envilder defaults to AWS SSM Parameter Store:
|
|
265
171
|
|
|
@@ -305,7 +211,7 @@ and uses all other keys as secret mappings:
|
|
|
305
211
|
```
|
|
306
212
|
|
|
307
213
|
> **Azure naming:** Key Vault secret names only allow alphanumeric characters and hyphens.
|
|
308
|
-
> Envilder automatically normalizes names
|
|
214
|
+
> Envilder automatically normalizes names: slashes and underscores become hyphens
|
|
309
215
|
> (e.g., `/myapp/db/password` → `myapp-db-password`).
|
|
310
216
|
|
|
311
217
|
### `$config` Options
|
|
@@ -313,8 +219,8 @@ and uses all other keys as secret mappings:
|
|
|
313
219
|
| Key | Type | Default | Description |
|
|
314
220
|
| --- | --- | --- | --- |
|
|
315
221
|
| `provider` | `"aws"` \| `"azure"` | `"aws"` | Cloud provider to use |
|
|
316
|
-
| `vaultUrl` | `string` |
|
|
317
|
-
| `profile` | `string` |
|
|
222
|
+
| `vaultUrl` | `string` | - | Azure Key Vault URL (required when `provider` is `"azure"`) |
|
|
223
|
+
| `profile` | `string` | - | AWS CLI profile for multi-account setups (AWS only) |
|
|
318
224
|
|
|
319
225
|
### Configuration Priority
|
|
320
226
|
|
|
@@ -336,152 +242,171 @@ envilder --provider=azure --vault-url=https://other-vault.vault.azure.net --map=
|
|
|
336
242
|
|
|
337
243
|
---
|
|
338
244
|
|
|
339
|
-
##
|
|
245
|
+
## 🧩 Runtime SDKs
|
|
340
246
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
C["Environment File (.env or --key)"] --> B
|
|
345
|
-
D["Cloud Credentials (AWS or Azure)"]:::cloud --> B
|
|
346
|
-
E["AWS SSM / Azure Key Vault"]:::cloud --> B
|
|
347
|
-
B --> F["Pull/Push Secrets"]
|
|
247
|
+
Beyond the CLI and GitHub Action, Envilder provides **runtime SDKs** that resolve secrets
|
|
248
|
+
directly into your application's memory at startup. No `.env` file written to disk, no secrets
|
|
249
|
+
left behind. SDKs use the same map-file format as the CLI.
|
|
348
250
|
|
|
349
|
-
|
|
350
|
-
|
|
251
|
+
### .NET SDK
|
|
252
|
+
|
|
253
|
+
Install via NuGet:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
dotnet add package Envilder
|
|
351
257
|
```
|
|
352
258
|
|
|
353
|
-
|
|
354
|
-
2. **Pull** secrets into a `.env` file: `envilder --map=param-map.json --envfile=.env`
|
|
355
|
-
3. **Push** local values back: `envilder --push --map=param-map.json --envfile=.env`
|
|
356
|
-
4. Envilder syncs secrets securely with AWS SSM or Azure Key Vault using your cloud credentials
|
|
357
|
-
5. Use `--provider=azure` to switch from the default AWS provider
|
|
358
|
-
6. Result: your secrets are always up-to-date, secure, and ready for any environment
|
|
259
|
+
Load secrets into `IConfiguration` or inject them into the process environment:
|
|
359
260
|
|
|
360
|
-
|
|
261
|
+
```csharp
|
|
262
|
+
// Option A: integrate with IConfiguration
|
|
263
|
+
var config = new ConfigurationBuilder()
|
|
264
|
+
.AddEnvilder("secrets-map.json")
|
|
265
|
+
.Build();
|
|
266
|
+
|
|
267
|
+
var dbPassword = config["DB_PASSWORD"];
|
|
268
|
+
|
|
269
|
+
// Option B: resolve + inject into environment
|
|
270
|
+
Envilder.Load("secrets-map.json");
|
|
271
|
+
var dbPassword = Environment.GetEnvironmentVariable("DB_PASSWORD");
|
|
272
|
+
```
|
|
361
273
|
|
|
362
|
-
|
|
274
|
+
📖 **[Full .NET SDK docs](./src/sdks/dotnet/README.md)**
|
|
363
275
|
|
|
364
|
-
|
|
365
|
-
A: Envilder is a CLI tool for automating .env and secret management using AWS SSM Parameter Store or Azure Key Vault.
|
|
276
|
+
### Python SDK
|
|
366
277
|
|
|
367
|
-
|
|
368
|
-
A: AWS SSM Parameter Store (default) and Azure Key Vault. Use `--provider=azure` to switch providers.
|
|
278
|
+
Install via uv (recommended) or pip:
|
|
369
279
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
280
|
+
```bash
|
|
281
|
+
uv add envilder
|
|
282
|
+
# or
|
|
283
|
+
pip install envilder
|
|
284
|
+
```
|
|
373
285
|
|
|
374
|
-
|
|
375
|
-
A: Yes! Use the official [Envilder GitHub Action](./github-action/README.md) to pull secrets directly
|
|
376
|
-
in your workflows — no extra setup needed.
|
|
286
|
+
Load secrets into your application with a single line:
|
|
377
287
|
|
|
378
|
-
|
|
379
|
-
|
|
288
|
+
```python
|
|
289
|
+
from envilder import Envilder
|
|
380
290
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
Default Credentials (Azure CLI, managed identity, etc.).
|
|
291
|
+
# Resolve + inject into os.environ
|
|
292
|
+
Envilder.load('secrets-map.json')
|
|
293
|
+
```
|
|
385
294
|
|
|
386
|
-
|
|
387
|
-
A: Any environment supported by your cloud provider—dev, test, staging, production, etc.
|
|
295
|
+
Or route by environment, where each environment points to its own map file:
|
|
388
296
|
|
|
389
|
-
|
|
390
|
-
|
|
297
|
+
```python
|
|
298
|
+
from envilder import Envilder
|
|
391
299
|
|
|
392
|
-
|
|
300
|
+
Envilder.load('production', {
|
|
301
|
+
'production': 'prod-secrets.json',
|
|
302
|
+
'development': 'dev-secrets.json',
|
|
303
|
+
'test': None, # no secrets loaded
|
|
304
|
+
})
|
|
305
|
+
```
|
|
393
306
|
|
|
394
|
-
|
|
307
|
+
📖 **[Full Python SDK docs](./src/sdks/python/README.md)**
|
|
395
308
|
|
|
396
|
-
|
|
397
|
-
stores into `.env` files. It does not store secrets, does not require a backend, and integrates
|
|
398
|
-
cleanly into CI/CD pipelines.
|
|
309
|
+
### Node.js SDK
|
|
399
310
|
|
|
400
|
-
|
|
311
|
+
Install via npm:
|
|
401
312
|
|
|
402
|
-
|
|
313
|
+
```bash
|
|
314
|
+
npm install @envilder/sdk
|
|
315
|
+
```
|
|
403
316
|
|
|
404
|
-
|
|
317
|
+
Load secrets into your application with a single line:
|
|
405
318
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
| **Source of truth** | External (SSM / Key Vault) | dotenv vault (SaaS) | Infisical backend |
|
|
409
|
-
| **Sync direction** | Bidirectional | Pull only | Bidirectional |
|
|
410
|
-
| **Declarative mapping** | ✅ JSON mapping | ❌ | ❌ |
|
|
411
|
-
| **Multi-provider (AWS + Azure)** | ✅ | ❌ | ⚠️ (primarily its own backend) |
|
|
412
|
-
| **Local `.env` generation** | ✅ | ✅ | ✅ |
|
|
413
|
-
| **CI/CD integration** | ✅ Native GitHub Action | Manual | ✅ Native |
|
|
414
|
-
| **Requires SaaS** | ❌ | ✅ | Optional |
|
|
415
|
-
| **Self-hosted** | N/A (no server needed) | ❌ | ✅ |
|
|
416
|
-
| **Complexity** | Low | Low | Medium |
|
|
417
|
-
| **Vendor lock-in** | Low | High | Medium |
|
|
418
|
-
| **Open source** | ✅ MIT | Partial | ✅ |
|
|
319
|
+
```typescript
|
|
320
|
+
import { Envilder } from '@envilder/sdk';
|
|
419
321
|
|
|
420
|
-
|
|
322
|
+
// Resolve + inject into process.env
|
|
323
|
+
const secrets = await Envilder.load('secrets-map.json');
|
|
324
|
+
```
|
|
421
325
|
|
|
422
|
-
|
|
326
|
+
Or use the fluent builder for full control:
|
|
423
327
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
| **chamber** | Injects SSM params at runtime (`exec` with env) | ❌ | ❌ |
|
|
427
|
-
| **aws-vault** | Safely assumes AWS IAM roles / STS credentials | ❌ | ❌ |
|
|
328
|
+
```typescript
|
|
329
|
+
import { Envilder, SecretProviderType } from '@envilder/sdk';
|
|
428
330
|
|
|
429
|
-
|
|
331
|
+
const secrets = await Envilder.fromMapFile('secrets-map.json')
|
|
332
|
+
.withProvider(SecretProviderType.Aws)
|
|
333
|
+
.withProfile('prod-account')
|
|
334
|
+
.resolve();
|
|
335
|
+
```
|
|
430
336
|
|
|
431
|
-
|
|
432
|
-
- **Need SaaS simplicity for `.env` sync?** → [dotenv-vault](https://www.dotenv.org/vault)
|
|
433
|
-
- **Need a projection layer from existing cloud stores?** → **Envilder**
|
|
337
|
+
📖 **[Full Node.js SDK docs](./src/sdks/nodejs/README.md)**
|
|
434
338
|
|
|
435
|
-
|
|
339
|
+
---
|
|
436
340
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
341
|
+
## 🛠️ How it works
|
|
342
|
+
|
|
343
|
+
```mermaid
|
|
344
|
+
graph LR
|
|
345
|
+
A["Mapping Model (param-map.json)"] --> B[Envilder]:::core
|
|
346
|
+
B --> C["CLI → .env file"]
|
|
347
|
+
B --> D["GitHub Action → CI/CD"]
|
|
348
|
+
B --> E["SDK → app memory"]
|
|
349
|
+
F["AWS SSM / Azure Key Vault"]:::cloud --> B
|
|
350
|
+
|
|
351
|
+
classDef cloud fill:#ffcc66,color:#000000,stroke:#333,stroke-width:1.5px;
|
|
352
|
+
classDef core fill:#1f3b57,color:#fff,stroke:#ccc,stroke-width:2px;
|
|
353
|
+
```
|
|
440
354
|
|
|
441
|
-
|
|
355
|
+
1. **Define**: create a `param-map.json` mapping env var names to cloud secret paths
|
|
356
|
+
2. **Resolve**: Envilder fetches each secret from your cloud vault
|
|
357
|
+
3. **Deliver**: secrets arrive as a `.env` file (CLI/GHA) or in-memory (SDKs)
|
|
358
|
+
4. **Push**: rotate or add secrets from your local environment back to the cloud
|
|
442
359
|
|
|
443
|
-
|
|
444
|
-
projections reproducible across environments
|
|
445
|
-
- **Mockable architecture** — hexagonal design with port interfaces makes offline testing
|
|
446
|
-
and CI validation straightforward
|
|
447
|
-
- **Audit trail** — all reads/writes are logged by your cloud provider
|
|
448
|
-
(AWS CloudTrail / Azure Monitor), not by a third-party SaaS
|
|
360
|
+
---
|
|
449
361
|
|
|
450
|
-
|
|
362
|
+
## 🔍 Envilder vs. Alternatives
|
|
451
363
|
|
|
452
|
-
Envilder
|
|
364
|
+
Envilder is not a secrets manager. It is a **configuration resolution layer** that reads from your
|
|
365
|
+
existing cloud vault and delivers secrets where they're needed (`.env` file, CI/CD, app memory).
|
|
366
|
+
No SaaS backend. No extra servers.
|
|
453
367
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
368
|
+
| | Envilder | dotenvx | Infisical |
|
|
369
|
+
|-|----------|---------|-----------|
|
|
370
|
+
| **Source of truth** | Your cloud (SSM / Key Vault) | Encrypted `.env` in git | Infisical backend |
|
|
371
|
+
| **Declarative mapping** | ✅ JSON file | ❌ | ❌ |
|
|
372
|
+
| **Multi-cloud** | ✅ AWS + Azure | ❌ | ✅ |
|
|
373
|
+
| **Runtime SDKs** | ✅ .NET, Python, Node.js | ✅ Node.js | ✅ 6+ languages |
|
|
374
|
+
| **Requires SaaS** | ❌ | ❌ | Optional |
|
|
375
|
+
| **Infrastructure** | None | None | Server required |
|
|
457
376
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
377
|
+
> **When Envilder shines:** you already have secrets in AWS SSM or Azure Key Vault and want
|
|
378
|
+
> a versioned mapping file that resolves them everywhere: local dev, CI/CD, and app runtime.
|
|
379
|
+
> No data to migrate. No servers to deploy. No vendor to depend on.
|
|
461
380
|
|
|
462
|
-
|
|
463
|
-
|
|
381
|
+
For detailed tool-by-tool comparison including
|
|
382
|
+
[chamber](https://github.com/segmentio/chamber) and
|
|
383
|
+
[aws-vault](https://github.com/99designs/aws-vault),
|
|
384
|
+
see [envilder.com](https://envilder.com).
|
|
464
385
|
|
|
465
386
|
---
|
|
466
387
|
|
|
467
|
-
## 🏁
|
|
388
|
+
## 🏁 What's Next
|
|
468
389
|
|
|
469
|
-
|
|
390
|
+
Envilder already covers the full dev-to-production lifecycle with CLI, GitHub Action,
|
|
391
|
+
and runtime SDKs for .NET, Python, and Node.js. Here's what's coming:
|
|
470
392
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
393
|
+
| Status | Feature |
|
|
394
|
+
|--------|---------|
|
|
395
|
+
| ✅ | Pull & Push: bidirectional sync between `.env` and cloud vault |
|
|
396
|
+
| ✅ | Multi-provider: AWS SSM + Azure Key Vault |
|
|
397
|
+
| ✅ | GitHub Action for CI/CD |
|
|
398
|
+
| ✅ | .NET, Python, and Node.js SDKs |
|
|
399
|
+
| 🚧 | Go and Java SDKs |
|
|
400
|
+
| 🚧 | GCP Secret Manager |
|
|
401
|
+
| 🚧 | Exec mode (inject secrets without writing to disk) |
|
|
477
402
|
|
|
478
|
-
👉 **[
|
|
403
|
+
👉 **[Full roadmap with priorities](./ROADMAP.md)**
|
|
479
404
|
|
|
480
405
|
---
|
|
481
406
|
|
|
482
407
|
## 🤝 Contributing
|
|
483
408
|
|
|
484
|
-
All help is welcome
|
|
409
|
+
All help is welcome! PRs, issues, ideas.
|
|
485
410
|
|
|
486
411
|
- 🔧 Use our [Pull Request Template](.github/pull_request_template.md)
|
|
487
412
|
- 🧪 Add tests where possible
|
|
@@ -495,15 +420,16 @@ All help is welcome — PRs, issues, ideas!
|
|
|
495
420
|
|
|
496
421
|
<p align="center">
|
|
497
422
|
<a href="https://localstack.cloud" target="_blank" rel="noopener noreferrer">
|
|
498
|
-
<
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
alt="LocalStack" height="40">
|
|
423
|
+
<picture>
|
|
424
|
+
<source media="(prefers-color-scheme: dark)" srcset="./src/website/public/localstack-logo-horizontal-Light.svg">
|
|
425
|
+
<source media="(prefers-color-scheme: light)" srcset="./src/website/public/localstack-logo-horizontal-Dark.svg">
|
|
426
|
+
<img src="./src/website/public/localstack-logo-horizontal-Dark.svg" alt="LocalStack" height="40">
|
|
427
|
+
</picture>
|
|
502
428
|
</a>
|
|
503
429
|
</p>
|
|
504
430
|
|
|
505
431
|
<p align="center">
|
|
506
|
-
|
|
432
|
+
Supported by <a href="https://localstack.cloud">LocalStack</a>.
|
|
507
433
|
</p>
|
|
508
434
|
|
|
509
435
|
---
|