OpenClaw CLI 速查表

命令:openclaw 最后更新:2026 年 3 月 29 日
🖥️ Gateway · 服务
启动 Gateway(WebSocket)
gateway 前台运行;默认需 gateway.mode=local--allow-unconfigured
gateway run 与无子命令等价的前台别名
--port / --bind 监听端口与绑定;默认端口多为 18789
--auth / --token 认证模式与令牌(亦设 OPENCLAW_GATEWAY_TOKEN
--password-file 从文件读入口令(优于行内 --password
--tailscale 经 Tailscale 暴露;--tailscale-reset-on-exit 退出时复位
--dev / --reset 开发配置与重置(--reset 需配合 --dev
--force 占用端口的旧进程上强制监听
探活与 RPC
gateway health 对运行中实例健康检查;常配合 --url
gateway status 系统服务 + 可选 RPC;--require-rpc --json
gateway probe 调试多目标;--ssh user@host 远程转发场景
gateway discover Bonjour _openclaw-gw._tcp--json
gateway call 底层 RPC,如 call statuscall logs.tail
托管服务(systemd 等)
install · start · stop gateway install 等;支持 --json 脚本化
daemon … 旧版别名,语义贴近 gateway 服务子命令
🔌 MCP · ACP · TUI
MCP
mcp 管理 MCP 服务器与连接;详见 cli/mcp
ACP
acp ACP 桥接 IDE 与 Gateway;见 cli/acp
终端 UI
tui 连接 Gateway 的 TUI;--url --token
--session 会话键;在工作区目录下可自动选中对应 agent
--deliver 将回复投递到聊天频道(与 TUI 联用)
文档 web/tui
⚡ 聊天斜杠命令
常用
/status 快速诊断与状态摘要
/config 持久化配置变更
/debug 仅内存的运行时覆盖;需 commands.debug: true
更多
文本与原生客户端 频道内均支持 /... 形式
📁 工作区与模板
身份与规则
AGENTS.md 代理行为与工具边界;见默认模板
BOOT.md / BOOTSTRAP.md 启动与引导说明
MEMORY.md · memory/ 长期记忆文本;配合 memory 子命令索引
参考模板目录
docs.openclaw.ai AGENTS · SOUL · TOOLS
🧠 Agent · 消息 · 频道
agent(单轮)
--message 必填;经 Gateway 执行一轮(--local 可嵌入式)
--to 会话键 / 手机号等;可配合投递
--session-id 复用已有会话
--agent 指定已配置的 agent 名称
--thinking offxhigh(部分模型)
--deliver 将回复发到聊天渠道
--reply-channel / --reply-to 投递渠道与目标(如 Slack 频道)
agents(多代理)
list / add / delete 隔离工作区、凭证与路由
bind · unbind · bindings --bind channel[:account] 绑定流量
message
send / poll / react … 统一出站消息与频道动作
channels
list · status · logs 已连接账号与健康
add · remove · login · logout WhatsApp / Telegram / Discord / Slack 等
配对与设备
pairing list · approve 跨频道 DM 配对
devices … 网关设备配对与令牌轮换
⚙️ 初始化与配置
首次与向导
setup --workspace --wizard --non-interactive
onboard 网关、工作区、技能;大量 provider / 网关旗标
configure 交互:模型、频道、技能、Gateway
config(非交互)
get · set · unset 点路径;set 支持 SecretRef / 批处理 JSON
file · schema · validate 路径、JSON Schema、校验(--json
运维
doctor 体检与快速修复;--deep --yes
logs 经 RPC 尾随网关日志;--follow --json
status · health 会话链路与网关健康;--deep --usage
sessions 列出存储的会话;--json --store
密钥
secrets reload audit configure apply
security audit 配置审计;--deep --fix
🔧 模型 · 技能 · 记忆
models
list · status · set 模型列表、状态与主模型
set-image · aliases 图像模型与别名
fallbacks · image-fallbacks 故障转移链
scan · auth 扫描与 provider 认证配置
skills(ClawHub)
search · install · update 发现与安装技能包
list · info · check 已安装技能与依赖检查
memory
status · index · search 向量索引 MEMORY.md + memory/*.md
plugins
list · install · enable 扩展;多数改动需重启 Gateway
🖥️ 自动化与其它
浏览器工具
browser start stop snapshot navigate click
定时与钩子
cron list add run enable
hooks · webhooks 钩子管理;webhooks gmail
沙箱与审批
sandbox list recreate explain
approvals 执行审批与 allowlist
全局与维护
-V / --version 版本;--no-color 关 ANSI
completion Shell 补全生成
dashboard 控制面板相关 CLI
backup / reset / uninstall 备份、重置状态、卸载服务与数据
update 升级 CLI(源码安装可用 --update 简写)
docs 内置文档入口