| 命令 | 描述 | 示例/备注 |
|---|---|---|
curl -fsSL https://openclaw.ai/install.sh | bash | (macOS/Linux) 官方脚本 | 一键运行 |
iwr -useb https://openclaw.ai/install.ps1 | iex | (Windows PowerShell) 官方脚本 | 管理员权限 |
npm install -g @qingchencloud/openclaw-zh@latest | 国内汉化版 npm 安装 | 需 Node.js |
openclaw onboard --install-daemon | 首次运行首选 交互式向导 | 完成初始化 |
openclaw dashboard | 打开网页控制台 | http://127.0.0.1:18789 |
openclaw --help | 列出所有命令 | 帮助 |
| 命令 | 描述 | 示例 |
|---|---|---|
openclaw gateway start | 后台启动(生产推荐) | 守护模式 |
openclaw gateway stop | 停止后台服务 | 停止 |
openclaw gateway restart | 重启网关 | 配置生效 |
openclaw gateway status | 查看状态 | 监控 |
openclaw gateway run | 前台运行(调试) | 实时日志 |
openclaw gateway install | 安装为系统服务 | 开机自启 |
systemctl --user restart openclaw-gateway | (Linux) systemctl 管理 | Linux |
| 命令 | 描述 | 备注 |
|---|---|---|
openclaw doctor --fix | 自动检测并修复常见问题 | 救急神器 |
openclaw backup create | 创建配置、会话和工作空间的备份 | 卸载/重装前推荐执行 |
openclaw logs --follow | 持续输出实时日志 | 追踪问题 |
journalctl --user -u openclaw-gateway.service -f | (Linux) 系统日志 | Linux |
openclaw update | 更新 CLI | 保持最新 |
openclaw models list | 列出已配置模型 | 模型清单 |
openclaw models set <模型名> | 切换默认模型 | 切换 |
openclaw tui | 终端内文字聊天 | 纯 CLI |
openclaw devices list | 列出待授权设备 | 扫码设备 |
openclaw devices approve <requestId> | 批准设备连接 | 授权 |
openclaw uninstall | 卸载 OpenClaw(移除服务、配置) | 建议先备份 |
📌 彻底移除 CLI 命令行工具: 如果需要从系统中移除 openclaw 命令本身(而非仅卸载服务),请以 管理员身份打开 PowerShell,根据你安装的版本执行对应命令:
npm uninstall -g openclaw-cn (国内汉化版)npm uninstall -g openclaw (国际版)npm uninstall -g @qingchencloud/openclaw-zh (另一种汉化包)💡 提示:openclaw uninstall 仅移除应用数据和后台服务,而 npm 卸载会删除 CLI 命令本身。两者结合可彻底清理。
| 命令 | 描述 |
|---|---|
openclaw skills list | 查看已安装技能 |
openclaw skills add <skill_名称> | 安装新技能 |
openclaw plugins list | 查看已安装插件 |
openclaw plugins install <插件地址> | 安装插件 |
~/.openclaw/openclaw.jsonnano ~/.openclaw/openclaw.json
📁 可在该文件中精细控制 Gateway、Models、Channels、Agents、Skills 等模块。
🐣 新手速成路线
openclaw onboard --install-daemon —— 初始化openclaw dashboard —— 打开图形界面openclaw doctor --fix —— 遇到问题先自检openclaw logs --follow —— 看日志定位复杂问题openclaw backup create —— 重要操作前先备份💡 掌握这些,你已经可以熟练驾驭 OpenClaw!