@elumixor/devkit 0.4.0 → 0.4.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 +13 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,12 +44,15 @@ Each app runs `bun --filter <name> dev` by default. Override with:
|
|
|
44
44
|
|
|
45
45
|
A repo usually needs a couple of gitignored files before it will run — `.env`, `infra/terraform.tfvars` — and those cannot be fetched back from a host. Vercel, for one, stores Terraform-managed variables write-only and hands them back from `vercel env pull` as *empty strings*, which looks like it worked and quietly leaves you with a `.env` full of blanks.
|
|
46
46
|
|
|
47
|
-
So devkit syncs them itself,
|
|
47
|
+
So devkit syncs them itself, encrypted, in a private repo. On a new machine, the whole setup is:
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
+
gh auth login
|
|
50
51
|
devkit clone elumixor/puretype # clone, decrypt secrets, install, terraform init
|
|
51
52
|
```
|
|
52
53
|
|
|
54
|
+
`clone` asks for your secrets passphrase the first time, then caches it — you won't be asked again on that machine.
|
|
55
|
+
|
|
53
56
|
Declare what to sync and what to run:
|
|
54
57
|
|
|
55
58
|
```jsonc
|
|
@@ -75,18 +78,18 @@ Declare what to sync and what to run:
|
|
|
75
78
|
|
|
76
79
|
`setup` refuses to continue on a blank value. A missing secret that reads as `""` otherwise surfaces much later as an unrelated-looking bug.
|
|
77
80
|
|
|
78
|
-
### The
|
|
81
|
+
### The passphrase
|
|
79
82
|
|
|
80
|
-
|
|
83
|
+
Each project's secrets are packed into one AES-256-GCM bundle (`<project>.enc`) in the secrets repo, encrypted with a key derived from a single passphrase via scrypt. Nothing else is needed to read them — no key file, no keychain, no external binary — so this works on any OS.
|
|
81
84
|
|
|
82
|
-
First
|
|
85
|
+
- First `secrets push` for a project asks for the passphrase twice, to catch a typo you could never recover from.
|
|
86
|
+
- It's then cached at `~/.config/devkit/passphrase` (mode 600), so you type it once per machine.
|
|
87
|
+
- `DEVKIT_PASSPHRASE` overrides both, for CI.
|
|
88
|
+
- Wrong passphrase fails loudly on GCM's auth tag; it can't silently produce garbage.
|
|
83
89
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
cp /somewhere/key.txt ~/.config/age/key.txt # or age-keygen -o ~/.config/age/key.txt
|
|
88
|
-
devkit clone <owner/repo>
|
|
89
|
-
```
|
|
90
|
+
**Keep the passphrase in your password manager.** It is the only thing standing between a fresh laptop and your secrets, and the only thing that can't be recovered if lost.
|
|
91
|
+
|
|
92
|
+
Changed a `.env`? Run `devkit secrets push`, or the next machine gets a stale copy.
|
|
90
93
|
|
|
91
94
|
## Bins
|
|
92
95
|
|
package/package.json
CHANGED