如果你正在使用OpenClaw这款AI Agent工具肯定会遇到需要敲命令的场景,今天我整理了一份最常用的命令清单,覆盖了日常使用的大部分场景,建议收藏备用~
一、Gateway 管理命令
Gateway是OpenClaw的核心服务,相当于整个系统的大脑,下面这些命令你一定用得着:
openclaw gateway run # 前台运行Gateway openclaw gateway start # 启动Gateway服务 openclaw gateway stop # 停止Gateway服务 openclaw gateway status # 查看Gateway状态 openclaw gateway restart # 重启Gateway服务常用参数:
--port 18789 # 指定端口 --force # 强制启动,杀掉占用端口的进程 --bind lan # 局域网模式,允许其他设备访问 --tailscale serve # 通过Tailscale暴露到公网二、状态查看命令
快速了解系统运行状态:
openclaw status # 查看通道状态和最近会话 openclaw status --all # 完整诊断信息 openclaw status --deep # 深度检测各通道 openclaw status --json # JSON格式输出 openclaw status --usage # 查看模型配额使用 openclaw health # 检查Gateway健康状态 openclaw logs # 查看Gateway日志三、消息发送命令
这是最常用的功能之一,快速给指定用户或群组发送消息:
# 发送消息到WhatsApp openclaw message send --target +15555550123 --message "你好" # 发送到Telegram openclaw message send --channel telegram --target @username --message "Hi" # 发送到Discord openclaw message send --channel discord --target channel_id --message "Hello" # 发送图片 openclaw message send --target +15555550123 --image /path/to/image.jpg四、通道管理命令
配置和管理各种聊天通道:
openclaw channels login whatsapp # 登录WhatsApp openclaw channels login telegram # 登录Telegram openclaw channels login discord # 登录Discord openclaw channels list # 查看已连接的通道 openclaw channels info whatsapp # 查看WhatsApp连接状态五、节点与设备管理
管理连接到Gateway的设备:
openclaw nodes list # 查看已配对的设备 openclaw node status # 查看节点状态 openclaw devices qr # 生成设备配对二维码 openclaw devices pair # 配对新设备六、技能与插件管理
openclaw skills list # 查看已安装的技能 openclaw plugins list # 查看已加载的插件 openclaw plugins install # 安装插件 openclaw plugins uninstall # 卸载插件七、模型配置
openclaw models list # 列出可用的模型 openclaw models scan # 扫描并配置模型 openclaw models set-default # 设置默认模型八、其他实用命令
openclaw configure # 交互式配置向导 openclaw dashboard # 打开Web控制台 openclaw doctor # 健康检查和修复 openclaw docs # 打开官方文档 openclaw update check # 检查更新📌 小贴士:大部分命令都支持 --help 参数,忘记用法时随时查看,比如 openclaw gateway --help 会列出所有Gateway相关命令的详细用法。
---
觉得有用的话,点个赞再走~
#OpenClaw #AI工具 #命令行
夜雨聆风