home-hosted 0.9.4 → 0.9.6

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/AGENTS.md CHANGED
@@ -54,10 +54,11 @@ Where knowledge lives, and when to reach for each:
54
54
  (`Ignored build scripts: …`). Keep the file's own comments explaining why each entry is there.
55
55
 
56
56
  ```sh
57
- pnpm run up|down|restart|status # detached; `down` asks /_hh/shutdown and signals only a pid whose
58
- # identity it confirmed; `restart <id>` restarts one server, panel up
57
+ pnpm run cli <command> # any command, against state in .dev-state/ — never ~/.home-hosted
58
+ pnpm run cli backup list # e.g. `pnpm run cli <anything the CLI takes>`
59
+ pnpm run up|down|restart|status # shorthand for the four most-used; detached, and `down` asks
60
+ # /_hh/shutdown and signals only a pid whose identity it confirmed
59
61
  pnpm run start # up --foreground (systemd, docker, a foreground shell)
60
- pnpm exec tsx src/cli.ts logs # the panel's own console output (--lines, --follow, --json)
61
62
  pnpm dev # tsx-watch panel :6000 + the stock UI's Vite :6001, state in .dev-state/
62
63
  pnpm dev --ui noc-console # the same, for another UI; --port/--ui-port override
63
64
  pnpm dev --home /tmp/hh-dev # state elsewhere; HHOSTED_HOME is IGNORED here, and the real
@@ -71,9 +72,9 @@ pnpm exec vitest run # `pnpm test` is vitest in watch mode
71
72
  pnpm run check # ← THE GATE: quickcheck + vitest run --coverage. Run before every
72
73
  # push — CI's `test.yml` is `pnpm test --coverage`, so an area floor
73
74
  # failing there fails the push while `quickcheck` stays green.
74
- pnpm run set-password # non-interactive through HHOSTED_PASSWORD
75
- pnpm run set-token # --generate prints a new API token once
76
- pnpm run migrate # bring the config up to this release's schema
75
+ pnpm run cli set-password # non-interactive through HHOSTED_PASSWORD
76
+ pnpm run cli set-token --generate # print a new API token once
77
+ pnpm run cli migrate # bring the config up to this release's schema
77
78
  pnpm exec tsx src/cli.ts init # scaffold a project (interactive; --yes for defaults)
78
79
  pnpm run media # regenerate docs/media; needs `pnpm exec playwright install chromium`
79
80
  # once (browser only; `gif` alone does not)
package/README.md CHANGED
@@ -84,7 +84,8 @@ environment you give it. A preset can fill that in for you, and you can change e
84
84
 
85
85
  <sub>Manage them from the panel, `home-hosted start|stop <id>` from a shell, `home-hosted status --json`,
86
86
  or `GET /api/state`; `GET /healthz` is the same status line for your own monitor, no session needed —
87
- `503` when a server has crashed or a running one is failing its health check.</sub>
87
+ `503` when a server has crashed, when the panel stopped one because it could not serve, or while
88
+ a running one is failing its health check.</sub>
88
89
 
89
90
  ---
90
91
 
@@ -167,6 +168,10 @@ Worked example, with per-server data inside the project:
167
168
 
168
169
  <sub>Call them as `pnpm run up` — `pnpm up` is pnpm's own update, not your script.</sub>
169
170
 
171
+ <sub>Working **on** this repo? Its own scripts keep state in `.dev-state/`, so trying a change cannot
172
+ touch an installed panel: `pnpm run up|down|status|restart` are shorthand, and `pnpm run cli <command>`
173
+ runs anything else the CLI takes — `pnpm run cli backup list`.</sub>
174
+
170
175
  > [!TIP]
171
176
  > Recommended to give a project its own panel port (`control.port`, e.g. `4399`), to avoid port conflict
172
177
  > with other projects.
@@ -355,6 +360,7 @@ restarts itself), and how hand-edits are validated: [SERVERS.md](./docs/SERVERS.
355
360
  | `home-hosted stop <id>` | stop one server, nothing else (`--workspace <id>`) |
356
361
  | `home-hosted restart <id>` | restart one server, nothing else (`--workspace <id>`) — the same as the panel's per-server Restart |
357
362
  | `home-hosted logs` | read the panel's own console output — the file `up` redirects it into (`--lines`, `--follow`, `--json`) |
363
+ | `home-hosted backup` | list, create or restore an archive without a browser, **and without the panel running** (`create --all --confirm`, `restore <name> --all --confirm`, `--password`, `--include`) — see [RESTORE_DEMO.md](./docs/RESTORE_DEMO.md) |
358
364
  | `home-hosted set-password` | set the panel password without opening a browser; a running panel picks it up at once and signs every existing session out |
359
365
  | `home-hosted set-token` | set the API token scripts and agents use (`--generate`, `--clear`) |
360
366
  | `home-hosted migrate` | bring every config up to the schema this release understands (`--dry-run`, `--yes`) |
@@ -374,6 +380,7 @@ up -c/--config -p/--port --host --open --no-autostart --foregroun
374
380
  down (no flags)
375
381
  status --json
376
382
  logs --lines <n> --follow --json
383
+ backup [list|create|restore] [<name>] (--include <ids> | --all) --password --confirm --json
377
384
  start, stop <id> [-w/--workspace <id>] (both need the panel up)
378
385
  restart [<id>] [-w/--workspace <id>] (no id: the panel; with one: that server)
379
386
  init --dir --name --pm --no-install -y/--yes