附录2 关键命令参考
agents
openclaw agents list
OpenClaw 2026.9.5 (ec9c1a1) — I'm like tmux: confusing at first, then suddenly you can't live without me.
Agents:
- main (default)
Identity: 🤖 大白 (Dà Bái) (IDENTITY.md)
Workspace: ~\.openclaw\workspace
Agent dir: ~\.openclaw\agents\main\agent
Model: bailian/qwen3.7-max
Routing rules: 0
Routing: default (no explicit rules)
- longhub
Identity: 🏗️ 大张 (Da Zhang) (IDENTITY.md)
Workspace: ~\.openclaw\workspace-longhub
Agent dir: ~\.openclaw\agents\longhub\agent
Model: bailian/qwen3.7-max
Routing rules: 0
Routing rules map channel/account/peer to an agent. Use --bindings for full rules.
Channel status reflects local config/creds. For live health: openclaw channels status --probe.
browser
默认不可用,
openclaw browser status
channels
查看channels 状态:
$ openclaw channels status
OpenClaw 2026.9.9 (bcfc888) — I autocomplete your thoughts—just slower and with more API calls.
|
o
Gateway reachable.
- WeChat 2f8cfd676c3c-im-bot: enabled, configured, running
config
openclaw config 是 OpenClaw 提供的命令行配置工具,用于查看、修改或删除底层配置文件(~/.openclaw/openclaw.json)中的任意字段。它支持精确的路径定位和类型感知的值解析,是高级用户和自动化脚本管理 OpenClaw 行为的核心手段。
OpenClaw 的配置是一个嵌套 JSON 结构,config 命令通过点号(.)和方括号([]) 支持深度访问:
- get
获取指定配置项的当前值 openclaw config get browser.executablePath - set
设置配置项的值 openclaw config set gateway.port 19001 - unset
删除配置项(恢复默认) openclaw config unset tools.web.search.apiKey
1, 修改配置,例如设置使用Ollama
openclaw config set models.providers.ollama.apiKey "ollama-local"
2, 查看配置项:
$ openclaw config get logging.file
C:\Users\zhang\.openclaw\openclaw.log
cron
管理定时任务
openclaw cron
🦞 OpenClaw 2026.3.13 (61d171a) — I autocomplete your thoughts—just slower and with more API calls.
Usage: openclaw cron [options] [command]
Manage cron jobs (via Gateway)
Options:
-h, --help Display help for command
Commands:
add Add a cron job
disable Disable a cron job
edit Edit a cron job (patch fields)
enable Enable a cron job
help Display help for command
list List cron jobs
rm Remove a cron job
run Run a cron job now (debug)
runs Show cron run history (JSONL-backed)
status Show cron scheduler status
Docs: docs.openclaw.ai/cli/cron
Upgrade tip: run openclaw doctor --fix to normalize legacy cron job storage.
- add 添加一个新的 cron job(需指定 schedule、command 等)
- list 列出当前所有 cron job(含状态:enabled/disabled)
- edit
修改某个 cron job 的部分字段(如 schedule 或 command) - enable
/ disable 启用或禁用指定 ID 的任务 - rm
删除 cron job(不可恢复,请谨慎) - run
立即手动触发一次任务执行(用于调试) - runs
查看该任务的历史执行记录(以 JSONL 格式输出)
dashboard
打开认证的dashboard页面, 命令和输出如下:
$ openclaw dashboard
🦞 OpenClaw 2026.3.13 (61d171a) — Less clicking, more shipping, fewer "where did that file go" moments.
Dashboard URL: http://127.0.0.1:18789/#token=fd45b0b8b778ec36e14cdbbc95e42dad02e70eaab2e96bde
Copied to clipboard.
Opened in your browser. Keep that tab to control OpenClaw.
会自动使用默认浏览器打开OpenClaw的控制面板。
doctor
openclaw doctor 是 OpenClaw 提供的综合性健康诊断命令,用于自动检测系统环境、依赖项、服务状态和常见配置问题,并提供可操作的修复步骤。
gateway
-
启动gateway网关命令:
openclaw gateway start
启动后默认在127.0.0.1的18789端口监听
-
重启gateway网关:
openclaw gateway restart
例如修改了配置文件,重新进行加载,启动后默认在127.0.0.1的18789端口监听
-
查看gateway服务器状态:
openclaw gateway status
-
启动:
openclaw gateway
🦞 OpenClaw 2026.3.13 (61d171a) — Shell yeah—I'm here to pinch the toil and leave you the glory.
18:56:49 [canvas] host mounted at http://127.0.0.1:18789/openclaw/canvas/ (root C:\Users\zhang.openclaw\canvas)
18:56:50 [heartbeat] started
18:56:50 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
18:56:50 [gateway] agent model: anthropic/claude-opus-4-6
18:56:50 [gateway] listening on ws://127.0.0.1:18789, ws://[::1]:18789 (PID 13656)
18:56:50 [gateway] log file: C:\Users\zhang\AppData\Local\Temp\openclaw\openclaw-2026-03-17.log
18:56:50 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
logs
查看实时的log:
openclaw logs --follow
models
1, 查看 OpenClaw 当前可用的模型:
openclaw models list
2, 使用qwen模型
openclaw models auth login --provider qwen-portal --set-default
onboard
openclaw onboard 是 OpenClaw 提供的交互式初始化向导命令。用于帮助新用户快速完成首次配置,将 OpenClaw 从“刚安装”状态引导至“可正常使用”状态。
也可以采用非交互式,例如设置为采用ollama服务提供的qwen3模型:
openclaw onboard --non-interactive \
--auth-choice ollama \
--custom-base-url "http://ollama-host:11434" \
--custom-model-id "qwen3:1.7b" \
--accept-risk
plugins
示例1,打开qwen前端认证:
openclaw plugins enable qwen-portal-auth
使用免费的千问接入大模型方式,不用直接填 API Key,而是启用 Qwen 的 OAuth 插件。
查看已启用的插件:
openclaw plugins list --enabled
skills
openclaw skills用于查看技能相关信息。有以下几种常用情况:
- list:查看有哪些技能;
- list --eligible:看当前环境真正可用的技能;
- info
:看单个技能详细描述和依赖; - check:做整体技能的检查,会输出技能所缺少的条件。
查看所有的skill:
openclaw skills list
-
查看skills所支持的子命令:
openclaw skills --help
🦞 OpenClaw 2026.3.13 (61d171a) — I'm the assistant your terminal demanded, not the one your sleep schedule requested.
Usage: openclaw skills [options] [command]
List and inspect available skills
Options:
-h, --help Display help for commandCommands:
check Check which skills are ready vs missing requirements
info Show detailed information about a skill
list List all available skillsDocs: docs.openclaw.ai/cli/skills
共有三个子命令,
- check:用于检查当前哪些技能已经满足学习条件(即“就绪”),哪些技能还缺少前提要求(如前置技能、资源等)。
- info
:显示指定技能的详细信息,例如功能描述、文件位置、所需条件、依赖资源等。 -
list:列出所有可用的技能名称,通常包括已启用和未启用的技能。
-
查看目前可用的技能
openclaw skills list --eligible
我这里目前可用的技能有:healtthcheck, node-connect, skill-creator, video-frames, weather.
-
查看技能的详细信息
openclaw skills info weather
🦞 OpenClaw 2026.3.13 (61d171a) — If you can describe it, I can probably automate it—or at least make it funnier.
☔ weather ✓ Ready
Get current weather and forecasts via wttr.in or Open-Meteo. Use when: user asks about weather, temperature, or forecasts for any location. NOT for: historical weather data, severe weather alerts, or detailed meteorological analysis. No API key needed.
Details:
Source: openclaw-bundled
Path: ~\AppData\Roaming\npm\node_modules\openclaw\skills\weather\SKILL.md
Homepage: https://wttr.in/:helpRequirements:
Binaries: ✓ curl
status
Openclaw status 用于快速获取系统整体运行状态的概览。是 OpenClaw 的核心诊断命令,看清系统是否在线、版本是否最新、下一步该做什么。它不执行任何修改操作,仅提供只读信息,是排查问题的第一步。
update
执行升级:
$ openclaw update
执行需要很长时间,我这里大约1小时以上。
2026年3月23日更新后版本从OpenClaw 2026.3.13 (61d171a)升级为:OpenClaw 2026.3.22 (4dcc39c)
2026年8月5日更新后版本升级为:OpenClaw 2026.7.1-2 (0790d9f)
查看更新状态:
openclaw update status
解决2026.9.7版本更新新版本失败的问题:
npm install -g openclaw@latest
openclaw doctor --fix
openclaw update repair