docs: document clawdbot update

This commit is contained in:
Peter Steinberger
2026-01-10 20:32:19 +01:00
parent 4c4c167416
commit 2f050b197e
4 changed files with 74 additions and 1 deletions

View File

@@ -42,10 +42,25 @@ Notes:
- If your Gateway runs as a service, `clawdbot daemon restart` is preferred over killing PIDs.
- If youre pinned to a specific version, see “Rollback / pinning” below.
## Update (`clawdbot update`)
For **source installs** (git checkout), prefer:
```bash
clawdbot update --restart
```
It runs a safe-ish update flow:
- Requires a clean worktree.
- Fetches + rebases against the configured upstream.
- Installs deps, builds, builds the Control UI, and runs `clawdbot doctor`.
If you installed via **npm/pnpm** (no git metadata), `clawdbot update` will skip. Use “Update (npm install)” instead.
## Update (Control UI / RPC)
The Control UI has **Update & Restart** (RPC: `update.run`). It:
1) Runs a git update (clean rebase) or package manager update.
1) Runs the same source-update flow as `clawdbot update` (git checkout only).
2) Writes a restart sentinel with a structured report (stdout/stderr tail).
3) Restarts the gateway and pings the last active session with the report.
@@ -55,6 +70,14 @@ If the rebase fails, the gateway aborts and restarts without applying the update
From the repo checkout:
Preferred:
```bash
clawdbot update
```
Manual (equivalent-ish):
```bash
git pull
pnpm install