OpenClaw 速查表
安装 / 核心命令 / 工作区结构 / 斜杠命令 快速参考
快速开始
安装 + 首次跑通
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
openclaw doctor
openclaw status
openclaw health
openclaw dashboard日常运维三连
openclaw doctor
openclaw status --all
openclaw logs --follow最常用斜杠命令
/status
/new
/compact
/model
/stop
/think安装
一键安装(推荐)
macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bashWindows(PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iex如果你跳过了新手引导
openclaw onboard --install-daemon手动安装(Node.js 环境)
npm 或 pnpm
npm install -g openclaw@latest
# or
pnpm add -g openclaw@latest
openclaw onboard --install-daemon修复 sharp 构建错误
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest系统要求
- Node >= 22
- macOS、Linux 或 Windows(WSL2)
网关
运行网关
openclaw gateway --port 18789作为系统服务管理
openclaw gateway service status
openclaw gateway service install
openclaw gateway service start
openclaw gateway service stop
openclaw gateway service restart网关日志
openclaw logs --follow
openclaw logs --limit 200
openclaw logs --plain
openclaw logs --json渠道
WhatsApp 登录
openclaw channels login
openclaw channels logout添加渠道账户
openclaw channels add --channel telegram --account alerts --name "Alerts Bot" --token $TELEGRAM_BOT_TOKEN
openclaw channels add --channel discord --account work --name "Work Bot" --token $DISCORD_BOT_TOKEN渠道状态
openclaw channels status
openclaw channels status --probe诊断
健康检查
openclaw doctor
openclaw status
openclaw health --json
openclaw dashboard深度诊断
openclaw doctor --deep
openclaw status --all
openclaw status --deep模型和认证
列出和切换模型
openclaw models list
openclaw models status
openclaw models set <model>认证
openclaw models auth add
openclaw models auth setup-token --provider anthropic
openclaw models auth paste-token --provider <provider>技能和插件
技能
openclaw skills list
openclaw skills info <name>
openclaw skills check插件
openclaw plugins list
openclaw plugins install <path|.tgz|npm-spec>
openclaw plugins enable <id>
openclaw plugins disable <id>
openclaw plugins doctor记忆
openclaw memory status
openclaw memory index
openclaw memory search "<query>"浏览器
浏览器自动化
openclaw browser status
openclaw browser start
openclaw browser tabs
openclaw browser open https://example.com
openclaw browser snapshot
openclaw browser screenshot斜杠命令
命令由 Gateway 处理;多数需要作为单独一条消息发送。
命令
| 显示状态、提供商配额 | |
| 显示身份(别名:/id) | |
| 新会话(/new [model]) | |
| 压缩上下文 | |
| 切换/列出模型 | |
| 中止当前运行 | |
| 重启(需 commands.restart: true) |
指令(会话级开关)
| 思考强度 | |
| 详细输出 | |
| 推理消息 | |
| 提升模式 | |
| 工具执行路由 |
Bash(默认关闭)
| 运行主机 shell(需 commands.bash: true) | |
| 查看/停止后台 bash 任务 |
工作区
工作区是智能体的「家」,会被读写并作为上下文。状态目录存放配置、凭证、会话和索引等运行数据。
默认位置
| 状态根目录 | |
| 默认工作区 | |
| 多 profile | |
| 开发隔离 |
关键工作区文件
AGENTS.md | 给智能体的高层指令(行为准则/目标) |
SOUL.md | 人设(身份、语气、边界) |
USER.md | 你的偏好/背景 |
IDENTITY.md | 身份信息(首次引导写入) |
TOOLS.md | 与当前机器/Skills 相关的环境笔记 |
HEARTBEAT.md | 心跳任务指令(主动模式) |
BOOTSTRAP.md | 仅全新工作区出现,用于首次问答;完成后删除 |
memory/YYYY-MM-DD.md | 每日记忆(仅追加);会话开始读今天+昨天 |
MEMORY.md | 长期记忆(可选;仅在私密主会话加载) |
openclaw setup路径参考
| 主配置(state) | |
| 凭证目录(state) | |
| 会话目录(state) | |
| 日志(默认) | |
| 记忆索引(SQLite) | |
| 定时任务 |
定时任务
任务存储在 ~/.openclaw/cron/jobs.json,Gateway 重启不丢。运行位置分 'main'(系统事件)或 'isolated'(独立会话)。
管理定时任务
openclaw cron list
openclaw cron status
openclaw cron add --name "Reminder" --at "20m" --session main --system-event "Reminder: ..." --wake now
openclaw cron run <jobId> --force
openclaw cron runs --id <jobId>故障排除
没有私信回复?
常见是配对/白名单问题
openclaw pairing list whatsapp
openclaw pairing approve whatsapp <code> --notify群组里不说话?
检查 routing.groupChat.mentionPatterns 和 requireMention 配置。发送 /status 测试。
网关状态不对?
运行深度诊断
openclaw doctor --deep
openclaw status --deep记忆搜索不对?
强制重建索引
openclaw memory index
openclaw memory status