vaulter 0.2.1 → 1.0.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.
- package/README.md +842 -21
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +80 -11
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/integrations/kubernetes.d.ts +14 -0
- package/dist/cli/commands/integrations/kubernetes.d.ts.map +1 -1
- package/dist/cli/commands/integrations/kubernetes.js +166 -56
- package/dist/cli/commands/integrations/kubernetes.js.map +1 -1
- package/dist/cli/commands/integrations/terraform.js +1 -1
- package/dist/cli/commands/integrations/terraform.js.map +1 -1
- package/dist/cli/commands/key.d.ts.map +1 -1
- package/dist/cli/commands/key.js +1 -1
- package/dist/cli/commands/key.js.map +1 -1
- package/dist/cli/commands/pull.d.ts.map +1 -1
- package/dist/cli/commands/pull.js +6 -4
- package/dist/cli/commands/pull.js.map +1 -1
- package/dist/cli/commands/push.d.ts.map +1 -1
- package/dist/cli/commands/push.js +6 -4
- package/dist/cli/commands/push.js.map +1 -1
- package/dist/cli/commands/services.js +1 -1
- package/dist/cli/commands/services.js.map +1 -1
- package/dist/cli/commands/set.d.ts +13 -1
- package/dist/cli/commands/set.d.ts.map +1 -1
- package/dist/cli/commands/set.js +298 -48
- package/dist/cli/commands/set.js.map +1 -1
- package/dist/cli/commands/sync.d.ts +3 -2
- package/dist/cli/commands/sync.d.ts.map +1 -1
- package/dist/cli/commands/sync.js +22 -19
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/index.js +296 -135
- package/dist/cli/index.js.map +1 -1
- package/dist/client.d.ts +6 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +21 -3
- package/dist/client.js.map +1 -1
- package/dist/lib/batch-runner.d.ts +0 -1
- package/dist/lib/batch-runner.d.ts.map +1 -1
- package/dist/lib/batch-runner.js +1 -1
- package/dist/lib/batch-runner.js.map +1 -1
- package/dist/lib/config-loader.d.ts +39 -1
- package/dist/lib/config-loader.d.ts.map +1 -1
- package/dist/lib/config-loader.js +106 -6
- package/dist/lib/config-loader.js.map +1 -1
- package/dist/mcp/prompts.d.ts +22 -0
- package/dist/mcp/prompts.d.ts.map +1 -0
- package/dist/mcp/prompts.js +402 -0
- package/dist/mcp/prompts.js.map +1 -0
- package/dist/mcp/resources.d.ts +8 -2
- package/dist/mcp/resources.d.ts.map +1 -1
- package/dist/mcp/resources.js +301 -25
- package/dist/mcp/resources.js.map +1 -1
- package/dist/mcp/server.d.ts +5 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +43 -6
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools.d.ts +2 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +705 -293
- package/dist/mcp/tools.js.map +1 -1
- package/dist/types.d.ts +25 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -18,9 +18,11 @@ npm install -g vaulter
|
|
|
18
18
|
# Initialize project
|
|
19
19
|
vaulter init
|
|
20
20
|
|
|
21
|
-
# Set
|
|
22
|
-
vaulter set DATABASE_URL
|
|
23
|
-
|
|
21
|
+
# Set secrets (encrypted, synced to backend)
|
|
22
|
+
vaulter set DATABASE_URL="postgres://localhost/mydb" API_KEY="sk-secret-key" -e dev
|
|
23
|
+
|
|
24
|
+
# Set configs (plain text in split mode, synced in unified mode)
|
|
25
|
+
vaulter set PORT::3000 LOG_LEVEL::debug -e dev
|
|
24
26
|
|
|
25
27
|
# Export to shell
|
|
26
28
|
eval $(vaulter export -e dev)
|
|
@@ -50,13 +52,49 @@ MCP server for Claude AI. Zero config for dev, production-ready.
|
|
|
50
52
|
|
|
51
53
|
---
|
|
52
54
|
|
|
55
|
+
## Table of Contents
|
|
56
|
+
|
|
57
|
+
- [Quick Start](#quick-start)
|
|
58
|
+
- [What's Inside](#whats-inside)
|
|
59
|
+
- [Highlights](#highlights)
|
|
60
|
+
- [Commands](#commands)
|
|
61
|
+
- [Configuration](#configuration)
|
|
62
|
+
- [Directory Modes](#directory-modes)
|
|
63
|
+
- [Backend URLs](#backend-urls)
|
|
64
|
+
- [Encryption](#encryption)
|
|
65
|
+
- [Running Commands](#running-commands)
|
|
66
|
+
- [Shell Scripts](#shell-scripts)
|
|
67
|
+
- [Interactive Tools](#interactive-tools)
|
|
68
|
+
- [Integrations](#integrations)
|
|
69
|
+
- [kubectl](#kubectl)
|
|
70
|
+
- [Helm & Helmfile](#helm--helmfile)
|
|
71
|
+
- [Terraform & Terragrunt](#terraform--terragrunt)
|
|
72
|
+
- [Monorepo Support](#monorepo-support)
|
|
73
|
+
- [NX Monorepo](#nx-monorepo)
|
|
74
|
+
- [Turborepo](#turborepo)
|
|
75
|
+
- [MCP Server](#mcp-server)
|
|
76
|
+
- [MCP Tools](#mcp-tools-14)
|
|
77
|
+
- [MCP Resources](#mcp-resources-5)
|
|
78
|
+
- [MCP Prompts](#mcp-prompts-5)
|
|
79
|
+
- [CI/CD](#cicd)
|
|
80
|
+
- [Developer Daily Workflow](#developer-daily-workflow)
|
|
81
|
+
- [GitHub Actions](#github-actions)
|
|
82
|
+
- [GitLab CI](#gitlab-ci)
|
|
83
|
+
- [CircleCI](#circleci)
|
|
84
|
+
- [Azure DevOps](#azure-devops)
|
|
85
|
+
- [Security Best Practices](#security-best-practices)
|
|
86
|
+
- [API Usage](#api-usage)
|
|
87
|
+
- [Pre-built Binaries](#pre-built-binaries)
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
53
91
|
## What's Inside
|
|
54
92
|
|
|
55
93
|
| Category | Features |
|
|
56
94
|
|:---------|:---------|
|
|
57
95
|
| **Backends** | AWS S3, MinIO, Cloudflare R2, DigitalOcean Spaces, Backblaze B2, FileSystem, Memory |
|
|
58
|
-
| **Encryption** | AES-256-GCM via s3db.js, field-level encryption
|
|
59
|
-
| **Environments** | dev, stg, prd, sbx, dr (
|
|
96
|
+
| **Encryption** | AES-256-GCM via s3db.js, field-level encryption |
|
|
97
|
+
| **Environments** | dev, stg, prd, sbx, dr (configurable subset) |
|
|
60
98
|
| **Integrations** | Kubernetes Secret/ConfigMap, Helm values.yaml, Terraform tfvars |
|
|
61
99
|
| **Monorepo** | Service discovery, batch operations, config inheritance |
|
|
62
100
|
| **MCP Server** | Claude AI integration via Model Context Protocol |
|
|
@@ -141,7 +179,8 @@ loader({ path: '.env.local', override: true })
|
|
|
141
179
|
|:--------|:------------|:--------|
|
|
142
180
|
| `init` | Initialize project | `vaulter init` |
|
|
143
181
|
| `get <key>` | Get a variable | `vaulter get DATABASE_URL -e prd` |
|
|
144
|
-
| `set
|
|
182
|
+
| `set KEY=val ...` | Set secrets (batch) | `vaulter set KEY1=v1 KEY2=v2 -e prd` |
|
|
183
|
+
| `set KEY::val ...` | Set configs (plain) | `vaulter set PORT::3000 HOST::0.0.0.0 -e dev` |
|
|
145
184
|
| `delete <key>` | Delete a variable | `vaulter delete OLD_KEY -e dev` |
|
|
146
185
|
| `list` | List all variables | `vaulter list -e prd` |
|
|
147
186
|
| `export` | Export for shell | `eval $(vaulter export -e dev)` |
|
|
@@ -172,6 +211,35 @@ loader({ path: '.env.local', override: true })
|
|
|
172
211
|
| `services` | List monorepo services | `vaulter services` |
|
|
173
212
|
| `mcp` | Start MCP server | `vaulter mcp` |
|
|
174
213
|
|
|
214
|
+
### Set Command Syntax
|
|
215
|
+
|
|
216
|
+
HTTPie-style separators for differentiating secrets from configs:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
# Secrets (encrypted, synced to backend)
|
|
220
|
+
vaulter set KEY=value # Single secret
|
|
221
|
+
vaulter set A=1 B=2 C=3 -e dev # Batch secrets
|
|
222
|
+
vaulter set KEY:=123 # Typed secret (number/boolean)
|
|
223
|
+
|
|
224
|
+
# Configs (plain text, file only in split mode, synced in unified mode)
|
|
225
|
+
vaulter set PORT::3000 HOST::localhost # Configs
|
|
226
|
+
|
|
227
|
+
# With metadata
|
|
228
|
+
vaulter set DB_URL=postgres://... @tag:database,sensitive @owner:backend -e prd
|
|
229
|
+
|
|
230
|
+
# Legacy syntax (still works)
|
|
231
|
+
vaulter set KEY "value" -e dev # Treated as secret
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
| Separator | Type | Backend Sync | Encryption (backend) |
|
|
235
|
+
|:----------|:-----|:-------------|:-----------|
|
|
236
|
+
| `=` | Secret | ✓ | ✓ |
|
|
237
|
+
| `:=` | Secret (typed) | ✓ | ✓ |
|
|
238
|
+
| `::` | Config | Split: ✗ / Unified: ✓ | ✓ |
|
|
239
|
+
| `@key:value` | Metadata | — | — |
|
|
240
|
+
|
|
241
|
+
Note: Config files remain plain text; backend storage is encrypted for all values.
|
|
242
|
+
|
|
175
243
|
## Global Options
|
|
176
244
|
|
|
177
245
|
```
|
|
@@ -227,7 +295,7 @@ Sync merges local and remote variables. Conflicts are resolved by `sync.conflict
|
|
|
227
295
|
|
|
228
296
|
```yaml
|
|
229
297
|
sync:
|
|
230
|
-
conflict: local # local | remote |
|
|
298
|
+
conflict: local # local | remote | error
|
|
231
299
|
ignore:
|
|
232
300
|
- "PUBLIC_*"
|
|
233
301
|
required:
|
|
@@ -236,9 +304,70 @@ sync:
|
|
|
236
304
|
```
|
|
237
305
|
|
|
238
306
|
Notes:
|
|
239
|
-
- `
|
|
307
|
+
- `local` (default): Local values win on conflict, remote-only keys are pulled to local
|
|
308
|
+
- `remote`: Remote values win on conflict
|
|
309
|
+
- `error`: Stop sync if any conflicts are detected
|
|
240
310
|
- When reading from stdin, sync only updates the backend (local file is not changed).
|
|
241
311
|
|
|
312
|
+
### Directory Modes
|
|
313
|
+
|
|
314
|
+
Vaulter supports two directory structures for organizing environment files:
|
|
315
|
+
|
|
316
|
+
#### Unified Mode (Default)
|
|
317
|
+
|
|
318
|
+
All environment files in a single directory:
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
my-project/
|
|
322
|
+
├── .vaulter/
|
|
323
|
+
│ ├── config.yaml
|
|
324
|
+
│ └── environments/
|
|
325
|
+
│ ├── dev.env # All vars (secrets + configs)
|
|
326
|
+
│ ├── stg.env
|
|
327
|
+
│ └── prd.env
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
#### Split Mode
|
|
331
|
+
|
|
332
|
+
Separate directories for configs (committable) and secrets (gitignored):
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
my-project/
|
|
336
|
+
├── .vaulter/
|
|
337
|
+
│ └── config.yaml
|
|
338
|
+
└── deploy/
|
|
339
|
+
├── configs/ # ✅ Committable (non-sensitive)
|
|
340
|
+
│ ├── dev.env # NODE_ENV, PORT, LOG_LEVEL
|
|
341
|
+
│ ├── stg.env
|
|
342
|
+
│ └── prd.env
|
|
343
|
+
└── secrets/ # ❌ Gitignored (sensitive)
|
|
344
|
+
├── dev.env # DATABASE_URL, JWT_SECRET
|
|
345
|
+
├── stg.env
|
|
346
|
+
└── prd.env
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Configure split mode in `config.yaml`:
|
|
350
|
+
|
|
351
|
+
```yaml
|
|
352
|
+
directories:
|
|
353
|
+
mode: split # "unified" (default) or "split"
|
|
354
|
+
configs: deploy/configs # Non-sensitive vars (committable)
|
|
355
|
+
secrets: deploy/secrets # Sensitive vars (gitignored)
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Tip: scaffold split mode with `vaulter init --split`.
|
|
359
|
+
|
|
360
|
+
**Behavior in split mode:**
|
|
361
|
+
- `sync`, `pull`, `push` operate on the **secrets** directory
|
|
362
|
+
- `k8s:secret` reads from local **secrets** file (no backend fetch)
|
|
363
|
+
- `k8s:configmap` reads from local **configs** file (no backend fetch)
|
|
364
|
+
- Configs are managed via git, secrets via vaulter
|
|
365
|
+
|
|
366
|
+
**When to use split mode:**
|
|
367
|
+
- Monorepos with deploy directories per service
|
|
368
|
+
- Teams that want configs reviewed in PRs
|
|
369
|
+
- Environments where non-sensitive configs should be in git
|
|
370
|
+
|
|
242
371
|
### Hooks
|
|
243
372
|
|
|
244
373
|
```yaml
|
|
@@ -322,6 +451,231 @@ security:
|
|
|
322
451
|
|
|
323
452
|
`auto_encrypt.patterns` is used to classify secrets for integrations (K8s/Helm).
|
|
324
453
|
|
|
454
|
+
## Running Commands
|
|
455
|
+
|
|
456
|
+
Load environment variables into any command using `eval $(vaulter export)`.
|
|
457
|
+
|
|
458
|
+
### Shell Scripts
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
# Run a script with environment variables
|
|
462
|
+
eval $(vaulter export -e dev) ./myscript.sh
|
|
463
|
+
|
|
464
|
+
# Or in two steps
|
|
465
|
+
eval $(vaulter export -e dev)
|
|
466
|
+
./myscript.sh
|
|
467
|
+
|
|
468
|
+
# One-liner with subshell (vars don't persist after)
|
|
469
|
+
(eval $(vaulter export -e prd) && ./deploy.sh)
|
|
470
|
+
|
|
471
|
+
# Using env command (cleaner syntax)
|
|
472
|
+
env $(vaulter export -e dev --format=shell) ./myscript.sh
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
### Interactive Tools
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
# k9s with production credentials
|
|
479
|
+
eval $(vaulter export -e prd) k9s
|
|
480
|
+
|
|
481
|
+
# psql with database URL
|
|
482
|
+
eval $(vaulter export -e dev) psql $DATABASE_URL
|
|
483
|
+
|
|
484
|
+
# redis-cli
|
|
485
|
+
eval $(vaulter export -e dev) redis-cli -u $REDIS_URL
|
|
486
|
+
|
|
487
|
+
# AWS CLI with credentials
|
|
488
|
+
eval $(vaulter export -e prd) aws s3 ls
|
|
489
|
+
|
|
490
|
+
# Docker run with env vars
|
|
491
|
+
eval $(vaulter export -e dev) docker run --env-file <(vaulter export -e dev --format=env) myapp
|
|
492
|
+
|
|
493
|
+
# Any Node.js app
|
|
494
|
+
eval $(vaulter export -e dev) node server.js
|
|
495
|
+
|
|
496
|
+
# Python app
|
|
497
|
+
eval $(vaulter export -e dev) python app.py
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Shell Alias (Recommended)
|
|
501
|
+
|
|
502
|
+
Add to your `~/.bashrc` or `~/.zshrc`:
|
|
503
|
+
|
|
504
|
+
```bash
|
|
505
|
+
# Quick alias for common environments
|
|
506
|
+
alias vdev='eval $(vaulter export -e dev)'
|
|
507
|
+
alias vstg='eval $(vaulter export -e stg)'
|
|
508
|
+
alias vprd='eval $(vaulter export -e prd)'
|
|
509
|
+
|
|
510
|
+
# Usage
|
|
511
|
+
vdev ./myscript.sh
|
|
512
|
+
vprd k9s
|
|
513
|
+
vstg psql $DATABASE_URL
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### One-liner Pattern
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
# Pattern: eval $(vaulter export -e ENV) COMMAND
|
|
520
|
+
eval $(vaulter export -e dev) npm run dev
|
|
521
|
+
eval $(vaulter export -e prd) kubectl get pods
|
|
522
|
+
eval $(vaulter export -e stg) terraform plan
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
## Integrations
|
|
526
|
+
|
|
527
|
+
### kubectl
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
# Create Secret from vaulter
|
|
531
|
+
vaulter k8s:secret -e prd | kubectl apply -f -
|
|
532
|
+
|
|
533
|
+
# Create ConfigMap (non-secret vars)
|
|
534
|
+
vaulter k8s:configmap -e prd | kubectl apply -f -
|
|
535
|
+
|
|
536
|
+
# With custom name and namespace
|
|
537
|
+
vaulter k8s:secret -e prd -n my-namespace --name my-app-secrets | kubectl apply -f -
|
|
538
|
+
|
|
539
|
+
# Dry-run to see YAML
|
|
540
|
+
vaulter k8s:secret -e prd --dry-run
|
|
541
|
+
|
|
542
|
+
# Create secret from export (alternative)
|
|
543
|
+
vaulter export -e prd --format=env | \
|
|
544
|
+
kubectl create secret generic myapp --from-env-file=/dev/stdin --dry-run=client -o yaml | \
|
|
545
|
+
kubectl apply -f -
|
|
546
|
+
|
|
547
|
+
# Run kubectl with vaulter vars
|
|
548
|
+
eval $(vaulter export -e prd) kubectl exec -it deploy/myapp -- env | grep DATABASE
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### Helm & Helmfile
|
|
552
|
+
|
|
553
|
+
#### Helm
|
|
554
|
+
|
|
555
|
+
```bash
|
|
556
|
+
# Generate values.yaml and pipe to helm
|
|
557
|
+
vaulter helm:values -e prd | helm upgrade myapp ./chart -f -
|
|
558
|
+
|
|
559
|
+
# Save values to file
|
|
560
|
+
vaulter helm:values -e prd > values.prd.yaml
|
|
561
|
+
helm upgrade myapp ./chart -f values.prd.yaml
|
|
562
|
+
|
|
563
|
+
# With secrets separated (uses auto_encrypt.patterns)
|
|
564
|
+
vaulter helm:values -e prd --secrets # Only secret vars
|
|
565
|
+
vaulter helm:values -e prd --config # Only non-secret vars
|
|
566
|
+
|
|
567
|
+
# Install with inline values
|
|
568
|
+
helm install myapp ./chart \
|
|
569
|
+
--set-string DATABASE_URL="$(vaulter get DATABASE_URL -e prd)" \
|
|
570
|
+
--set-string API_KEY="$(vaulter get API_KEY -e prd)"
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
#### Helmfile
|
|
574
|
+
|
|
575
|
+
```yaml
|
|
576
|
+
# helmfile.yaml
|
|
577
|
+
repositories:
|
|
578
|
+
- name: bitnami
|
|
579
|
+
url: https://charts.bitnami.com/bitnami
|
|
580
|
+
|
|
581
|
+
releases:
|
|
582
|
+
- name: myapp
|
|
583
|
+
namespace: production
|
|
584
|
+
chart: ./charts/myapp
|
|
585
|
+
values:
|
|
586
|
+
- values.yaml
|
|
587
|
+
- values.prd.yaml # Generated by: vaulter helm:values -e prd > values.prd.yaml
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
```bash
|
|
591
|
+
# Generate values before helmfile sync
|
|
592
|
+
vaulter helm:values -e prd > values.prd.yaml
|
|
593
|
+
helmfile sync
|
|
594
|
+
|
|
595
|
+
# Or use process substitution
|
|
596
|
+
helmfile sync --values <(vaulter helm:values -e prd)
|
|
597
|
+
|
|
598
|
+
# With environment variables for helmfile
|
|
599
|
+
eval $(vaulter export -e prd) helmfile apply
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
### Terraform & Terragrunt
|
|
603
|
+
|
|
604
|
+
#### Terraform
|
|
605
|
+
|
|
606
|
+
```bash
|
|
607
|
+
# Generate .tfvars file
|
|
608
|
+
vaulter tf:vars -e prd > terraform.tfvars
|
|
609
|
+
terraform plan
|
|
610
|
+
|
|
611
|
+
# Generate JSON format
|
|
612
|
+
vaulter tf:json -e prd > terraform.tfvars.json
|
|
613
|
+
terraform plan -var-file=terraform.tfvars.json
|
|
614
|
+
|
|
615
|
+
# Pass vars inline
|
|
616
|
+
terraform plan \
|
|
617
|
+
-var="database_url=$(vaulter get DATABASE_URL -e prd)" \
|
|
618
|
+
-var="api_key=$(vaulter get API_KEY -e prd)"
|
|
619
|
+
|
|
620
|
+
# Use TF_VAR_* environment variables
|
|
621
|
+
eval $(vaulter export -e prd --format=tfvars)
|
|
622
|
+
terraform plan
|
|
623
|
+
|
|
624
|
+
# Pipe directly (requires bash process substitution)
|
|
625
|
+
terraform plan -var-file=<(vaulter tf:vars -e prd)
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
#### Terragrunt
|
|
629
|
+
|
|
630
|
+
```bash
|
|
631
|
+
# Set env vars for terragrunt
|
|
632
|
+
eval $(vaulter export -e prd) terragrunt plan
|
|
633
|
+
|
|
634
|
+
# Generate inputs file
|
|
635
|
+
vaulter tf:vars -e prd > inputs.tfvars
|
|
636
|
+
terragrunt plan --terragrunt-config terragrunt.hcl
|
|
637
|
+
|
|
638
|
+
# In terragrunt.hcl - use environment variables
|
|
639
|
+
# terragrunt.hcl
|
|
640
|
+
inputs = {
|
|
641
|
+
database_url = get_env("DATABASE_URL", "")
|
|
642
|
+
api_key = get_env("API_KEY", "")
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
# Then run:
|
|
646
|
+
eval $(vaulter export -e prd) terragrunt apply
|
|
647
|
+
|
|
648
|
+
# Or with inputs file
|
|
649
|
+
# terragrunt.hcl
|
|
650
|
+
terraform {
|
|
651
|
+
extra_arguments "custom_vars" {
|
|
652
|
+
commands = get_terraform_commands_that_need_vars()
|
|
653
|
+
arguments = [
|
|
654
|
+
"-var-file=inputs.tfvars"
|
|
655
|
+
]
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
```bash
|
|
661
|
+
# Full workflow with terragrunt
|
|
662
|
+
vaulter pull -e prd # Get latest vars
|
|
663
|
+
vaulter tf:vars -e prd > inputs.tfvars # Generate tfvars
|
|
664
|
+
terragrunt plan # Plan with vars
|
|
665
|
+
terragrunt apply # Apply
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
### Integration Summary
|
|
669
|
+
|
|
670
|
+
| Tool | Command |
|
|
671
|
+
|:-----|:--------|
|
|
672
|
+
| **kubectl** | `vaulter k8s:secret -e prd \| kubectl apply -f -` |
|
|
673
|
+
| **helm** | `vaulter helm:values -e prd \| helm upgrade app ./chart -f -` |
|
|
674
|
+
| **helmfile** | `vaulter helm:values -e prd > values.prd.yaml && helmfile sync` |
|
|
675
|
+
| **terraform** | `vaulter tf:vars -e prd > terraform.tfvars && terraform plan` |
|
|
676
|
+
| **terragrunt** | `eval $(vaulter export -e prd) terragrunt apply` |
|
|
677
|
+
| **any command** | `eval $(vaulter export -e ENV) COMMAND` |
|
|
678
|
+
|
|
325
679
|
## Monorepo Support
|
|
326
680
|
|
|
327
681
|
Vaulter auto-discovers services with `.vaulter/` directories and supports config inheritance.
|
|
@@ -433,44 +787,508 @@ vaulter sync -e dev -s "svc-*"
|
|
|
433
787
|
vaulter export -e prd --all --format=json
|
|
434
788
|
```
|
|
435
789
|
|
|
436
|
-
## MCP
|
|
790
|
+
## MCP Server
|
|
791
|
+
|
|
792
|
+
Vaulter includes a full-featured **Model Context Protocol (MCP)** server for AI assistant integration. Works with Claude, ChatGPT, and any MCP-compatible client.
|
|
793
|
+
|
|
794
|
+
### Quick Setup
|
|
795
|
+
|
|
796
|
+
```bash
|
|
797
|
+
# Start MCP server
|
|
798
|
+
vaulter mcp
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
Add to your Claude config (`~/.config/claude/claude_desktop_config.json`):
|
|
802
|
+
|
|
803
|
+
```json
|
|
804
|
+
{
|
|
805
|
+
"mcpServers": {
|
|
806
|
+
"vaulter": {
|
|
807
|
+
"command": "npx",
|
|
808
|
+
"args": ["vaulter", "mcp"]
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
Or with the binary:
|
|
815
|
+
|
|
816
|
+
```json
|
|
817
|
+
{
|
|
818
|
+
"mcpServers": {
|
|
819
|
+
"vaulter": {
|
|
820
|
+
"command": "/usr/local/bin/vaulter",
|
|
821
|
+
"args": ["mcp"]
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
### MCP Tools (14)
|
|
828
|
+
|
|
829
|
+
The MCP server exposes 14 tools organized into categories:
|
|
830
|
+
|
|
831
|
+
#### Core Tools
|
|
832
|
+
|
|
833
|
+
| Tool | Description | Example Use |
|
|
834
|
+
|:-----|:------------|:------------|
|
|
835
|
+
| `vaulter_get` | Get a single variable | "Get the DATABASE_URL for production" |
|
|
836
|
+
| `vaulter_set` | Set a variable with tags | "Set API_KEY to sk-xxx for dev" |
|
|
837
|
+
| `vaulter_delete` | Delete a variable | "Remove the old LEGACY_KEY" |
|
|
838
|
+
| `vaulter_list` | List all variables | "Show all vars in staging" |
|
|
839
|
+
| `vaulter_export` | Export in various formats | "Export prod vars as JSON" |
|
|
840
|
+
|
|
841
|
+
#### Sync Tools
|
|
842
|
+
|
|
843
|
+
| Tool | Description | Example Use |
|
|
844
|
+
|:-----|:------------|:------------|
|
|
845
|
+
| `vaulter_sync` | Bidirectional sync | "Sync local .env with dev backend" |
|
|
846
|
+
| `vaulter_pull` | Download from backend | "Pull production vars to .env.prd" |
|
|
847
|
+
| `vaulter_push` | Upload to backend | "Push .env.local to dev" |
|
|
848
|
+
|
|
849
|
+
#### Analysis Tools
|
|
437
850
|
|
|
438
|
-
| Tool | Description |
|
|
439
|
-
|
|
440
|
-
| `
|
|
441
|
-
| `
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
|
851
|
+
| Tool | Description | Example Use |
|
|
852
|
+
|:-----|:------------|:------------|
|
|
853
|
+
| `vaulter_compare` | Compare two environments | "What's different between stg and prd?" |
|
|
854
|
+
| `vaulter_search` | Search by key pattern | "Find all vars containing DATABASE" |
|
|
855
|
+
|
|
856
|
+
#### Monorepo Tools
|
|
857
|
+
|
|
858
|
+
| Tool | Description | Example Use |
|
|
859
|
+
|:-----|:------------|:------------|
|
|
860
|
+
| `vaulter_services` | List discovered services | "What services are in this monorepo?" |
|
|
861
|
+
|
|
862
|
+
#### Kubernetes Tools
|
|
863
|
+
|
|
864
|
+
| Tool | Description | Example Use |
|
|
865
|
+
|:-----|:------------|:------------|
|
|
866
|
+
| `vaulter_k8s_secret` | Generate K8s Secret YAML | "Generate a K8s secret for prod" |
|
|
867
|
+
| `vaulter_k8s_configmap` | Generate K8s ConfigMap | "Create a ConfigMap for non-secrets" |
|
|
868
|
+
|
|
869
|
+
#### Setup Tools
|
|
870
|
+
|
|
871
|
+
| Tool | Description | Example Use |
|
|
872
|
+
|:-----|:------------|:------------|
|
|
873
|
+
| `vaulter_init` | Initialize new project | "Set up vaulter in this project" |
|
|
874
|
+
|
|
875
|
+
### MCP Resources (5)
|
|
876
|
+
|
|
877
|
+
Resources provide read-only views of your secrets and configuration:
|
|
878
|
+
|
|
879
|
+
| Resource URI | Description | Content |
|
|
880
|
+
|:-------------|:------------|:--------|
|
|
881
|
+
| `vaulter://config` | Project configuration | YAML from .vaulter/config.yaml |
|
|
882
|
+
| `vaulter://services` | Monorepo services | JSON list of discovered services |
|
|
883
|
+
| `vaulter://project/env` | Environment variables | .env format for project/env |
|
|
884
|
+
| `vaulter://project/env/service` | Service-specific vars | .env format for service |
|
|
885
|
+
| `vaulter://compare/env1/env2` | Environment comparison | Diff between two environments |
|
|
886
|
+
|
|
887
|
+
**Example resource access:**
|
|
888
|
+
- `vaulter://config` → Current config.yaml content
|
|
889
|
+
- `vaulter://my-app/prd` → Production vars for my-app
|
|
890
|
+
- `vaulter://compare/dev/prd` → What's different between dev and prod
|
|
891
|
+
|
|
892
|
+
### MCP Prompts (5)
|
|
893
|
+
|
|
894
|
+
Pre-configured workflow prompts guide AI through complex operations:
|
|
895
|
+
|
|
896
|
+
| Prompt | Description | Arguments |
|
|
897
|
+
|:-------|:------------|:----------|
|
|
898
|
+
| `setup_project` | Initialize a new vaulter project | `project_name`, `mode?`, `backend?` |
|
|
899
|
+
| `migrate_dotenv` | Migrate existing .env to vaulter | `file_path`, `environment`, `dry_run?` |
|
|
900
|
+
| `deploy_secrets` | Deploy secrets to Kubernetes | `environment`, `namespace?`, `secret_name?` |
|
|
901
|
+
| `compare_environments` | Compare two environments | `source_env`, `target_env`, `show_values?` |
|
|
902
|
+
| `security_audit` | Audit secrets for security issues | `environment`, `strict?` |
|
|
903
|
+
|
|
904
|
+
**Example prompt usage in Claude:**
|
|
905
|
+
- "Use the setup_project prompt to create a new project called api-service"
|
|
906
|
+
- "Run the migrate_dotenv prompt for .env.local to dev environment"
|
|
907
|
+
- "Execute security_audit for production in strict mode"
|
|
908
|
+
|
|
909
|
+
### MCP Capabilities Summary
|
|
910
|
+
|
|
911
|
+
| Category | Count | Features |
|
|
912
|
+
|:---------|------:|:---------|
|
|
913
|
+
| **Tools** | 14 | CRUD, sync, compare, K8s, init |
|
|
914
|
+
| **Resources** | 5 | Config, services, vars, comparison |
|
|
915
|
+
| **Prompts** | 5 | Setup, migrate, deploy, compare, audit |
|
|
916
|
+
| **Formats** | 5 | shell, json, yaml, env, tfvars |
|
|
917
|
+
|
|
918
|
+
### Example AI Conversations
|
|
919
|
+
|
|
920
|
+
**Setting up a new project:**
|
|
921
|
+
> "Help me set up vaulter for my new api-service project using S3 backend"
|
|
922
|
+
|
|
923
|
+
The AI will use `vaulter_init`, guide through backend config, and set up encryption.
|
|
924
|
+
|
|
925
|
+
**Migrating from dotenv:**
|
|
926
|
+
> "I have a .env.production file with 50 variables. Help me migrate to vaulter"
|
|
927
|
+
|
|
928
|
+
The AI will analyze the file, identify secrets vs configs, and sync to backend.
|
|
929
|
+
|
|
930
|
+
**Deploying to Kubernetes:**
|
|
931
|
+
> "Generate Kubernetes secrets for production and show me how to deploy them"
|
|
932
|
+
|
|
933
|
+
The AI will use `vaulter_k8s_secret` and provide kubectl commands.
|
|
934
|
+
|
|
935
|
+
**Comparing environments:**
|
|
936
|
+
> "What variables are in staging but missing from production?"
|
|
937
|
+
|
|
938
|
+
The AI will use `vaulter_compare` and show the differences.
|
|
939
|
+
|
|
940
|
+
**Security review:**
|
|
941
|
+
> "Audit my production secrets for security issues"
|
|
942
|
+
|
|
943
|
+
The AI will analyze variable patterns, check for weak values, and provide recommendations.
|
|
446
944
|
|
|
447
945
|
## CI/CD
|
|
448
946
|
|
|
947
|
+
### Developer Daily Workflow
|
|
948
|
+
|
|
949
|
+
A typical day with vaulter:
|
|
950
|
+
|
|
951
|
+
#### 1. Morning Setup
|
|
952
|
+
|
|
953
|
+
```bash
|
|
954
|
+
# Pull latest secrets to your local .env
|
|
955
|
+
vaulter pull -e dev
|
|
956
|
+
|
|
957
|
+
# Start development with loaded vars
|
|
958
|
+
eval $(vaulter export -e dev) npm run dev
|
|
959
|
+
|
|
960
|
+
# Or use the alias (add to ~/.bashrc)
|
|
961
|
+
alias vdev='eval $(vaulter export -e dev)'
|
|
962
|
+
vdev npm run dev
|
|
963
|
+
```
|
|
964
|
+
|
|
965
|
+
#### 2. Adding New Variables
|
|
966
|
+
|
|
967
|
+
```bash
|
|
968
|
+
# Add a new secret (encrypted, synced to backend)
|
|
969
|
+
vaulter set NEW_API_KEY="sk-xxx" -e dev
|
|
970
|
+
|
|
971
|
+
# Add a config (plain text)
|
|
972
|
+
vaulter set LOG_LEVEL::debug -e dev
|
|
973
|
+
|
|
974
|
+
# Batch add multiple vars
|
|
975
|
+
vaulter set DB_HOST::localhost DB_PORT::5432 DB_PASSWORD="secret123" -e dev
|
|
976
|
+
|
|
977
|
+
# Check what you have
|
|
978
|
+
vaulter list -e dev
|
|
979
|
+
```
|
|
980
|
+
|
|
981
|
+
#### 3. Syncing with Team
|
|
982
|
+
|
|
983
|
+
```bash
|
|
984
|
+
# Your teammate added new vars - pull them
|
|
985
|
+
vaulter pull -e dev
|
|
986
|
+
|
|
987
|
+
# You made changes - push to backend
|
|
988
|
+
vaulter push -e dev
|
|
989
|
+
|
|
990
|
+
# Two-way sync (recommended)
|
|
991
|
+
vaulter sync -e dev
|
|
992
|
+
|
|
993
|
+
# Preview before sync
|
|
994
|
+
vaulter sync -e dev --dry-run
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
#### 4. Testing Different Environments
|
|
998
|
+
|
|
999
|
+
```bash
|
|
1000
|
+
# Run with staging config
|
|
1001
|
+
eval $(vaulter export -e stg) npm test
|
|
1002
|
+
|
|
1003
|
+
# Compare what's different in production
|
|
1004
|
+
vaulter compare -e dev -e prd
|
|
1005
|
+
|
|
1006
|
+
# One-liner to check production
|
|
1007
|
+
vdev npm run dev # dev
|
|
1008
|
+
vstg npm test # stg
|
|
1009
|
+
vprd npm run build # prd (be careful!)
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
#### 5. Before Code Review
|
|
1013
|
+
|
|
1014
|
+
```bash
|
|
1015
|
+
# Make sure all required vars are documented
|
|
1016
|
+
vaulter list -e dev --json | jq 'keys'
|
|
1017
|
+
|
|
1018
|
+
# Check nothing sensitive is in wrong place
|
|
1019
|
+
vaulter search "*PASSWORD*" -e dev
|
|
1020
|
+
vaulter search "*SECRET*" -e dev
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
#### 6. Deployment Prep
|
|
1024
|
+
|
|
1025
|
+
```bash
|
|
1026
|
+
# Generate K8s secret and review
|
|
1027
|
+
vaulter k8s:secret -e prd --dry-run
|
|
1028
|
+
|
|
1029
|
+
# Generate and apply
|
|
1030
|
+
vaulter k8s:secret -e prd | kubectl apply -f -
|
|
1031
|
+
|
|
1032
|
+
# Or export for Helm
|
|
1033
|
+
vaulter helm:values -e prd > values.prd.yaml
|
|
1034
|
+
helm upgrade myapp ./chart -f values.prd.yaml
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
### Shell Aliases (Recommended)
|
|
1038
|
+
|
|
1039
|
+
Add to `~/.bashrc` or `~/.zshrc`:
|
|
1040
|
+
|
|
1041
|
+
```bash
|
|
1042
|
+
# Quick environment loading
|
|
1043
|
+
alias vdev='eval $(vaulter export -e dev)'
|
|
1044
|
+
alias vstg='eval $(vaulter export -e stg)'
|
|
1045
|
+
alias vprd='eval $(vaulter export -e prd)'
|
|
1046
|
+
|
|
1047
|
+
# Common operations
|
|
1048
|
+
alias vpull='vaulter pull -e dev'
|
|
1049
|
+
alias vpush='vaulter push -e dev'
|
|
1050
|
+
alias vsync='vaulter sync -e dev'
|
|
1051
|
+
alias vlist='vaulter list -e dev'
|
|
1052
|
+
|
|
1053
|
+
# K8s shortcuts
|
|
1054
|
+
alias vk8s='vaulter k8s:secret'
|
|
1055
|
+
alias vhelm='vaulter helm:values'
|
|
1056
|
+
|
|
1057
|
+
# Usage
|
|
1058
|
+
vdev npm run dev # Dev with env vars
|
|
1059
|
+
vstg npm test # Test with staging
|
|
1060
|
+
vpull && vdev npm run dev # Pull latest, then run
|
|
1061
|
+
vk8s -e prd | kubectl apply -f - # Deploy secrets
|
|
1062
|
+
```
|
|
1063
|
+
|
|
449
1064
|
### GitHub Actions
|
|
450
1065
|
|
|
1066
|
+
#### Basic Deploy Secrets
|
|
1067
|
+
|
|
1068
|
+
```yaml
|
|
1069
|
+
name: Deploy
|
|
1070
|
+
on:
|
|
1071
|
+
push:
|
|
1072
|
+
branches: [main]
|
|
1073
|
+
|
|
1074
|
+
jobs:
|
|
1075
|
+
deploy:
|
|
1076
|
+
runs-on: ubuntu-latest
|
|
1077
|
+
steps:
|
|
1078
|
+
- uses: actions/checkout@v4
|
|
1079
|
+
|
|
1080
|
+
- name: Deploy secrets to K8s
|
|
1081
|
+
env:
|
|
1082
|
+
VAULTER_KEY: ${{ secrets.VAULTER_KEY }}
|
|
1083
|
+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
1084
|
+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
1085
|
+
run: |
|
|
1086
|
+
npx vaulter k8s:secret -e prd | kubectl apply -f -
|
|
1087
|
+
```
|
|
1088
|
+
|
|
1089
|
+
#### Multi-Environment Deploy
|
|
1090
|
+
|
|
451
1091
|
```yaml
|
|
1092
|
+
name: Deploy to Environment
|
|
1093
|
+
on:
|
|
1094
|
+
workflow_dispatch:
|
|
1095
|
+
inputs:
|
|
1096
|
+
environment:
|
|
1097
|
+
description: 'Environment to deploy'
|
|
1098
|
+
required: true
|
|
1099
|
+
type: choice
|
|
1100
|
+
options: [dev, stg, prd]
|
|
1101
|
+
|
|
452
1102
|
jobs:
|
|
453
1103
|
deploy:
|
|
454
1104
|
runs-on: ubuntu-latest
|
|
1105
|
+
environment: ${{ inputs.environment }}
|
|
455
1106
|
steps:
|
|
456
1107
|
- uses: actions/checkout@v4
|
|
1108
|
+
|
|
457
1109
|
- name: Deploy secrets
|
|
458
1110
|
env:
|
|
459
1111
|
VAULTER_KEY: ${{ secrets.VAULTER_KEY }}
|
|
460
1112
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
461
1113
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
462
1114
|
run: |
|
|
1115
|
+
npx vaulter k8s:secret -e ${{ inputs.environment }} | kubectl apply -f -
|
|
1116
|
+
npx vaulter k8s:configmap -e ${{ inputs.environment }} | kubectl apply -f -
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
#### Monorepo with Matrix
|
|
1120
|
+
|
|
1121
|
+
```yaml
|
|
1122
|
+
name: Deploy Services
|
|
1123
|
+
on:
|
|
1124
|
+
push:
|
|
1125
|
+
branches: [main]
|
|
1126
|
+
|
|
1127
|
+
jobs:
|
|
1128
|
+
deploy:
|
|
1129
|
+
runs-on: ubuntu-latest
|
|
1130
|
+
strategy:
|
|
1131
|
+
matrix:
|
|
1132
|
+
service: [api, web, worker]
|
|
1133
|
+
steps:
|
|
1134
|
+
- uses: actions/checkout@v4
|
|
1135
|
+
|
|
1136
|
+
- name: Deploy ${{ matrix.service }} secrets
|
|
1137
|
+
env:
|
|
1138
|
+
VAULTER_KEY: ${{ secrets.VAULTER_KEY }}
|
|
1139
|
+
run: |
|
|
1140
|
+
cd apps/${{ matrix.service }}
|
|
463
1141
|
npx vaulter k8s:secret -e prd | kubectl apply -f -
|
|
464
1142
|
```
|
|
465
1143
|
|
|
1144
|
+
#### PR Preview Environment
|
|
1145
|
+
|
|
1146
|
+
```yaml
|
|
1147
|
+
name: PR Preview
|
|
1148
|
+
on:
|
|
1149
|
+
pull_request:
|
|
1150
|
+
types: [opened, synchronize]
|
|
1151
|
+
|
|
1152
|
+
jobs:
|
|
1153
|
+
preview:
|
|
1154
|
+
runs-on: ubuntu-latest
|
|
1155
|
+
steps:
|
|
1156
|
+
- uses: actions/checkout@v4
|
|
1157
|
+
|
|
1158
|
+
- name: Create preview secrets
|
|
1159
|
+
env:
|
|
1160
|
+
VAULTER_KEY: ${{ secrets.VAULTER_KEY }}
|
|
1161
|
+
run: |
|
|
1162
|
+
# Use dev secrets for PR previews
|
|
1163
|
+
npx vaulter k8s:secret -e dev -n preview-pr-${{ github.event.number }} | \
|
|
1164
|
+
kubectl apply -f -
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
#### Validate Secrets Exist
|
|
1168
|
+
|
|
1169
|
+
```yaml
|
|
1170
|
+
name: Validate Secrets
|
|
1171
|
+
on:
|
|
1172
|
+
pull_request:
|
|
1173
|
+
paths:
|
|
1174
|
+
- '.vaulter/**'
|
|
1175
|
+
- 'deploy/**'
|
|
1176
|
+
|
|
1177
|
+
jobs:
|
|
1178
|
+
validate:
|
|
1179
|
+
runs-on: ubuntu-latest
|
|
1180
|
+
steps:
|
|
1181
|
+
- uses: actions/checkout@v4
|
|
1182
|
+
|
|
1183
|
+
- name: Check required secrets exist
|
|
1184
|
+
env:
|
|
1185
|
+
VAULTER_KEY: ${{ secrets.VAULTER_KEY }}
|
|
1186
|
+
run: |
|
|
1187
|
+
# List and verify required secrets are set
|
|
1188
|
+
npx vaulter list -e prd --json | jq -e '.DATABASE_URL and .API_KEY'
|
|
1189
|
+
```
|
|
1190
|
+
|
|
466
1191
|
### GitLab CI
|
|
467
1192
|
|
|
468
1193
|
```yaml
|
|
469
|
-
|
|
1194
|
+
stages:
|
|
1195
|
+
- validate
|
|
1196
|
+
- deploy
|
|
1197
|
+
|
|
1198
|
+
variables:
|
|
1199
|
+
VAULTER_KEY: $VAULTER_KEY
|
|
1200
|
+
|
|
1201
|
+
validate-secrets:
|
|
1202
|
+
stage: validate
|
|
1203
|
+
script:
|
|
1204
|
+
- npx vaulter list -e $CI_ENVIRONMENT_NAME --json | jq -e 'keys | length > 0'
|
|
1205
|
+
rules:
|
|
1206
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
1207
|
+
|
|
1208
|
+
deploy-secrets:
|
|
1209
|
+
stage: deploy
|
|
470
1210
|
script:
|
|
471
1211
|
- npx vaulter k8s:secret -e prd | kubectl apply -f -
|
|
472
|
-
|
|
473
|
-
|
|
1212
|
+
environment:
|
|
1213
|
+
name: production
|
|
1214
|
+
rules:
|
|
1215
|
+
- if: $CI_COMMIT_BRANCH == "main"
|
|
1216
|
+
```
|
|
1217
|
+
|
|
1218
|
+
### CircleCI
|
|
1219
|
+
|
|
1220
|
+
```yaml
|
|
1221
|
+
version: 2.1
|
|
1222
|
+
jobs:
|
|
1223
|
+
deploy:
|
|
1224
|
+
docker:
|
|
1225
|
+
- image: cimg/node:20.0
|
|
1226
|
+
steps:
|
|
1227
|
+
- checkout
|
|
1228
|
+
- run:
|
|
1229
|
+
name: Deploy secrets
|
|
1230
|
+
command: |
|
|
1231
|
+
npx vaulter k8s:secret -e prd | kubectl apply -f -
|
|
1232
|
+
environment:
|
|
1233
|
+
VAULTER_KEY: ${VAULTER_KEY}
|
|
1234
|
+
|
|
1235
|
+
workflows:
|
|
1236
|
+
deploy:
|
|
1237
|
+
jobs:
|
|
1238
|
+
- deploy:
|
|
1239
|
+
filters:
|
|
1240
|
+
branches:
|
|
1241
|
+
only: main
|
|
1242
|
+
```
|
|
1243
|
+
|
|
1244
|
+
### Azure DevOps
|
|
1245
|
+
|
|
1246
|
+
```yaml
|
|
1247
|
+
trigger:
|
|
1248
|
+
- main
|
|
1249
|
+
|
|
1250
|
+
pool:
|
|
1251
|
+
vmImage: 'ubuntu-latest'
|
|
1252
|
+
|
|
1253
|
+
steps:
|
|
1254
|
+
- task: NodeTool@0
|
|
1255
|
+
inputs:
|
|
1256
|
+
versionSpec: '20.x'
|
|
1257
|
+
|
|
1258
|
+
- script: |
|
|
1259
|
+
npx vaulter k8s:secret -e prd | kubectl apply -f -
|
|
1260
|
+
displayName: 'Deploy secrets'
|
|
1261
|
+
env:
|
|
1262
|
+
VAULTER_KEY: $(VAULTER_KEY)
|
|
1263
|
+
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
|
|
1264
|
+
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
|
1265
|
+
```
|
|
1266
|
+
|
|
1267
|
+
### CI/CD Best Practices
|
|
1268
|
+
|
|
1269
|
+
| Practice | Recommendation |
|
|
1270
|
+
|:---------|:---------------|
|
|
1271
|
+
| **Store VAULTER_KEY securely** | Use CI provider's secret management |
|
|
1272
|
+
| **Use IAM roles when possible** | Prefer roles over hardcoded credentials |
|
|
1273
|
+
| **Different keys per environment** | Don't share prd key with dev |
|
|
1274
|
+
| **Validate before deploy** | Run `--dry-run` first in pipelines |
|
|
1275
|
+
| **Use environment protection** | Require approval for prd deploys |
|
|
1276
|
+
| **Cache vaulter binary** | Download once per pipeline, not per job |
|
|
1277
|
+
|
|
1278
|
+
### Caching Vaulter Binary
|
|
1279
|
+
|
|
1280
|
+
```yaml
|
|
1281
|
+
# GitHub Actions
|
|
1282
|
+
- uses: actions/cache@v3
|
|
1283
|
+
with:
|
|
1284
|
+
path: ~/.npm
|
|
1285
|
+
key: vaulter-${{ runner.os }}
|
|
1286
|
+
|
|
1287
|
+
# Or download binary directly
|
|
1288
|
+
- name: Install vaulter
|
|
1289
|
+
run: |
|
|
1290
|
+
curl -sL https://github.com/forattini-dev/vaulter/releases/latest/download/vaulter-linux -o /usr/local/bin/vaulter
|
|
1291
|
+
chmod +x /usr/local/bin/vaulter
|
|
474
1292
|
```
|
|
475
1293
|
|
|
476
1294
|
## Security Best Practices
|
|
@@ -490,6 +1308,7 @@ deploy:
|
|
|
490
1308
|
.vaulter/.key
|
|
491
1309
|
.vaulter/config.local.yaml
|
|
492
1310
|
**/config.local.yaml
|
|
1311
|
+
deploy/secrets/
|
|
493
1312
|
.env
|
|
494
1313
|
.env.*
|
|
495
1314
|
```
|
|
@@ -546,7 +1365,9 @@ await client.disconnect()
|
|
|
546
1365
|
| Backends | 7 (S3, MinIO, R2, Spaces, B2, FileSystem, Memory) |
|
|
547
1366
|
| Environments | 5 (dev, stg, prd, sbx, dr) |
|
|
548
1367
|
| Export Formats | 5 (shell, json, yaml, env, tfvars) |
|
|
549
|
-
| MCP Tools |
|
|
1368
|
+
| MCP Tools | 14 (core, sync, analysis, monorepo, k8s, setup) |
|
|
1369
|
+
| MCP Resources | 5 (config, services, vars, service vars, compare) |
|
|
1370
|
+
| MCP Prompts | 5 (setup, migrate, deploy, compare, audit) |
|
|
550
1371
|
| Integrations | 5 (K8s Secret, K8s ConfigMap, Helm, Terraform, tfvars) |
|
|
551
1372
|
|
|
552
1373
|
## Pre-built Binaries
|