`moltbot plugins`

`moltbot plugins`

适用范围

使用本页面当:

  • 需要安装或管理进程内网关插件
  • 需要调试插件加载失败

管理网关插件/扩展(进程内加载)。

相关:

命令

moltbot plugins list
moltbot plugins info <id>
moltbot plugins enable <id>
moltbot plugins disable <id>
moltbot plugins doctor
moltbot plugins update <id>
moltbot plugins update --all

内置插件随 Moltbot 一起提供,但默认禁用。使用 plugins enable 来激活它们。

所有插件必须附带一个 moltbot.plugin.json 文件,其中包含内联 JSON 架构(configSchema,即使为空)。缺失/无效的清单或架构会阻止插件加载并导致配置验证失败。

安装

moltbot plugins install <path-or-spec>

安全提示:将插件安装视为运行代码。优先使用固定版本。

支持的存档:.zip.tgz.tar.gz.tar

使用 --link 避免复制本地目录(添加到 plugins.load.paths):

moltbot plugins install -l ./my-plugin

更新

moltbot plugins update <id>
moltbot plugins update --all
moltbot plugins update <id> --dry-run

更新仅适用于从 npm 安装的插件(在 plugins.installs 中跟踪)。