Appearance
本页介绍 openclaw plugins 的所有子命令:list(列出)、install(安装)、inspect/info(详情)、enable/disable(开关)、uninstall(卸载)、update(更新)、doctor(诊断)、marketplace list(市场列表)。覆盖 ClawHub 优先安装、本地路径、npm 安装和 Bundle 格式兼容性说明。
openclaw plugins
管理 Gateway 插件/扩展、Hook Pack 和兼容 Bundle。
相关文档:
- 插件系统:Plugins
- Bundle 兼容性:Plugin bundles
- 插件 manifest:Plugin manifest
- 安全加固:Security
常用命令
bash
openclaw plugins list
openclaw plugins list --enabled
openclaw plugins list --verbose --json
openclaw plugins install <name>
openclaw plugins inspect <id>
openclaw plugins enable <id>
openclaw plugins disable <id>
openclaw plugins uninstall <id>
openclaw plugins update <id>
openclaw plugins update --all
openclaw plugins doctor
openclaw plugins marketplace list <source>内置插件随 OpenClaw 发布,部分默认启用(如 bundled 模型 provider、语音 provider、Browser 插件),其余需要手动 plugins enable。
plugins list 显示 Format: openclaw 或 Format: bundle。加 --verbose 后还会显示 bundle 子类型(codex、claude 或 cursor)及检测到的能力。
安装
bash
openclaw plugins install <package> # 优先查 ClawHub,再查 npm
openclaw plugins install clawhub:<package> # 仅查 ClawHub
openclaw plugins install <package> --force # 覆盖已有安装
openclaw plugins install <package> --pin # 固定版本(仅 npm)
openclaw plugins install <path> # 本地路径
openclaw plugins install <plugin>@<marketplace> # 指定市场
openclaw plugins install <plugin> --marketplace <name> # 市场(显式)
openclaw plugins install <plugin> --marketplace https://github.com/<owner>/<repo>安全提示:插件安装相当于执行第三方代码,优先使用固定版本。
ClawHub 安装示例:
bash
openclaw plugins install clawhub:openclaw-codex-app-server
openclaw plugins install clawhub:openclaw-codex-app-server@1.2.3
openclaw plugins install openclaw-codex-app-server # 自动优先 ClawHub本地路径/链接安装:
bash
openclaw plugins install ./my-plugin
openclaw plugins install -l ./my-plugin # --link,不复制文件,直接加入 plugins.load.paths链接安装与 --force 不兼容(链接安装复用源路径,无目标覆盖概念)。
市场来源支持:
- Claude 已知市场名(来自
~/.claude/plugins/known_marketplaces.json) - 本地路径或
marketplace.json - GitHub shorthand:
owner/repo - GitHub URL:
https://github.com/owner/repo - git URL
OpenClaw 自动检测格式:OpenClaw 原生插件、Codex/Claude/Cursor 兼容 Bundle。
npm 规范限制:仅支持包名+精确版本或 dist-tag,不支持 git/URL/文件规范和 semver 范围。
列表
bash
openclaw plugins list # 表格视图
openclaw plugins list --enabled # 仅显示已加载的插件
openclaw plugins list --verbose # 每插件详情行(含来源/版本/激活元数据)
openclaw plugins list --json # 机器可读输出 + 注册表诊断详情(inspect / info)
bash
openclaw plugins inspect <id>
openclaw plugins inspect <id> --json
openclaw plugins inspect --all # 全量插件概览表展示插件的完整运行时信息:能力分类、注册的 hooks/tools/commands/services/gateway 方法/HTTP 路由、bundle 能力、MCP/LSP 服务支持等。
插件形态分类:
| 形态 | 含义 |
|---|---|
plain-capability | 单一能力(如仅提供 provider) |
hybrid-capability | 多种能力(如文本+语音+图片) |
hook-only | 只有 hooks,无能力 |
non-capability | 有工具/命令/服务,无能力 |
卸载
bash
openclaw plugins uninstall <id>
openclaw plugins uninstall <id> --dry-run # 预览不实际删除
openclaw plugins uninstall <id> --keep-files # 保留磁盘文件卸载会移除 plugins.entries、plugins.installs、插件 allowlist 以及 plugins.load.paths 中的关联条目。活跃内存插件卸载后,内存插槽重置为 memory-core。
更新
bash
openclaw plugins update <id>
openclaw plugins update --all
openclaw plugins update <id> --dry-run
openclaw plugins update @openclaw/voice-call@beta更新时如果有完整性哈希,且新版哈希与旧版不同,会提示确认后再继续(CI/非交互模式传 --yes 跳过)。
诊断
bash
openclaw plugins doctor报告插件加载错误、manifest 发现诊断和兼容性警告。无问题时输出 No plugin issues detected.
市场列表
bash
openclaw plugins marketplace list <source>
openclaw plugins marketplace list <source> --json列出市场中的可用插件。支持本地路径、marketplace.json、GitHub shorthand 或 git URL。
常见问题
Q: 安装插件后龙虾没有加载,如何排查?
A: 运行 openclaw plugins doctor 查看加载报错,再用 openclaw plugins list --verbose 确认插件激活状态。大多数插件变更需要重启 Gateway 才生效。
Q: 如何安装 Claude Code 扩展包(Bundle)?
A: Bundle 格式(Codex/Claude/Cursor)同样通过 openclaw plugins install 安装,OpenClaw 会自动检测格式。支持本地路径、.tgz 归档和市场来源。
Q: --dangerously-force-unsafe-install 是什么,安全吗?
A: 这是绕过内置危险代码扫描误报的应急选项。它不绕过 before_install 策略拦截,也不绕过扫描失败阻断,仅用于明确知晓风险的情况。