全面介绍 OpenClaw CLI 的所有常用命令,包括安装、配置、运行、调试等操作,帮助用户熟练掌握命令行工具。
OpenClaw CLI 是管理 Agent 的核心工具,提供从初始化到运行的全套命令。
# 查看版本
openclaw --version
# 查看帮助
openclaw --help
# 初始化新项目
openclaw init
# 检查配置
openclaw doctor
# 启动交互模式
openclaw run <agent-name>
# 启动 Web 服务
openclaw serve
# 查看 Agent 状态
openclaw status
# 启动 Gateway
openclaw gateway start
# 停止 Gateway
openclaw gateway stop
# 重启 Gateway
openclaw gateway restart
# 查看日志
openclaw logs
# 测试配置
openclaw config validate
使用 `openclaw init` 命令来初始化新项目。
使用 `openclaw run <agent-name>` 命令,将 `<agent-name>` 替换为实际的 Agent 名称。
使用 `openclaw gateway start` 启动服务,或使用 `openclaw gateway restart` 重启服务。
使用 `openclaw logs` 查看日志,使用 `openclaw config validate` 测试配置,或使用 `openclaw doctor` 检查配置。
人类专家验证
官方机器人验证