clone

push a directory of html from the terminal and get a four-character url back. a deno cli on cloudflare

docs: organize CLI commands and notifications

Dami committed ce38783
commit
ce387830a71d5822a78ce00ee1a0622e3962ec7c
parent
a49c27f6f28e540e48d6a3876a999ec801885f84
author
Dami <dami.etoile@gmail.com>
5 files changed, +118 -96
MREADME.md48+++++++++++----------
Mcli/README.md47+++++++++++----------
Mcli/main.ts49+++++++++++-----------
Mskills/nzip/SKILL.md66+++++++++++++++++++-----------
Mskills/nzip/agents/openai.yaml4+-
M README.md +25 -23
@@ -76,25 +76,29 @@ Commands accept any of three target forms:
7676 ## Commands7777 7878 ```text79-nzip auth [--server URL] [--token T] authenticate and save config80-nzip vault add <name> [--slot N] [--description TEXT]81- register a vault (16 slots, 0x0–0xf)82-nzip vault update <name> [--name NEW_NAME] [--description TEXT | --no-description]83- rename or describe a vault84-nzip vault ls | default <name> list vaults / set the default85-nzip push <dir|file> [target] [--ttl …] [--password PW | --no-password]86-nzip cp <target> [dir] [--overwrite] copy the current hosted bundle locally87-nzip site <target> [--ttl …] [--password PW | --no-password]88-nzip ls [vault] list sites89-nzip where <target> print the local dir this machine pushed from90-nzip rm <target> [--yes] delete a site91-nzip status server + vault overview92-nzip notify <body> [--title TEXT] [--open TARGET] [--tag TEXT]93-nzip notify test send a diagnostic notification94-nzip notify approve <code> --name NAME [--yes]95-nzip notify devices list paired notification devices96-nzip notify revoke <device-id> [--yes] revoke a notification device97-nzip revert <target> [--to N] [--list] repoint to a previous push79+nzip80+├─ auth [--server URL] [--token T] authenticate and save config81+├─ vault82+│ ├─ add <name> [--slot N] [--description TEXT]83+│ ├─ update <name> [--name NEW_NAME] [--description TEXT | --no-description]84+│ ├─ ls list vaults85+│ └─ default <name> set the default vault86+├─ push <dir|file> [target] [--ttl …] [--password PW | --no-password]87+├─ cp <target> [dir] [--overwrite] copy a hosted bundle88+├─ site <target> [--ttl …] [--password PW | --no-password]89+├─ ls [vault] list sites90+├─ where <target> print this machine's source directory91+├─ rm <target> [--yes] delete a site92+├─ status show server and vault status93+├─ notify94+│ ├─ <body> [--title TEXT] [--open TARGET] [--tag TEXT]95+│ ├─ test send a diagnostic notification96+│ ├─ approve <code> --name NAME [--yes]97+│ ├─ devices list paired notification devices98+│ └─ revoke <device-id> [--yes] revoke a notification device99+└─ revert <target> [--to N] [--list] inspect or restore push history100+101+aliases: list → ls · download → cp · share → site98102 ```99103 100104 Vault descriptions are returned by `vault ls --json` so agents can choose an
@@ -104,8 +108,7 @@ to `vault update` to clear it.
104108 Password and TTL are committed with the content. On a new site, omitting105109 `--password` creates an unprotected site; on an existing target, omission106110 preserves its current password. Pass `--no-password` to clear protection107-explicitly. The former `nzip share` command remains available as a compatibility108-alias for `nzip site`.111+explicitly.109112 110113 Pushing a single `page.html` stores it as the site's `index.html`. Directory111114 pushes skip dotfiles and `node_modules`, and honor a `.nzipignore` (one glob per
@@ -117,8 +120,7 @@ authenticated server when the original local directory is unavailable. It
117120 refuses non-empty destinations unless `--overwrite` is passed, and verifies118121 every downloaded file against the hosted manifest. It can only restore uploaded119122 files—not dotfiles, `.nzipignore`, or other local project metadata excluded from120-a push. The former `nzip download` command remains available as a compatibility121-alias.123+a push.122124 123125 ### Owner notifications124126
M cli/README.md +25 -22
@@ -37,25 +37,29 @@ and site is already there.
3737 ## Commands3838 3939 ```text40-nzip auth [--server URL] [--token T] authenticate and save config41-nzip vault add <name> [--slot N] [--description TEXT]42- register a vault (16 slots, 0x0–0xf)43-nzip vault update <name> [--name NEW_NAME] [--description TEXT | --no-description]44- rename or describe a vault45-nzip vault ls | default <name> list vaults / set the default46-nzip push <dir|file> [target] [--ttl …] [--password PW | --no-password]47-nzip cp <target> [dir] [--overwrite]48-nzip site <target> [--ttl …] [--password PW | --no-password]49-nzip ls [vault] list sites50-nzip where <target> print the local dir this machine pushed from51-nzip rm <target> [--yes] delete a site52-nzip status server + vault overview53-nzip notify <body> [--title TEXT] [--open TARGET] [--tag TEXT]54-nzip notify test send a diagnostic notification55-nzip notify approve <code> --name NAME [--yes]56-nzip notify devices list paired notification devices57-nzip notify revoke <device-id> [--yes] revoke a notification device58-nzip revert <target> [--to N] [--list] repoint to a previous push40+nzip41+├─ auth [--server URL] [--token T] authenticate and save config42+├─ vault43+│ ├─ add <name> [--slot N] [--description TEXT]44+│ ├─ update <name> [--name NEW_NAME] [--description TEXT | --no-description]45+│ ├─ ls list vaults46+│ └─ default <name> set the default vault47+├─ push <dir|file> [target] [--ttl …] [--password PW | --no-password]48+├─ cp <target> [dir] [--overwrite] copy a hosted bundle49+├─ site <target> [--ttl …] [--password PW | --no-password]50+├─ ls [vault] list sites51+├─ where <target> print this machine's source directory52+├─ rm <target> [--yes] delete a site53+├─ status show server and vault status54+├─ notify55+│ ├─ <body> [--title TEXT] [--open TARGET] [--tag TEXT]56+│ ├─ test send a diagnostic notification57+│ ├─ approve <code> --name NAME [--yes]58+│ ├─ devices list paired notification devices59+│ └─ revoke <device-id> [--yes] revoke a notification device60+└─ revert <target> [--to N] [--list] inspect or restore push history61+62+aliases: list → ls · download → cp · share → site5963 ```6064 6165 Vault descriptions are included in `vault ls --json`. Use
@@ -63,13 +67,12 @@ Vault descriptions are included in `vault ls --json`. Use
6367 6468 Password and TTL are committed with the content. On a new site, omitting `--password` creates an6569 unprotected site; on an existing target, omission preserves its current password. Pass66-`--no-password` to clear protection explicitly. The former `nzip share` command remains available as67-a compatibility alias for `nzip site`.70+`--no-password` to clear protection explicitly.6871 6972 `nzip cp work:demo ./recovered-demo` reconstructs the current hosted bundle into an empty directory.7073 It uses the configured bearer token, verifies file hashes, and never exposes source via the public7174 page URL. Only uploaded files can be restored; ignored dotfiles and local metadata were never72-stored. The former `nzip download` command remains available as a compatibility alias.75+stored.7376 7477 ## Notifications7578
M cli/main.ts +24 -25
@@ -30,31 +30,30 @@ import { fail, setJsonMode } from "./lib/fmt.ts";
3030 3131 const HELP = `nzip — html share tool3232 33-usage:34- nzip auth [--server URL] [--token T] authenticate against the server35- nzip vault add <name> [--slot N] [--description TEXT]36- register a vault (16 slots, 0x0-0xf)37- nzip vault update <name> [--name NEW_NAME] [--description TEXT | --no-description]38- rename or describe a vault39- nzip vault ls list vaults40- nzip vault default <name> set default vault41- nzip push <dir|file> [target] [--ttl ...] [--password PW | --no-password]42- nzip cp <target> [dir] [--overwrite] copy a hosted bundle locally43- nzip site <target> [--ttl ...] [--password PW | --no-password]44- inspect or update ttl/password45- nzip share <target> [...] deprecated alias for nzip site46- nzip ls [vault] list sites47- nzip list [vault] alias for nzip ls48- nzip where <target> print the local dir this machine pushed from49- nzip rm <target> [--yes] delete a site50- nzip status server + vault overview51- nzip notify <body> [--title TEXT] [--open TARGET] [--tag TEXT]52- queue a notification for active devices53- nzip notify test queue a diagnostic notification54- nzip notify approve <code> --name NAME [--yes]55- nzip notify devices list notification devices56- nzip notify revoke <device-id> [--yes] revoke a notification device57- nzip revert <target> [--to N] [--list] repoint to a previous push33+commands:34+ nzip35+ ├─ auth [--server URL] [--token T] authenticate against the server36+ ├─ vault37+ │ ├─ add <name> [--slot N] [--description TEXT]38+ │ ├─ update <name> [--name NEW_NAME] [--description TEXT | --no-description]39+ │ ├─ ls list vaults40+ │ └─ default <name> set the default vault41+ ├─ push <dir|file> [target] [--ttl ...] [--password PW | --no-password]42+ ├─ cp <target> [dir] [--overwrite] copy a hosted bundle43+ ├─ site <target> [--ttl ...] [--password PW | --no-password]44+ ├─ ls [vault] list sites45+ ├─ where <target> print this machine's source directory46+ ├─ rm <target> [--yes] delete a site47+ ├─ status show server and vault status48+ ├─ notify49+ │ ├─ <body> [--title TEXT] [--open TARGET] [--tag TEXT]50+ │ ├─ test queue a diagnostic notification51+ │ ├─ approve <code> --name NAME [--yes]52+ │ ├─ devices list notification devices53+ │ └─ revoke <device-id> [--yes] revoke a notification device54+ └─ revert <target> [--to N] [--list] inspect or restore push history55+56+aliases: list → ls · download → cp · share → site5857 5958 targets: 2a3f | work:demo | demo (alias in default vault)6059
M skills/nzip/SKILL.md +42 -24
@@ -1,6 +1,6 @@
11 ---22 name: nzip3-description: Set up, diagnose, and use the nzip HTML sharing CLI with repository-local working directories and safe publishing defaults. Use when installing or authenticating nzip, troubleshooting nzip access, publishing a plan, design, report, prototype, or other HTML artifact, managing an existing nzip site, or establishing nzip conventions in a repository.3+description: Set up, diagnose, and use the nzip HTML sharing CLI with repository-local working directories and safe publishing defaults. Use when installing or authenticating nzip, troubleshooting nzip access, publishing or managing an HTML artifact, pairing notification devices, sending or managing owner notifications, or establishing nzip conventions in a repository.44 ---55 66 # nzip
@@ -85,29 +85,31 @@ permissions when a sandbox blocks a check instead of reporting nzip as broken.
8585 8686 Prefer `--json` when consuming command output programmatically.8787 88-- Inspect readiness: `nzip status --json`89-- List destinations: `nzip vault ls --json`90-- Register a vault: `nzip vault add <name> [--slot N] [--description TEXT]`91-- Rename or describe a vault:92- `nzip vault update <name> [--name NEW_NAME] [--description TEXT | --no-description]`93-- Set the default vault: `nzip vault default <name>`94-- List sites: `nzip ls [vault] --json`95-- Inspect a site: `nzip site <target> --json`96-- Publish or update: `nzip push <dir|file> [target] --ttl <days>`97-- Find its local source: `nzip where <target> --json`98-- Recover hosted source: `nzip cp <target> [dir]`99-- Change retention: `nzip site <target> --ttl <days>`100-- Set or remove a password: `nzip site <target> --password <pw>` / `--no-password`101-- Review history: `nzip revert <target> --list --json`102-- Restore history: `nzip revert <target> --to <push-number>`103-- Delete only on explicit request: `nzip rm <target> --yes`104-- List notification devices: `nzip notify devices --json`105-- Approve a user-supplied pairing code:106- `nzip notify approve <code> --name <name> [--yes]`107-- Send only on explicit request:108- `nzip notify <body> [--title TEXT] [--open TARGET] [--tag TEXT]`109-- Exercise the ordinary delivery path: `nzip notify test`110-- Revoke only on explicit request: `nzip notify revoke <device-id> --yes`88+```text89+nzip90+├─ auth [--server URL] [--token T]91+├─ vault92+│ ├─ add <name> [--slot N] [--description TEXT]93+│ ├─ update <name> [--name NEW_NAME] [--description TEXT | --no-description]94+│ ├─ ls95+│ └─ default <name>96+├─ push <dir|file> [target] [--ttl DAYS] [--password PW | --no-password]97+├─ cp <target> [dir] [--overwrite]98+├─ site <target> [--ttl DAYS] [--password PW | --no-password]99+├─ ls [vault]100+├─ where <target>101+├─ rm <target> [--yes]102+├─ status103+├─ notify104+│ ├─ <body> [--title TEXT] [--open TARGET] [--tag TEXT]105+│ ├─ test106+│ ├─ approve <code> --name NAME [--yes]107+│ ├─ devices108+│ └─ revoke <device-id> [--yes]109+└─ revert <target> [--to N] [--list]110+111+aliases: list → ls · download → cp · share → site112+```111113 112114 Use password protection when the content or user requires it; `nzip push` accepts the same113115 `--password <pw> | --no-password` flags to set it at publish time. Vault descriptions appear in
@@ -125,6 +127,22 @@ the CLI resolves an existing nzip site, applies vault guardrails, and sends only
125127 a same-origin path. A pairing code is short-lived but is not sufficient on its126128 own; approval still uses the configured owner bearer token.127129 130+## Pair notifications131+132+1. Open the deployment root on the phone and tap `pair`.133+2. Ask the user for the displayed code and device name, then run134+ `nzip notify approve <code> --name <name>`. Show the approval preview and preserve the135+ interactive confirmation unless the user explicitly requested `--yes`.136+3. Wait for the browser to show `paired` before installing the PWA.137+4. Open the installed app, tap `notifications off`, and accept the system permission request.138+5. Run `nzip notify test` only when the user explicitly requests an end-to-end test.139+6. Send only on explicit request with140+ `nzip notify <body> [--title TEXT] [--open TARGET] [--tag TEXT]`.141+7. Inspect delivery health with `nzip notify devices --json`.142+143+If the installed app loses its pairing cookie, instruct the user to remove it, pair again in the144+browser, wait for `paired`, and reinstall it. Revoke a device only on explicit request.145+128146 ## Sane defaults129147 130148 - Keep generated HTML in `.nzip-<purpose>/`, not a system temp directory or a tracked source
M skills/nzip/agents/openai.yaml +2 -2