- commit
- ef43ade433bda5e57faa07a20a03209d840296e1
- parent
- e5f5a02a59fb0dd79248e249b16cea933a1a997d
- author
- Dami <dami.etoile@gmail.com>
| M | README.md | 30 | +++++++++++++++++++++--------- |
@@ -7,6 +7,8 @@
77 _A personal share tool — Deno CLI → Cloudflare Worker → R2 + D1. No daemon, no build step, no88 redeploys._99 10+[](https://jsr.io/@nzip/cli)11+1012 </div>1113 1214 ```console@@ -113,15 +115,12 @@ revalidation and a 60-second cache. Metadata lives in three tables:
113115 references it _and_ it's older than 24 hours — so an in-flight push can never lose objects to a114116 concurrent sweep.115117 116-The full design doc is a pushable page of its own: [`docs/plan.html`](docs/plan.html).117-118118 ## Repo layout119119 120120 ```text121121 shared/ manifest canonicalization, hashing, addressing — imported by both sides122-cli/ the nzip command (Deno, no framework)122+cli/ the nzip command (Deno, no framework) — published as jsr:@nzip/cli123123 worker/ Cloudflare Worker: serving + API + GC cron (wrangler)124-docs/ the architecture plan as a self-contained HTML page125124 ```126125 127126 `shared/` is the contract: canonical JSON serialization lives in exactly one file@@ -130,16 +129,29 @@ manifest hash. It sticks to Web-standard APIs only, so the same code runs under
130129 131130 ## Install132131 132+The CLI ships on [JSR](https://jsr.io/@nzip/cli). With [Deno](https://docs.deno.com/runtime/) on133+your `PATH`, install it in one line — then point it at your server and push:134+133135 ```sh134-deno install -g -f -n nzip \135- --allow-net --allow-read --allow-write --allow-env \136- cli/main.ts136+deno install -g -A -f -n nzip jsr:@nzip/cli # 1. install the `nzip` command137137 138-nzip auth --server https://share.example.com --token <owner-token>138+nzip auth --server https://share.example.com # 2. authenticate (prompts for the token)139+140+nzip push ./site work:demo # 3. get a URL back139141 ```140142 143+`nzip auth` prompts for anything you omit and saves it to `~/.config/nzip/config.json` (mode 0600),144+so every later command just works. Upgrade any time by re-running the install line; try it without145+installing via `deno run -A jsr:@nzip/cli --help`.146+147+Adding a **second machine**? Only the CLI is per-machine — the Worker, R2, D1, vaults, and token are148+already provisioned. Install from JSR and run `nzip auth` with the same server and token; every vault149+and site is instantly there. (The `nzip where` breadcrumb registry is local, so it only knows sites150+pushed from this machine.)151+141152 `nzip` is self-hosted. The server URL is supplied by the operator; there is no bundled public142-service. Use the same URL you set as `vars.PUBLIC_BASE` in your Wrangler config.153+service — use the same URL you set as `vars.PUBLIC_BASE` in your Wrangler config. Standing up that154+server is the one-time setup below.143155 144156 <details>145157 <summary><b>Self-hosting: one-time Cloudflare setup</b></summary>