@muthuishere/vsync 0.5.0 → 0.5.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 +29 -31
- package/bin/vsync.ts +0 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# vsync
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**One encrypted vault for your environment secrets, shared across your team, mirrored to GitHub & GCP, audited every time someone touches it.**
|
|
4
4
|
|
|
5
|
-

|
|
5
|
+

|
|
6
6
|
|
|
7
7
|
A `.env` file is the friendliest thing in your repo: one line per secret, edited by hand, loaded by every framework. It's also the worst thing in your repo — passed around on Slack, copy-pasted into the wrong window, never the same on any two laptops, **never encrypted, never versioned, never auditable**. The moment one teammate's secrets drift from another's, you stop trusting `.env` and start emailing JSON files.
|
|
8
8
|
|
|
@@ -16,10 +16,11 @@ vsync keeps the `.env` you already write, and turns it into a real vault:
|
|
|
16
16
|
- **Per-machine key in the OS keychain.** `Bun.secrets` — macOS Keychain, Linux libsecret, Windows Credential Manager. The S3 bucket alone is useless; the key alone is useless. Both halves required to decrypt.
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
bun install -g @muthuishere/vsync # or: npm install -g @muthuishere/vsync
|
|
20
|
+
vsync --help
|
|
20
21
|
```
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
One global install, then `vsync` is on PATH. No shell-rc edits, no giant base64 blob in `~/.zshrc`. (Allergic to global installs? `bunx @muthuishere/vsync <subcommand>` works too — same code path, slower invocation.)
|
|
23
24
|
|
|
24
25
|
---
|
|
25
26
|
|
|
@@ -103,13 +104,16 @@ A `.share` file bundles **both halves** under one passphrase. Sent on a differen
|
|
|
103
104
|
|
|
104
105
|
## Install
|
|
105
106
|
|
|
106
|
-
You don't. Run via `bunx`:
|
|
107
|
-
|
|
108
107
|
```bash
|
|
109
|
-
|
|
108
|
+
bun install -g @muthuishere/vsync # or: npm install -g @muthuishere/vsync
|
|
109
|
+
vsync --help
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
Requires Bun ≥ 1.2.21 (for `Bun.secrets`).
|
|
112
|
+
Requires Bun ≥ 1.2.21 on PATH (for `Bun.secrets`) — the shebang is `#!/usr/bin/env bun`, so `bun` must be installed even if you used `npm install -g` for the package itself. Most users have Bun anyway; if not, see [bun.sh](https://bun.sh).
|
|
113
|
+
|
|
114
|
+
Don't want to install? `bunx @muthuishere/vsync <subcommand>` runs the same code from npm cache each time — fine for trying it out, slower for daily use.
|
|
115
|
+
|
|
116
|
+
For local development of vsync itself:
|
|
113
117
|
|
|
114
118
|
```bash
|
|
115
119
|
git clone git@github.com:muthuishere/vsync.git
|
|
@@ -125,14 +129,14 @@ bun test
|
|
|
125
129
|
```bash
|
|
126
130
|
# 1. Generate the per-(repo, env) key + config. First-ever invocation prompts
|
|
127
131
|
# for S3 creds; subsequent inits pre-fill from ~/.config/vsync/defaults.
|
|
128
|
-
|
|
132
|
+
vsync init dev
|
|
129
133
|
|
|
130
134
|
# 2. Put your secrets under infra/vault/dev/ and push.
|
|
131
135
|
echo "DATABASE_URL=postgres://..." > infra/vault/dev/.env.dev
|
|
132
|
-
|
|
136
|
+
vsync push dev
|
|
133
137
|
|
|
134
138
|
# 3. Hand the team a share file + passphrase (different channels).
|
|
135
|
-
|
|
139
|
+
vsync export dev
|
|
136
140
|
```
|
|
137
141
|
|
|
138
142
|
For an onboarding cheat sheet to drop into your repo (so teammates and AI agents know vsync exists), run `vsync docs > infra/AGENTS.md`. Plain stdout — pipe it wherever you want.
|
|
@@ -144,11 +148,11 @@ cd <cloned-repo>
|
|
|
144
148
|
|
|
145
149
|
# 1. Import the share file your teammate sent (carries S3 creds + key).
|
|
146
150
|
# No prior `init` required on this machine.
|
|
147
|
-
|
|
151
|
+
vsync import dev ./reqsume-dev.share
|
|
148
152
|
# Passphrase: <paste>
|
|
149
153
|
|
|
150
154
|
# 2. Pull the encrypted bundle.
|
|
151
|
-
|
|
155
|
+
vsync pull dev
|
|
152
156
|
```
|
|
153
157
|
|
|
154
158
|
After step 2, `infra/vault/dev/` is populated and the encryption key is in your keychain.
|
|
@@ -157,18 +161,18 @@ After step 2, `infra/vault/dev/` is populated and the encryption key is in your
|
|
|
157
161
|
|
|
158
162
|
```bash
|
|
159
163
|
# I edited infra/vault/dev/.env.dev locally:
|
|
160
|
-
|
|
164
|
+
vsync push dev
|
|
161
165
|
|
|
162
166
|
# Get the latest from S3:
|
|
163
|
-
|
|
167
|
+
vsync pull dev
|
|
164
168
|
|
|
165
169
|
# See what versions exist on S3:
|
|
166
|
-
|
|
170
|
+
vsync versions dev
|
|
167
171
|
|
|
168
172
|
# Push secrets out to GitHub / GCP:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
vsync sync dev gh
|
|
174
|
+
vsync sync dev gcp
|
|
175
|
+
vsync sync dev all
|
|
172
176
|
```
|
|
173
177
|
|
|
174
178
|
`pull` makes a local backup at `~/.config/vsync/backups/<env>-<ts>.zip.enc` before overwriting (two-deep rolling buffer). See "Recovering a local backup" below if you ever need one.
|
|
@@ -299,19 +303,13 @@ In practice, just don't lose the keychain entry. `pull` itself is the recovery p
|
|
|
299
303
|
|
|
300
304
|
## Versioning
|
|
301
305
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
0.
|
|
305
|
-
|
|
306
|
-
0.3.
|
|
307
|
-
|
|
308
|
-
```bash
|
|
309
|
-
vsync init dev # auto-relocates root .env.dev if it exists
|
|
310
|
-
vsync push dev
|
|
311
|
-
vsync export dev # re-share with team
|
|
312
|
-
```
|
|
306
|
+
| Release | What's in it |
|
|
307
|
+
|---|---|
|
|
308
|
+
| **0.5.0** | `vsync use <env>` — symlinks `./.env` (or `--link=<path>`) at the vault's env file so `dotenv.config()` just works; switch envs with one command. README rewrite + flow diagram. |
|
|
309
|
+
| 0.4.0 | Append-only audit log at `s3://<bucket>/<repo>/<env>/audit.csv` + `vsync audit` viewer. Expandable `meta` JSON cell via `--note` / `--meta` + matching env vars. |
|
|
310
|
+
| 0.3.0 | Opinionated layout: vault folder at `infra/vault/<env>/` with `--vault-folder` override; self-contained per-(repo, env) config; `vsync sync` for GitHub / GCP fanout. |
|
|
313
311
|
|
|
314
|
-
|
|
312
|
+
All 0.x releases are wire-compatible with each other on the S3 bundle envelope (`RQE1`) and manifest seal (`RQEM0001`). New clients tolerate the absence of features added in later versions; old clients ignore new objects (like `audit.csv`) on the bucket.
|
|
315
313
|
|
|
316
314
|
---
|
|
317
315
|
|
package/bin/vsync.ts
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muthuishere/vsync",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Encrypted secret-sync CLI for small teams. Self-contained per-(repo, env) config + OS keychain key + AES-GCM-on-S3 + share-file onboarding + fanout to GitHub/GCP. Bun-native, run via bunx.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"test": "bun test"
|
|
15
|
+
"test": "bun test",
|
|
16
|
+
"docs:dev": "vitepress dev docs",
|
|
17
|
+
"docs:build": "vitepress build docs",
|
|
18
|
+
"docs:preview": "vitepress preview docs"
|
|
16
19
|
},
|
|
17
20
|
"keywords": [
|
|
18
21
|
"secrets",
|
|
@@ -41,6 +44,7 @@
|
|
|
41
44
|
},
|
|
42
45
|
"license": "MIT",
|
|
43
46
|
"devDependencies": {
|
|
44
|
-
"@types/bun": "latest"
|
|
47
|
+
"@types/bun": "latest",
|
|
48
|
+
"vitepress": "^1.6.4"
|
|
45
49
|
}
|
|
46
50
|
}
|