openclaw plugins
管理 Gateway 外掛/擴充功能(以行程內方式載入)。
相關資源:
- 外掛系統:Plugins
- 外掛清單與結構描述:Plugin manifest
- 安全性強化:Security
指令
openclaw plugins list
openclaw plugins info <id>
openclaw plugins enable <id>
openclaw plugins disable <id>
openclaw plugins uninstall <id>
openclaw plugins doctor
openclaw plugins update <id>
openclaw plugins update --all
內建外掛隨 OpenClaw 一起發行,但預設為停用狀態。使用 plugins enable 啟用。
所有外掛都必須附帶 openclaw.plugin.json 檔案,其中包含行內 JSON Schema
(configSchema,即使為空也需要)。缺少或無效的清單或結構描述會阻止外掛載入,
並導致設定驗證失敗。
安裝
openclaw plugins install <path-or-spec>
openclaw plugins install <npm-spec> --pin
安全性提醒:安裝外掛等同於執行程式碼,建議使用固定版本。
npm 規格僅限 registry(套件名稱加上可選的精確版本或 dist-tag)。
Git/URL/檔案路徑規格和 semver 範圍會被拒絕。相依套件安裝時會使用 --ignore-scripts 以確保安全。
裸規格和 @latest 會維持在穩定版本追蹤。若 npm 將其解析為預發行版本,
OpenClaw 會暫停並要求你明確使用預發行 tag(如 @beta/@rc)或精確的預發行版本
(如 @1.2.3-beta.4)。
若裸安裝規格與內建外掛 ID 相符(例如 diffs),OpenClaw 會直接安裝內建外掛。
若要安裝同名的 npm 套件,請使用明確的 scoped 規格(例如 @scope/diffs)。
支援的壓縮檔格式:.zip、.tgz、.tar.gz、.tar。
使用 --link 可避免複製本機目錄(會加入 plugins.load.paths):
openclaw plugins install -l ./my-plugin
在 npm 安裝時使用 --pin,可將解析後的精確規格(name@version)儲存在
plugins.installs 中,同時保持預設行為不固定版本。
解除安裝
openclaw plugins uninstall <id>
openclaw plugins uninstall <id> --dry-run
openclaw plugins uninstall <id> --keep-files
uninstall 會移除 plugins.entries、plugins.installs、外掛允許清單中的記錄,
以及適用時連結的 plugins.load.paths 項目。
對於使用中的記憶外掛,記憶插槽會重設為 memory-core。
預設情況下,解除安裝也會移除在有效狀態目錄擴充功能根目錄下的外掛安裝目錄
($OPENCLAW_STATE_DIR/extensions/<id>)。使用 --keep-files 可保留磁碟上的檔案。
--keep-config 是 --keep-files 的已棄用別名。
更新
openclaw plugins update <id>
openclaw plugins update --all
openclaw plugins update <id> --dry-run
更新僅適用於從 npm 安裝的外掛(透過 plugins.installs 追蹤)。
當存在已儲存的完整性雜湊值且取得的構件雜湊值有變更時,OpenClaw 會印出警告並在繼續前要求確認。
在 CI/非互動環境中使用全域 --yes 可跳過提示。