OpenClaw CLI 命令

搜索并复制任意 openclaw 命令。完整列表:doctor、models list、models status、plugins list、Gateway、Channels、Skills 等。

基础操作

9 条

查看版本号

openclaw --version

查看所有命令

openclaw --help

打开终端对话界面

openclaw tui

打开网页控制台

openclaw dashboard

更新到最新版本

openclaw update

Update No Restart

openclaw update --no-restart

Update Status

openclaw update status

Update Wizard

openclaw update wizard

Completion

openclaw completion

设置与配置

12 条

Setup

openclaw setup

交互式初始化

openclaw setup --wizard

快速入门

openclaw onboard

交互式配置

openclaw configure

获取配置值

openclaw config get agents.defaults.model.primary

设置配置值

openclaw config set agents.defaults.timeoutSeconds 300

删除配置项

openclaw config unset agents.defaults.timeoutSeconds

Config File

openclaw config file

Config Validate

openclaw config validate

安全审计

openclaw security audit --fix

Security Audit Deep

openclaw security audit --deep

全局标志

# Dev profile
openclaw --dev status

# Custom profile
openclaw --profile work gateway status

# JSON output
openclaw status --json

# No color
openclaw logs --no-color

诊断与排错

12 条

健康检查与修复

openclaw doctor

检查并自动修复

openclaw doctor --fix

Doctor Repair

openclaw doctor --repair

查看运行状态

openclaw status

Status All

openclaw status --all

深度检查

openclaw status --deep

Status Usage

openclaw status --usage

Health

openclaw health

查看最近日志

openclaw logs

跟踪日志

openclaw logs --follow

显示最后 N 行

openclaw logs --limit 200

JSON 日志

openclaw logs --json

Gateway

13 条

检查 Gateway 状态

openclaw gateway status

Gateway Status Deep

openclaw gateway status --deep

前台运行

openclaw gateway run

启动 Gateway

openclaw gateway start

停止 Gateway

openclaw gateway stop

重启 Gateway

openclaw gateway restart

安装为服务

openclaw gateway install

卸载服务

openclaw gateway uninstall

调用 RPC 方法

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

Gateway Health

openclaw gateway call health

健康探测

openclaw gateway probe --timeout 5000

发现 Gateway

openclaw gateway discover

Gateway Usage Cost

openclaw gateway usage-cost

消息渠道

12 条

列出渠道

openclaw channels list

检查渠道状态

openclaw channels status --probe

Channels Capabilities

openclaw channels capabilities

Channels Resolve

openclaw channels resolve --channel telegram --account default

查看渠道日志

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

移除渠道

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

模型

17 条

检查模型状态

openclaw models status

检查认证过期

openclaw models status --check

列出所有模型

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

OAuth 登录模型提供商

openclaw models auth login --provider <provider>

列出别名

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

Agents & message

11 条

Agent Run

openclaw agent --message "Hello"

Agents List

openclaw agents list

Agents Bindings

openclaw agents bindings

Agents Bind

openclaw agents bind <agentId> <channel> <account>

Agents Unbind

openclaw agents unbind <agentId> <channel> <account>

Agents Add

openclaw agents add [name]

Agents Set Identity

openclaw agents set-identity <id> <name>

Agents Delete

openclaw agents delete <id>

Message Send

openclaw message send --channel telegram --account default --text "Hello"

Message Broadcast

openclaw message broadcast --text "Announcement"

Sessions List

openclaw sessions list

技能与插件

17 条

列出技能

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 ./custom-plugin

Plugins Install Link

openclaw plugins install ./custom-plugin --link

启用插件

openclaw plugins enable voicecall

禁用插件

openclaw plugins disable voicecall

检查插件

openclaw plugins doctor

内存状态

openclaw memory status

重建索引

openclaw memory index

搜索内存

openclaw memory search "OpenClaw setup commands"

浏览器

18 条

浏览器状态

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 <id>

截图

openclaw browser screenshot --target-id <id> --type png

DOM 快照

openclaw browser snapshot --format aria --target-id <id>

导航到 URL

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

点击元素

openclaw browser click --ref button-submit --target-id <id>

输入文本

openclaw browser type --text "Hello" --input-ref textarea-message --target-id <id>

填写表单

openclaw browser fill --fields '[{"ref":"name","value":"John"}]' --target-id <id>

执行 JavaScript

openclaw browser evaluate --fn "document.title" --target-id <id>

列出配置

openclaw browser profiles

创建配置

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

删除配置

openclaw browser delete-profile --name "Shopping"

导出为 PDF

openclaw browser pdf --target-id <id>

节点

20 条

Nodes Status

openclaw nodes status

列出节点

openclaw nodes list

列出已连接节点

openclaw nodes status --connected

描述节点

openclaw nodes describe --node <nodeId>

Nodes Pairing Rename

openclaw nodes pairing rename --node <id> --name "Personal iPhone"

在节点上运行命令

openclaw nodes run --node <id> --raw "openclaw status"

调用节点方法

openclaw nodes invoke --node <id> --command camera_snap --params '{"facing":"back"}'

列出待处理请求

openclaw nodes pairing pending

批准请求

openclaw nodes pairing approve <requestId>

拒绝请求

openclaw nodes pairing reject <requestId>

列出摄像头

openclaw nodes camera list --node <id>

拍照

openclaw nodes camera snap --node <id> --facing back

录制视频

openclaw nodes camera clip --node <id> --facing back --duration 30s

画布快照

openclaw nodes canvas snapshot --node <id> --format png

显示画布

openclaw nodes canvas present --node <id> --x 100 --y 200 --width 600 --height 400

隐藏画布

openclaw nodes canvas hide --node <id>

导航画布

openclaw nodes canvas navigate --node <id> --url https://example.com

在画布上执行

openclaw nodes canvas eval --node <id> --js "document.body.style.backgroundColor='red'"

屏幕录制

openclaw nodes screen record --node <id> --duration 60 --out /tmp/recording.mp4

获取位置

openclaw nodes location get --node <id>

Devices (pairing & tokens)

7 条

Devices List

openclaw devices list

Devices Approve

openclaw devices approve <requestId>

Devices Reject

openclaw devices reject <requestId>

Devices Remove

openclaw devices remove <deviceId>

Devices Clear

openclaw devices clear

Devices Rotate

openclaw devices rotate <deviceId>

Devices Revoke

openclaw devices revoke <deviceId>

系统与定时任务

17 条

入队事件

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"

添加循环任务

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>

启用任务

openclaw cron enable <id>

禁用任务

openclaw cron disable <id>

Cron Rm

openclaw cron rm <id>

查看任务历史

openclaw cron runs --id <id> --limit 10

Cron Edit

openclaw cron edit <id>

Maintenance

6 条

打开网页控制台

openclaw dashboard

Reset

openclaw reset

Reset Scope

openclaw reset --scope config --yes

Uninstall

openclaw uninstall

Backup Create

openclaw backup create

Backup Verify

openclaw backup verify <archive>

Other

20 条

Secrets Audit

openclaw secrets audit

Secrets Configure

openclaw secrets configure

Secrets Apply

openclaw secrets apply

Hooks List

openclaw hooks list

Hooks Enable

openclaw hooks enable <name>

Hooks Disable

openclaw hooks disable <name>

Directory Self

openclaw directory self --channel telegram --account default

Directory Peers List

openclaw directory peers list --channel telegram

Directory Groups List

openclaw directory groups list --channel telegram

Pairing List

openclaw pairing list

Pairing Approve

openclaw pairing approve <codeOrChannel> [code]

Qr

openclaw qr

Docs

openclaw docs <query>

Dns Setup

openclaw dns setup

Approvals Get

openclaw approvals get

Approvals Set

openclaw approvals set --file <path>

Approvals Allowlist Add

openclaw approvals allowlist add "~/Projects/**/bin/rg"

Sandbox List

openclaw sandbox list

Node Status

openclaw node status

Node Run

openclaw node run

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