Skip to content

發布通道

OpenClaw 提供三個更新通道:

  • stable(穩定版):npm dist-tag latest。推薦給大多數使用者。
  • beta(測試版):當其為最新版本時為 npm dist-tag beta;如果 beta 缺失或比 最新的穩定版舊,更新流程將會回退到 latest
  • dev(開發版):main (git) 的移動指標。npm dist-tag:dev(發佈時)。 main 分支用於實驗和主動開發。它可能包含 未完成的功能或破壞性變更。請勿將其用於生產環境閘道。

我們通常先將穩定版本發佈到 beta,在那裡進行測試,然後執行 顯式的提升步驟,將審核過的版本移至 latest 而 不更改版本號碼。維護者也可以在需要時將穩定版本 直接發佈到 latest。Dist-tags 是 npm 安裝的事實來源。

Terminal window
openclaw update --channel stable
openclaw update --channel beta
openclaw update --channel dev

--channel 會將您的選擇保存在配置中 (update.channel) 並對齊 安裝方法:

  • stable(套件安裝):透過 npm dist-tag latest 更新。
  • beta(套件安裝):優先使用 npm dist-tag beta,但當 beta 缺失或比目前的穩定版標籤舊時,會回退到 latest
  • stable (git 安裝):簽出最新的穩定 git 標籤,排除 semver 預發行標籤,例如 -alpha.N-beta.N-rc.N-dev.N-next.N-preview.N-canary.N-nightly.N 以及其他預發行 後綴。
  • beta (git 安裝):優先使用最新的 beta git 標籤,但在 beta 缺失或較舊時回退到 最新的穩定 git 標籤。
  • dev:確保進行 git 簽出(預設為 ~/openclaw,或者 當設定了 OPENCLAW_HOME 時為 $OPENCLAW_HOME/openclaw;可使用 OPENCLAW_GIT_DIR 覆蓋),切換到 main,在 upstream 上進行 rebase,建構,並 從該簽出安裝全域 CLI。

使用 --tag 針對單次更新指定特定的 dist-tag、版本或 package 規格, 而不變更您持續使用的頻道:

Terminal window
# Install a specific version
openclaw update --tag 2026.4.1-beta.1
# Install from the beta dist-tag (one-off, does not persist)
openclaw update --tag beta
# Switch to the moving GitHub main checkout
openclaw update --channel dev
# Install a specific npm package spec
openclaw update --tag [email protected]
# Install from GitHub main once without persisting the channel
openclaw update --tag main

備註:

  • --tag 僅適用於 **套件 的安裝會忽略它。
  • 該標籤不會被保存。您的下一次 openclaw update 會照常使用您設定的 頻道。
  • 對於套件安裝,OpenClaw 會在分階段的 npm 安裝之前,將 GitHub/git 來源規格預先打包成 臨時 tarball。當您希望將變動的 main 簽出作為持久安裝時,請使用 --channel dev--install-method git --version main
  • 降級保護:如果目標版本比您目前的版本舊, OpenClaw 會提示確認(使用 --yes 跳過)。
  • --channel beta--tag beta 不同:頻道流程可以在 beta 缺失或較舊時回退 到 stable/latest,而 --tag beta 則針對該次執行直接鎖定 原始的 beta dist-tag。

預覽 openclaw update 將執行的操作而不進行變更:

Terminal window
openclaw update --dry-run
openclaw update --channel beta --dry-run
openclaw update --tag 2026.4.1-beta.1 --dry-run
openclaw update --dry-run --json

試運行會顯示有效頻道、目標版本、計劃操作,以及是否需要降級確認。

當您使用 openclaw update 切換頻道時,OpenClaw 也會同步外掛 來源:

  • dev 偏好使用 git 檢出中的配套外掛程式。
  • stablebeta 會還原已安裝的 npm 外掛程式套件。
  • 透過 npm 安裝的外掛程式會在核心更新完成後更新。
Terminal window
openclaw update status

顯示使用中的頻道、安裝類型(git 或 package)、目前版本,以及來源(設定、git tag、git branch 或預設值)。

  • 為您希望 git 檢出指向的版本打上標籤(穩定版使用 vYYYY.M.D, Beta 版使用 vYYYY.M.D-beta.N;具名的 semver 發行前綴版本(例如 -alpha.N-rc.N-next.N)不是穩定的目標)。
  • 舊式的數字穩定版標籤(例如 vYYYY.M.D-1v1.0.1-1)出於相容性原因, 仍被視為穩定的 git 標籤。
  • vYYYY.M.D.beta.N 亦為相容性而識別,但建議使用 -beta.N
  • 保持標籤不可變:切勿移動或重複使用標籤。
  • npm dist-tags 仍是 npm 安裝的來源真相:
    • latest -> stable (穩定版)
    • beta -> candidate build (候選版本) 或 beta-first stable build (優先 Beta 的穩定版本)
    • dev -> main snapshot (主分支快照,可選)

測試版和開發版構建可能會包含 macOS 應用程式版本。這沒關係:

  • git 標籤和 npm dist-tag 仍然可以發布。
  • 在版本說明或變更記錄中註明「此測試版無 macOS 構建」。