OpenClaw 基础命令速查

AI摘要

OpenClaw CLI 常用命令指南,涵盖帮助查看、版本状态、Gateway服务启停、渠道登录管理、模型切换、记忆搜索、配置编辑、Dashboard访问、技能安装、节点连接、日志查看及服务管理等功能,支持多平台渠道与主流AI模型,并提供故障排查命令。

本文整理了 OpenClaw CLI 的常用命令,方便你快速查找和使用。

# 查看所有命令
openclaw --help

# 查看子命令帮助
openclaw gateway --help
openclaw channels --help

# 查看版本
openclaw --version

# 查看系统状态
openclaw status

# 启动 Gateway(前台运行)
openclaw gateway

# 指定端口启动
openclaw gateway --port 18789

# 检查 Gateway 状态
openclaw gateway status

# 启动系统服务
openclaw gateway start

# 停止系统服务
openclaw gateway stop

# 重启系统服务
openclaw gateway restart

# 查看所有渠道状态
openclaw channels

# 登录渠道(如 WhatsApp)
openclaw channels login whatsapp

# 登出渠道
openclaw channels logout telegram

# 重新登录
openclaw channels login --reconnect feishu

  • Telegram — Bot 模式
  • 飞书 — 自建应用
  • WhatsApp — 扫码登录
  • Discord — Bot 模式
  • 钉钉 — Stream 模式
  • Signal — 扫码登录

# 查看可用模型
openclaw models list

# 测试模型响应
openclaw models test

# 切换默认模型
openclaw models default zai/glm-5

别名 完整模型名
GLM zai/glm-5
Kimi moonshot/kimi-k2.5
Gemma ollama/gemma3:4b
Qwen ollama/qwen3.5:9b

# 搜索记忆
openclaw memory search "关键词"

# 查看记忆状态
openclaw memory status

# 清理过期记忆
openclaw memory cleanup

# 运行配置向导
openclaw onboard

# 查看当前配置
openclaw config show

# 编辑配置文件
openclaw config edit

# 验证配置
openclaw config validate

# 打开 Web UI
openclaw dashboard

# 指定端口
openclaw dashboard --port 3000

# 列出已安装技能
openclaw skills list

# 安装技能
openclaw skills install skill-name

# 更新技能
openclaw skills update skill-name

# 卸载技能
openclaw skills uninstall skill-name

# 查看节点状态
openclaw nodes status

# 扫描新节点
openclaw nodes scan

# 连接节点
openclaw nodes connect <node-id>

# 断开节点
openclaw nodes disconnect <node-id>

# 查看 Gateway 日志
journalctl --user -u openclaw-gateway -f

# 查看最近 100 行
journalctl --user -u openclaw-gateway -n 100

# 查看错误日志
journalctl --user -u openclaw-gateway -p err

# 安装系统服务
openclaw onboard --install-daemon

# 启用开机自启
systemctl --user enable openclaw-gateway

# 禁用开机自启
systemctl --user disable openclaw-gateway

# 检查端口占用
ss -tlnp | grep 18789

# 检查 Node 版本
node --version

# 检查配置文件语法
python -m json.tool ~/.openclaw/openclaw.json

# 测试网络连接
curl -v http://127.0.0.1:18789/health

OpenClaw 支持一些快捷别名:

别名 完整命令
openclaw g openclaw gateway
openclaw c openclaw channels
openclaw m openclaw models
openclaw s openclaw skills
openclaw n openclaw nodes


🎯 OpenClaw 系列文章 04 | 最后更新:2026-03-18

Saiita

我还没有学会写个人说明!

相关推荐

OpenClaw v2026.4.10:新增 Active Memory 自动记忆、Codex 原生支持、本地 MLX 语音

OpenClaw v2026.4.10版本带来了多项重要更新。核心亮点是全新的Active Memory插件,它能自动管理用户偏好和历史上下文,实现“无感记忆”,显著提升长期对话体验。同时,版本原生集成了Codex,方便开发者直接进行编程任务。针对macOS用户,新增了实验性的本地MLX语音支持,提供更低延迟和更好隐私的语音对话。其他更新还包括视频生成模型支持、Microsoft Teams功能增强、CLI

暂无评论