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

@@ -8,6 +8,7 @@
- Onboarding/Models: add catalog-backed default model picker to onboarding + configure. (#611) — thanks @jonasjancarik. - Onboarding/Models: add catalog-backed default model picker to onboarding + configure. (#611) — thanks @jonasjancarik.
- Agents/OpenCode Zen: update fallback models + defaults, keep legacy alias mappings. (#669) — thanks @magimetal. - Agents/OpenCode Zen: update fallback models + defaults, keep legacy alias mappings. (#669) — thanks @magimetal.
- Providers: unify group history context wrappers across providers with per-provider/per-account `historyLimit` overrides (fallback to `messages.groupChat.historyLimit`). Set `0` to disable. (#672) — thanks @steipete. - Providers: unify group history context wrappers across providers with per-provider/per-account `historyLimit` overrides (fallback to `messages.groupChat.historyLimit`). Set `0` to disable. (#672) — thanks @steipete.
- CLI: add `clawdbot update` (safe-ish git checkout update) + `--update` shorthand. (#673) — thanks @fm1randa.
### Fixes ### Fixes
- Auto-reply: prefer `RawBody` for command/directive parsing (WhatsApp + Discord) and prevent fallback runs from clobbering concurrent session updates. (#643) — thanks @mcinteerj. - Auto-reply: prefer `RawBody` for command/directive parsing (WhatsApp + Discord) and prevent fallback runs from clobbering concurrent session updates. (#643) — thanks @mcinteerj.

View File

@@ -14,6 +14,7 @@ This page describes the current CLI behavior. If commands change, update this do
- `--dev`: isolate state under `~/.clawdbot-dev` and shift default ports. - `--dev`: isolate state under `~/.clawdbot-dev` and shift default ports.
- `--profile <name>`: isolate state under `~/.clawdbot-<name>`. - `--profile <name>`: isolate state under `~/.clawdbot-<name>`.
- `--no-color`: disable ANSI colors. - `--no-color`: disable ANSI colors.
- `--update`: shorthand for `clawdbot update` (source installs only).
- `-V`, `--version`, `-v`: print version and exit. - `-V`, `--version`, `-v`: print version and exit.
## Output styling ## Output styling
@@ -47,6 +48,7 @@ clawdbot [--dev] [--profile <name>] <command>
onboard onboard
configure (alias: config) configure (alias: config)
doctor doctor
update
providers providers
list list
status status

47
docs/cli/update.md Normal file
View File

@@ -0,0 +1,47 @@
---
summary: "CLI reference for `clawdbot update` (safe-ish source update + optional daemon restart)"
read_when:
- You want to update a source checkout safely
- You need to understand `--update` shorthand behavior
---
# `clawdbot update`
Safely update a **source checkout** (git install) of Clawdbot.
If you installed via **npm/pnpm** (global install, no git metadata), use the package manager flow in [Updating](/install/updating).
## Usage
```bash
clawdbot update
clawdbot update --restart
clawdbot update --json
clawdbot --update
```
## Options
- `--restart`: restart the Gateway daemon after a successful update.
- `--json`: print machine-readable `UpdateRunResult` JSON.
- `--timeout <seconds>`: per-step timeout (default is 1200s).
## What it does (git checkout)
High-level:
1. Requires a clean worktree (no uncommitted changes).
2. Fetches and rebases against `@{upstream}`.
3. Installs deps (pnpm/bun/npm depending on the checkout).
4. Builds + builds the Control UI.
5. Runs `clawdbot doctor` as the final “safe update” check.
## `--update` shorthand
`clawdbot --update` rewrites to `clawdbot update` (useful for shells and launcher scripts).
## See also
- [Updating](/install/updating)
- [CLI reference](/cli)

View File

@@ -42,10 +42,25 @@ Notes:
- If your Gateway runs as a service, `clawdbot daemon restart` is preferred over killing PIDs. - 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. - 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) ## Update (Control UI / RPC)
The Control UI has **Update & Restart** (RPC: `update.run`). It: 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). 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. 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: From the repo checkout:
Preferred:
```bash
clawdbot update
```
Manual (equivalent-ish):
```bash ```bash
git pull git pull
pnpm install pnpm install