CLI First
快速开始
目标是尽快从零跑到第一个可用聊天。推荐路径是 openclaw onboard 配置认证与 Gateway,然后直接在 Dashboard 或 Control UI 中验证。
从零到第一条消息
0. 准备运行时
确认 Node 22+;Windows 优先用 WSL2。需要网页搜索时,可以在后续通过 openclaw configure --section web 配置 Brave Search API。
1. 安装 CLI
执行官方安装脚本,或者使用 npm / pnpm 全局安装,确保 openclaw 在当前 shell 可用。
2. 运行新手向导
使用 openclaw onboard --install-daemon 选择本地或远程 Gateway、模型认证、渠道与后台服务。
3. 启动并验证 Gateway
如果你安装了服务,先跑 openclaw gateway status;如果是前台调试,直接运行 openclaw gateway --port 18789 --verbose。
4. 打开聊天界面
最快的验证方式是 openclaw dashboard。如果你已经配置了 Telegram / WhatsApp 等渠道,也可以从渠道入口直接发送第一条消息。
高频命令
安装 + 启动向导
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon 启动本地 Gateway
openclaw gateway --port 18789 --verbose 健康与状态检查
openclaw status
openclaw health
openclaw status --deep 渠道配对示例
openclaw channels login
openclaw pairing list whatsapp
openclaw pairing approve whatsapp <code> 关键决策点
本地还是远程
如果你在当前机器上运行 Gateway,优先本地模式;如果 Gateway 在另一台机器上,走远程模式并统一 URL、token 与隧道。
OAuth 还是 API Key
CLI 向导支持 OpenAI / Codex OAuth、Anthropic API Key / setup-token 等模式。服务器场景通常更适合 API Key 或可复制的 token。
Dashboard 还是消息渠道
最快的聊天验证是 Dashboard;如果你的目标是日常在 WhatsApp、Telegram 或 Discord 中使用,再继续做渠道配置。
Node 而不是 Bun
Node 是官方推荐运行时。尤其当你要接 WhatsApp / Telegram 渠道时,应避免在 Bun 上运行 Gateway 网关。