`clawdbot config`

`clawdbot config`

适用范围

使用本页面当:

  • 需要以非交互方式读取或编辑配置

配置辅助工具:按路径获取/设置/取消设置值。不带子命令运行以打开配置向导(与 clawdbot configure 相同)。

示例

clawdbot config get browser.executablePath
clawdbot config set browser.executablePath "/usr/bin/google-chrome"
clawdbot config set agents.defaults.heartbeat.every "2h"
clawdbot config set agents.list[0].tools.exec.node "node-id-or-name"
clawdbot config unset tools.web.search.apiKey

路径

路径使用点或括号表示法:

clawdbot config get agents.defaults.workspace
clawdbot config get agents.list[0].id

使用 agent 列表索引来定位特定 agent:

clawdbot config get agents.list
clawdbot config set agents.list[1].tools.exec.node "node-id-or-name"

值在可能的情况下被解析为 JSON5;否则被视为字符串。 使用 --json 强制 JSON5 解析。

clawdbot config set agents.defaults.heartbeat.every "0m"
clawdbot config set gateway.port 19001 --json
clawdbot config set channels.whatsapp.groups '["*"]' --json

编辑后重启网关。