OpenClaw命令大全:常用命令速查手册

摘要

OpenClaw常用命令有哪些?本速查表汇集最常用的OpenClaw命令,包括安装、配置、部署、管理等,方便快速查阅。

基础命令

Code
# 查看帮助
openclaw --help

# 查看版本
openclaw --version

# 启动网关服务
openclaw gateway start

# 重启网关服务
openclaw gateway restart

# 停止网关服务
openclaw gateway stop

Agent 管理

Code
# 列出所有Agent
openclaw agents list

# 查看Agent绑定关系
openclaw agents list --bindings

# 添加新Agent
openclaw agents add <agent_id>

# 使用指定Agent进行对话
openclaw chat --agent <agent_id>

渠道管理

Code
# 查看所有渠道状态
openclaw channels status

# 测试渠道连接
openclaw channels status --probe

# 登录到渠道
openclaw channels login --channel <channel_name>

# 查看渠道详情
openclaw channels info --channel <channel_name>

会话管理

Code
# 列出所有会话
openclaw sessions list

# 查看指定会话详情
openclaw sessions info <session_id>

# 删除指定会话
openclaw sessions delete <session_id>

工具和文件管理

Code
# 创建新技能
openclaw skills create <skill_name>

# 列出现有技能
openclaw skills list

# 读取工作区文件
openclaw files read <file_path>

# 写入工作区文件
openclaw files write <file_path>

配置管理

Code
# 打开配置文件
openclaw config open

# 检查配置语法
openclaw config check

# 应用配置更改
openclaw config apply

日志与调试

Code
# 查看日志
openclaw logs

# 查看特定数量的日志
openclaw logs --tail 100

# 以调试模式启动
openclaw gateway start --debug

更新与维护

Code
# 更新OpenClaw
openclaw update

# 检查更新
openclaw update check

# 清理缓存
openclaw clean

同专题推荐