主题
openclaw
本地部署
Windows 推荐 WSL
脚本安装:
bashcurl -fsSL https://openclaw.ai/install.sh | bashInstalling OpenClaw比较慢,且没有反馈输出,耐心等待即可 ……当出现 OpenClaw 欢迎语时,初始安装完成!
初始设置(根据需求进行初始设置即可):
- 第一次安装时,建议选择 Web UI,更直观。
常见命令
bash
openclaw --help
🦞 OpenClaw 2026.3.7 (42a1394) — If it works, it's automation; if it breaks, it's a "learning opportunity."
Usage: openclaw [options] [command]
options 选项:
--dev 开发模式:将状态隔离到 ~/.openclaw-dev,默认 Gateway 端口 19001,
并自动调整相关派生端口(浏览器/Canvas)
-h, --help 显示命令帮助
--log-level <level> 全局日志级别覆盖(文件 + 控制台),可选:
silent|fatal|error|warn|info|debug|trace
--no-color 禁用 ANSI 颜色输出
--profile <name> 使用指定配置 profile(状态/配置隔离到 ~/.openclaw-<name>)
-V, --version 输出版本号
command 命令:
提示: 带 * 的命令有子命令。运行 <command> --help 查看详情。
acp * Agent 控制协议工具
agent 通过 Gateway 运行一次 Agent
agents * 管理独立 Agent(工作区 / 认证 / 路由)
approvals * 管理执行审批(Gateway 或 Node 主机)
browser * 管理 OpenClaw 专用浏览器(Chrome/Chromium)
channels * 管理连接的聊天渠道(Telegram、Discord 等)
clawbot * 旧版 clawbot 命令别名
completion 生成 shell 自动补全脚本
config * 非交互配置工具(get/set/unset/file/validate),默认启动设置向导
configure 交互式配置向导(凭证、渠道、Gateway、Agent 默认设置)
cron * 通过 Gateway 调度管理 cron 任务
daemon * Gateway 服务(旧别名)
dashboard 使用当前 token 打开控制 UI
devices * 设备配对 + token 管理
directory * 查询联系人/群组 ID(self / peers / groups)
dns * DNS 工具(Tailscale + CoreDNS)
docs 搜索 OpenClaw 在线文档
doctor 健康检查 + 快速修复 Gateway 和渠道问题
gateway * 运行、检查和查询 WebSocket Gateway
health 获取运行中 Gateway 健康状态
help 显示命令帮助
hooks * 管理内部 Agent hooks
logs 通过 RPC 查看 Gateway 日志
memory * 搜索和重建 memory 文件
message * 发送、读取和管理消息
models * 发现、扫描和配置模型
node * 运行和管理无头 Node Host 服务
nodes * 管理 Gateway 节点配对和命令
onboard 交互式引导(Gateway、Workspace、技能)
pairing * 安全 DM 配对(批准入站请求)
plugins * 管理 OpenClaw 插件和扩展
qr 生成 iOS 配对二维码/设置码
reset 重置本地配置/状态(保留 CLI)
sandbox * 管理 sandbox 容器(Agent 隔离)
secrets * Secrets 运行时重新加载控制
security * 安全工具和本地配置审计
sessions * 列出保存的会话
setup 初始化本地配置和 Agent Workspace
skills * 列出和检查可用技能
status 显示渠道健康和最近会话接收者
system * 系统事件、心跳和在线状态
tui 打开终端 UI(连接 Gateway)
uninstall 卸载 Gateway 服务 + 本地数据(保留 CLI)
update * 更新 OpenClaw 并检查更新通道状态
webhooks * Webhook 工具和集成
Examples 示例:
openclaw models --help
显示 models 命令详细帮助
openclaw channels login --verbose
连接个人 WhatsApp Web 并显示二维码 + 日志
openclaw message send --target +15555550123 --message "Hi" --json
通过 Web 会话发送消息并打印 JSON 结果
openclaw gateway --port 18789
本地运行 WebSocket Gateway
openclaw --dev gateway
运行开发模式 Gateway(隔离状态/配置)在 ws://127.0.0.1:19001
openclaw gateway --force
杀掉默认端口占用并启动 Gateway
openclaw gateway ...
通过 WebSocket 控制 Gateway
openclaw agent --to +15555550123 --message "Run summary" --deliver
通过 Gateway 直接与 Agent 对话,可发送 WhatsApp 回复
openclaw message send --channel telegram --target @mychat --message "Hi"
通过 Telegram bot 发送消息
文档: docs.openclaw.ai/cli相关资源
- clawhub.ai:OpenClaw 官方 Skills 市场
