diff --git a/docs/cli/update.md b/docs/cli/update.md index 462ca89e243..19dc0b64aeb 100644 --- a/docs/cli/update.md +++ b/docs/cli/update.md @@ -40,9 +40,11 @@ openclaw --update `postUpdate.plugins.integrityDrifts` when npm plugin artifact drift is detected during post-update plugin sync. - `--timeout `: per-step timeout (default is 1800s). -- `--yes`: skip confirmation prompts (for example downgrade confirmation) +- `--yes`: skip confirmation prompts (for example downgrade confirmation). -Note: downgrades require confirmation because older versions can break configuration. + +Downgrades require confirmation because older versions can break configuration. + ## `update status` @@ -91,35 +93,53 @@ build. ## Git checkout flow -Channels: +### Channel selection -- `stable`: checkout the latest non-beta tag, then build + doctor. -- `beta`: prefer the latest `-beta` tag, but fall back to the latest stable tag - when beta is missing or older. -- `dev`: checkout `main`, then fetch + rebase. +- `stable`: checkout the latest non-beta tag, then build and doctor. +- `beta`: prefer the latest `-beta` tag, but fall back to the latest stable tag when beta is missing or older. +- `dev`: checkout `main`, then fetch and rebase. -High-level: +### Update steps -1. Requires a clean worktree (no uncommitted changes). -2. Switches to the selected channel (tag or branch). -3. Fetches upstream (dev only). -4. Dev only: preflight lint + TypeScript build in a temp worktree; if the tip fails, walks back up to 10 commits to find the newest clean build. -5. Rebases onto the selected commit (dev only). -6. Installs deps with the repo package manager. For pnpm checkouts, the updater bootstraps `pnpm` on demand (via `corepack` first, then a temporary `npm install pnpm@10` fallback) instead of running `npm run build` inside a pnpm workspace. -7. Builds + builds the Control UI. -8. Runs `openclaw doctor` as the final “safe update” check. -9. Syncs plugins to the active channel (dev uses bundled plugins; stable/beta uses npm) and updates npm-installed plugins. + + + Requires no uncommitted changes. + + + Switches to the selected channel (tag or branch). + + + Dev only. + + + Runs lint and TypeScript build in a temp worktree. If the tip fails, walks back up to 10 commits to find the newest clean build. + + + Rebases onto the selected commit (dev only). + + + Uses the repo package manager. For pnpm checkouts, the updater bootstraps `pnpm` on demand (via `corepack` first, then a temporary `npm install pnpm@10` fallback) instead of running `npm run build` inside a pnpm workspace. + + + Builds the gateway and the Control UI. + + + `openclaw doctor` runs as the final safe-update check. + + + Syncs plugins to the active channel. Dev uses bundled plugins; stable and beta use npm. Updates npm-installed plugins. + + -If an exact pinned npm plugin update resolves to an artifact whose integrity -differs from the stored install record, `openclaw update` aborts that plugin -artifact update instead of installing it. Reinstall or update the plugin -explicitly only after verifying that you trust the new artifact. + +If an exact pinned npm plugin update resolves to an artifact whose integrity differs from the stored install record, `openclaw update` aborts that plugin artifact update instead of installing it. Reinstall or update the plugin explicitly only after verifying that you trust the new artifact. + -Post-update plugin sync failures fail the update result and stop restart -follow-up work. Fix the plugin install/update error, then rerun -`openclaw update`. + +Post-update plugin sync failures fail the update result and stop restart follow-up work. Fix the plugin install or update error, then rerun `openclaw update`. -If pnpm bootstrap still fails, the updater now stops early with a package-manager-specific error instead of trying `npm run build` inside the checkout. +If pnpm bootstrap still fails, the updater stops early with a package-manager-specific error instead of trying `npm run build` inside the checkout. + ## `--update` shorthand