openclaw plugins
管理 Gateway 的插件 / 扩展(在进程内加载)。
相关内容:
- 插件系统:Plugins
- 插件清单与 schema: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,即使为空也要有)。清单或 schema 缺失 / 无效会阻止插件加载,并导致配置校验失败。
安装
openclaw plugins install <path-or-spec>
openclaw plugins install <npm-spec> --pin
安全提示:安装插件等同于执行代码,建议用固定版本。
npm spec 仅支持注册表方式(包名 + 可选的精确版本或 dist-tag)。Git / URL / 文件路径以及 semver 范围会被拒绝。依赖安装使用 --ignore-scripts 以确保安全。
裸 spec 和 @latest 会走稳定通道。如果 npm 将其解析为预发布版本,OpenClaw 会停下来要求你用预发布标签(如 @beta / @rc)或精确预发布版本号(如 @1.2.3-beta.4)来显式确认。
如果裸安装 spec 与某个内置插件 id 同名(比如 diffs),OpenClaw 会直接安装内置插件。要安装同名的 npm 包,请用带作用域的 spec(比如 @scope/diffs)。
支持的压缩包格式:.zip、.tgz、.tar.gz、.tar。
用 --link 可以避免复制本地目录(添加到 plugins.load.paths):
openclaw plugins install -l ./my-plugin
在 npm 安装时用 --pin 可以把解析出的精确 spec(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 跳过确认提示。