openclaw config

配置辅助工具:通过路径读取/设置/删除配置值。不带子命令运行时会打开配置向导(等同于 openclaw configure)。

示例

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

路径

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

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

使用 Agent 列表索引来指定特定的 Agent:

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

值会尽可能解析为 JSON5 格式,否则会被当作字符串处理。使用 --json 参数可以强制要求 JSON5 解析。

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

编辑后需要重启 Gateway。