CLI 参考 • 5 分钟阅读
配置
“openclaw config”的 CLI 参考(get/set/unset 配置值)
配置助手:按路径 get/set/unset 值。
不带子命令运行会打开配置向导(与 openclaw configure 相同)。
Tutorial.step
示例
Bash
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
Tutorial.step
路径
路径使用点或括号表示法:
Bash
openclaw config get agents.defaults.workspace openclaw config get agents.list[0].id
使用 agent 列表索引来定位特定 agent:
Bash
openclaw config get agents.list openclaw config set agents.list[1].tools.exec.node "node-id-or-name"
Tutorial.step
值
尽可能将值解析为 JSON5;否则会被视为字符串。
使用 --json 要求 JSON5 解析。
Bash
openclaw config set agents.defaults.heartbeat.every "0m" openclaw config set gateway.port 19001 --json openclaw config set channels.whatsapp.groups '["*"]' --json
编辑后重启网关。