OpenClaw 速查表

完整命令参考指南。一键复制命令,提升工作效率。

设置与配置

9 条

交互式初始化

openclaw setup --wizard

快速入门

openclaw onboard

交互式配置

openclaw configure

健康检查与修复

openclaw doctor

安全审计

openclaw security audit --fix

获取配置值

openclaw config get agents.defaults.model.primary

设置配置值

openclaw config set agents.defaults.timeoutSeconds 300

删除配置项

openclaw config unset agents.defaults.timeoutSeconds

全局标志

# Use dev environment
openclaw --dev status

# Use custom profile
openclaw --profile work gateway status

# Output JSON
openclaw status --json

# Disable colors
openclaw logs --no-color

Gateway

14 条

检查 Gateway 状态

openclaw gateway status

启动 Gateway

openclaw gateway start

停止 Gateway

openclaw gateway stop

重启 Gateway

openclaw gateway restart

安装为服务

openclaw gateway install

卸载服务

openclaw gateway uninstall

前台运行

openclaw gateway run

调用 RPC 方法

openclaw gateway call --method config.patch --params '{"skills.enabled":["notion"]}'

健康探测

openclaw gateway probe --timeout 5000

发现 Gateway

openclaw gateway discover

跟踪日志

openclaw logs --follow

显示最后 N 行

openclaw logs --limit 200

纯文本日志

openclaw logs --plain

JSON 日志

openclaw logs --json

消息渠道

11 条

列出渠道

openclaw channels list

检查渠道状态

openclaw channels status --probe

查看渠道日志

openclaw channels logs --channel telegram --lines 50

添加 Telegram 机器人

openclaw channels add --channel telegram --account alerts --name "Alerts Bot" --token $TELEGRAM_BOT_TOKEN

添加 Discord 机器人

openclaw channels add --channel discord --account work --name "Work Bot" --token $DISCORD_BOT_TOKEN

添加 WhatsApp

openclaw channels add --channel whatsapp

添加 Google Chat

openclaw channels add --channel googlechat --account default --name "GChat Bot"

移除渠道

openclaw channels remove --channel discord --account work

删除渠道配置

openclaw channels remove --channel discord --account work --delete

登录渠道

openclaw channels login --channel whatsapp

登出渠道

openclaw channels logout --channel whatsapp --account default

技能与插件

16 条

列出技能

openclaw skills list

列出可用技能

openclaw skills list --eligible

获取技能信息

openclaw skills info seo-blog-generator

检查技能要求

openclaw skills check

搜索技能

npx clawhub search email

安装技能

npx clawhub install email

同步技能

npx clawhub sync

列出插件

openclaw plugins list

获取插件信息

openclaw plugins info voicecall

安装插件

openclaw plugins install --path ./custom-plugin

启用插件

openclaw plugins enable voicecall

禁用插件

openclaw plugins disable voicecall

检查插件

openclaw plugins doctor

内存状态

openclaw memory status

重建索引

openclaw memory index

搜索内存

openclaw memory search "OpenClaw setup commands"

模型

16 条

检查模型状态

openclaw models status

列出所有模型

openclaw models list --all

列出本地模型

openclaw models list --local

按提供商列出

openclaw models list --provider anthropic

设置主模型

openclaw models set claude-3-5-sonnet-20241022

设置图像模型

openclaw models set-image claude-3-5-sonnet-20241022

添加认证(交互式)

openclaw models auth add

设置令牌认证

openclaw models auth setup-token --provider anthropic

粘贴令牌

openclaw models auth paste-token --provider openai --token $OPENAI_API_KEY

检查认证过期

openclaw models status --check

列出别名

openclaw models aliases list

添加别名

openclaw models aliases add "claude" "claude-3-5-sonnet-20241022"

列出回退

openclaw models fallbacks list

添加回退

openclaw models fallbacks add "claude-3-5-sonnet-20241022" "gpt-4o"

扫描模型

openclaw models scan --set-default --yes

按约束扫描

openclaw models scan --max-params 100000 --max-age-days 30 --concurrency 3

浏览器

25 条

浏览器状态

openclaw browser status

启动浏览器

openclaw browser start

停止浏览器

openclaw browser stop

重置配置

openclaw browser reset-profile

列出标签页

openclaw browser tabs

打开 URL

openclaw browser open --url https://docs.openclaw.ai

聚焦标签页

openclaw browser focus --target-id e12

关闭标签页

openclaw browser close --target-id e12

截图

openclaw browser screenshot --target-id e12 --type png

DOM 快照

openclaw browser snapshot --format aria --target-id e12

导航到 URL

openclaw browser navigate --url https://example.com --target-id e12

点击元素

openclaw browser click --ref button-submit --target-id e12

输入文本

openclaw browser type --text "Hello OpenClaw" --input-ref textarea-message --target-id e12

按键

openclaw browser press --key Enter --target-id e12

悬停元素

openclaw browser hover --ref menu-item --target-id e12

拖放

openclaw browser drag --start-ref draggable --end-ref drop-zone --target-id e12

选择选项

openclaw browser select --ref country-select --values "USA" --target-id e12

上传文件

openclaw browser upload --ref file-input --path /tmp/document.pdf --target-id e12

填写表单

openclaw browser fill --fields '[{"ref":"name","value":"John"},{"ref":"email","value":"john@example.com"}]' --target-id e12

创建配置

openclaw browser create-profile --name "Shopping" --color "#FF5A2D"

删除配置

openclaw browser delete-profile --name "Shopping"

列出配置

openclaw browser profiles

执行 JavaScript

openclaw browser evaluate --fn "document.title" --target-id e12

获取控制台日志

openclaw browser console --level error --target-id e12

导出为 PDF

openclaw browser pdf --target-id e12

节点

19 条

列出节点

openclaw nodes list

列出已连接节点

openclaw nodes list --connected

描述节点

openclaw nodes describe --node my-iphone

重命名节点

openclaw nodes rename --node my-iphone --name "Personal iPhone"

在节点上运行命令

openclaw nodes run --node my-iphone --command "openclaw status"

调用节点方法

openclaw nodes invoke --node my-iphone --command camera_snap --params '{"facing":"back"}'

列出待处理请求

openclaw nodes pending

批准请求

openclaw nodes approve --node my-iphone

拒绝请求

openclaw nodes reject --node unknown-device

列出摄像头

openclaw nodes camera list --node my-iphone

拍照

openclaw nodes camera snap --node my-iphone --facing back --max-width 1920 --quality high

录制视频

openclaw nodes camera clip --node my-iphone --facing back --duration 30s --invoke-timeout 40000

画布快照

openclaw nodes canvas snapshot --node my-iphone --format png --max-width 1920

显示画布

openclaw nodes canvas present --node my-iphone --x 100 --y 200 --width 600 --height 400

隐藏画布

openclaw nodes canvas hide --node my-iphone

导航画布

openclaw nodes canvas navigate --node my-iphone --url https://example.com

在画布上执行

openclaw nodes canvas eval --node my-iphone --js "document.body.style.backgroundColor='red'"

屏幕录制

openclaw nodes screen record --node my-iphone --duration 60 --fps 30 --out /tmp/recording.mp4

获取位置

openclaw nodes location get --node my-iphone --accuracy precise --location-timeout 10000

系统与定时任务

15 条

入队事件

openclaw system event --text "Daily summary check"

立即触发事件

openclaw system event --text "Check emails" --mode now

最后心跳

openclaw system heartbeat last

启用心跳

openclaw system heartbeat enable

禁用心跳

openclaw system heartbeat disable

系统状态

openclaw system presence

列出定时任务

openclaw cron list --all

定时任务状态

openclaw cron status

添加定时任务

openclaw cron add --name "daily-summary" --at "2026-02-11T09:00:00Z" --system-event "Check emails and calendar"

添加循环任务

openclaw cron add --name "hourly-check" --every 3600000 --message "Check for new messages"

添加 Cron 表达式任务

openclaw cron add --name "weekly-report" --cron "0 9 * * 1" --message "Generate weekly report"

运行任务

openclaw cron run --id daily-summary

启用任务

openclaw cron enable --id daily-summary

禁用任务

openclaw cron disable --id daily-summary

查看任务历史

openclaw cron runs --id daily-summary --limit 10

Top 10 命令

10 条

完整诊断

openclaw status --deep

重启 Gateway

openclaw gateway restart

验证连接

openclaw channels status

发现能力

openclaw skills list

故障排查

openclaw logs --follow

检查 AI 访问

openclaw models status

启用自动化

openclaw browser start

管理定时任务

openclaw cron list

自动修复问题

openclaw doctor

自定义行为

openclaw config get agents.defaults.model.primary
openclaw config set agents.defaults.timeoutSeconds 300