@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.
Files changed (3) hide show
  1. package/README.md +29 -31
  2. package/bin/vsync.ts +0 -0
  3. package/package.json +7 -3
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # vsync
2
2
 
3
- **Your `.env` files kept as simple, made as safe as a vault.**
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
- ![vsync flow](docs/vsync-flow.png)
5
+ ![vsync flow](https://raw.githubusercontent.com/muthuishere/vsync/main/docs/public/vsync-flow.png)
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
- bunx @muthuishere/vsync --help
19
+ bun install -g @muthuishere/vsync # or: npm install -g @muthuishere/vsync
20
+ vsync --help
20
21
  ```
21
22
 
22
- Run via `bunx`. No install, no shell-rc edits, no giant base64 blob in `~/.zshrc`.
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
- bunx @muthuishere/vsync <subcommand>
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`). For local development of vsync itself:
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
- bunx @muthuishere/vsync init dev
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
- bunx @muthuishere/vsync push dev
136
+ vsync push dev
133
137
 
134
138
  # 3. Hand the team a share file + passphrase (different channels).
135
- bunx @muthuishere/vsync export dev
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
- bunx @muthuishere/vsync import dev ./reqsume-dev.share
151
+ vsync import dev ./reqsume-dev.share
148
152
  # Passphrase: <paste>
149
153
 
150
154
  # 2. Pull the encrypted bundle.
151
- bunx @muthuishere/vsync pull dev
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
- bunx @muthuishere/vsync push dev
164
+ vsync push dev
161
165
 
162
166
  # Get the latest from S3:
163
- bunx @muthuishere/vsync pull dev
167
+ vsync pull dev
164
168
 
165
169
  # See what versions exist on S3:
166
- bunx @muthuishere/vsync versions dev
170
+ vsync versions dev
167
171
 
168
172
  # Push secrets out to GitHub / GCP:
169
- bunx @muthuishere/vsync sync dev gh
170
- bunx @muthuishere/vsync sync dev gcp
171
- bunx @muthuishere/vsync sync dev all
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
- This is **0.4.0** adds an append-only audit log at `s3://<bucket>/<repo>/<env>/audit.csv` and the `vsync audit` viewer. Fully additive over 0.3.x: no wire-format break, no config migration. Old clients ignore `audit.csv`; new clients tolerate its absence.
303
-
304
- 0.3.0 was the rebrand from `@muthuishere/secret-lib` 0.2.x new package name, new bin (`vsync`), new keychain service (`tools.vsync`), new config root (`~/.config/vsync/`), new vault layout (`infra/vault/<env>/.env.<env>`). The crypto envelope (`RQE1`) is unchanged.
305
-
306
- 0.3.x and later do not auto-migrate from 0.2.x. The supported upgrade path is to re-`init` from scratch:
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
- Any leftover 0.2.x on-disk config tree and keychain entries can be deleted; nothing in 0.3.x reads them. `@muthuishere/secret-lib` 0.2.x stays on npm for users who can't migrate.
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.0",
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
  }