Skip to main content

openclaw config

配置助手:通过路径获取/设置/取消设置/验证值,并打印当前活动的配置文件。

示例

openclaw config file
openclaw config get browser.executablePath
openclaw config set browser.executablePath "/usr/bin/google-chrome"
openclaw config set agents.defaults.heartbeat.every "2h"
openclaw config unset tools.web.search.apiKey
openclaw config validate

路径

路径使用点号或括号符号表示法:
openclaw config get agents.defaults.workspace
openclaw config get agents.list[0].id
openclaw config set agents.list[1].tools.exec.node "node-id-or-name"

值尽可能按 JSON5 解析;否则将视为字符串。
openclaw config set agents.defaults.heartbeat.every "0m"
openclaw config set gateway.port 19001 --strict-json
openclaw config set channels.whatsapp.groups '["*"]' --strict-json

子命令

config file

打印活动配置文件路径。
openclaw config file

config get <path>

获取配置值。
openclaw config get gateway.port
openclaw config get agents.list[0].id

config set <path> <value>

设置配置值。
openclaw config set gateway.port 19001
openclaw config set agents.defaults.model.primary "opus"

config unset <path>

删除配置值。
openclaw config unset tools.web.search.apiKey

config validate

验证当前配置。
openclaw config validate
openclaw config validate --json
修改后请重启网关。

相关文档