跳到正文
📖 新手完全指南 · 第 10 章 入门

命令速查表:最常用的 openclaw 命令一页搞定

整理 openclaw CLI 核心命令、斜杠命令、配置项速查,收藏备用随时查阅。

⏱ 5 分钟 🔧 入门
🎖️ 任务奖励 — 学完你能做到

熟练使用 /status、/model、/skills 等日常管理命令

📖 本章目标:常用命令一页搞定,随时查阅


📦 安装与更新

# 全局安装 OpenClaw
npm install -g openclaw@latest

# 运行初始化安装向导
openclaw onboard --install-daemon

# 更新到最新版本
openclaw update

🔧 网关管理

# 启动网关
openclaw gateway start

# 停止网关
openclaw gateway stop

# 重启网关(修改配置后必须重启)
openclaw gateway restart

# 查看运行状态
openclaw status

🩺 诊断与日志

# 环境诊断(新手遇到问题先跑这个)
openclaw doctor

# 查看实时日志
openclaw logs

# 查看最近 100 行日志
openclaw logs --lines 100

📡 渠道管理

# 添加新渠道(交互式向导)
openclaw channels add

# 列出已配置的渠道
openclaw channels list

# 配对批准(批准用户使用)
openclaw pairing approve <> <配对>

# 启用渠道插件
openclaw plugins enable <插件>

# 安装第三方插件
openclaw plugins install <插件包>

🎯 Skills 管理

# 安装 Skill
openclaw skills install <>

# 查看所有可用 Skills
openclaw skills list

# 查看符合当前环境的 Skills
openclaw skills list --eligible

# 查看 Skill 详细信息
openclaw skills info <>

# 更新 Skill 到最新版本
openclaw skills update <>

# 卸载 Skill
openclaw skills remove <>

# 搜索 ClawHub 技能市场
openclaw skills search <关键>

🤖 Agent 管理

# 列出所有 Agent
openclaw agents list

# 查看 Agent 状态
openclaw agents status <agent-id>

# 重载 Agent 配置(修改 AGENTS.md 后)
openclaw agents reload <agent-id>

📊 常用组合场景

场景一:首次安装完整流程

# 1. 安装
npm install -g openclaw@latest

# 2. 初始化
openclaw onboard --install-daemon

# 3. 验证安装
openclaw status
openclaw doctor

场景二:修改配置后重启

# 修改配置文件后
openclaw gateway restart
openclaw status  # 确认正常运行

场景三:遇到问题排查

# 步骤一:环境检测
openclaw doctor

# 步骤二:查看日志
openclaw logs

# 步骤三:重启服务
openclaw gateway restart

# 步骤四:更新版本(可能是 Bug)
openclaw update

场景四:安装新技能

# 搜索技能
openclaw skills search 浏览器

# 查看详情
openclaw skills info agent-browser

# 安装
openclaw skills install agent-browser

# 重启生效
openclaw gateway restart

🗂️ 配置文件路径速查

文件路径说明
全局配置~/.openclaw/openclaw.jsonAPI Key、模型、渠道配置
Agent 工作区~/.openclaw-{id}/workspace/各 Agent 独立目录
全局 Skills~/.openclaw/skills/用户级技能
内置 Skillsnpm 包目录官方内置技能
日志~/.openclaw/logs/运行日志

⌨️ 快捷参考卡

openclaw status          → 查状态
openclaw doctor          → 诊断问题
openclaw gateway restart → 重启服务
openclaw update          → 更新版本
openclaw logs            → 查日志

← 上一章:常见问题FAQ | 返回目录 | 附录:资源链接 →