版本:v1.0 | 适用版本:OpenClaw 2026.3.8+ | 更新日期:2026-03-11
🔰 新手入门(5 个命令开始)
openclaw onboard
openclaw status
openclaw skills list
openclaw gateway run
openclaw --help
📦 Gateway 管理
| 命令 | 说明 | 示例 |
|---|
gateway run | 运行 Gateway(前台) | openclaw gateway run |
gateway start | 启动服务(后台) | openclaw gateway start |
gateway stop | 停止服务 | openclaw gateway stop |
gateway restart | 重启服务 | openclaw gateway restart |
gateway status | 查看服务状态 | openclaw gateway status |
gateway health | 查看健康状态 | openclaw gateway health |
gateway run --force | 强制启动 | openclaw gateway run --force |
gateway run --port XXXX | 指定端口 | openclaw gateway run --port 18790 |
gateway run --verbose | 详细日志 | openclaw gateway run --verbose |
认证模式:
openclaw gateway run --auth token
openclaw gateway run --auth password
openclaw gateway run --token "xxx"
网络绑定:
openclaw gateway run --bind loopback
openclaw gateway run --bind lan
openclaw gateway run --bind tailnet
⚙️ 配置管理
| 命令 | 说明 | 示例 |
|---|
configure | 配置向导 | openclaw configure |
config get KEY | 查看配置 | openclaw config get models.default |
config set KEY VAL | 设置配置 | openclaw config set models.default bailian/qwen3.5-plus |
config unset KEY | 删除配置 | openclaw config unset models.default |
config file | 配置文件路径 | openclaw config file |
config validate | 验证配置 | openclaw config validate |
分章节配置:
openclaw configure --section workspace
openclaw configure --section model
openclaw configure --section gateway
openclaw configure --section channels
openclaw configure --section skills
🤖 模型管理
| 命令 | 说明 | 示例 |
|---|
models list | 列出模型 | openclaw models list |
models set ID | 设置默认模型 | openclaw models set bailian/qwen3.5-plus |
models status | 查看模型状态 | openclaw models status |
models set-image ID | 设置图像模型 | openclaw models set-image provider/model |
models scan | 扫描免费模型 | openclaw models scan |
模型别名:
openclaw models aliases list
openclaw models aliases set ALIAS ID
openclaw models aliases unset ALIAS
🧩 技能管理
| 命令 | 说明 | 示例 |
|---|
skills list | 列出技能 | openclaw skills list |
skills info NAME | 查看详情 | openclaw skills info news-search |
skills check | 检查状态 | openclaw skills check |
npx clawhub install NAME | 安装技能 | npx clawhub install news-search |
npx clawhub sync | 同步技能 | npx clawhub sync |
📅 Cron 任务管理
| 命令 | 说明 | 示例 |
|---|
cron list | 列出任务 | openclaw cron list |
cron add | 添加任务 | openclaw cron add |
cron run ID | 运行任务 | openclaw cron run job-001 |
cron enable ID | 启用任务 | openclaw cron enable job-001 |
cron disable ID | 禁用任务 | openclaw cron disable job-001 |
cron edit ID | 编辑任务 | openclaw cron edit job-001 |
cron rm ID | 删除任务 | openclaw cron rm job-001 |
cron runs ID | 运行历史 | openclaw cron runs job-001 |
cron status | 调度器状态 | openclaw cron status |
💾 记忆管理
| 命令 | 说明 | 示例 |
|---|
memory search QUERY | 搜索记忆 | openclaw memory search "会议纪要" |
memory index | 重新索引 | openclaw memory index |
memory index --force | 强制索引 | openclaw memory index --force |
memory status | 索引状态 | openclaw memory status |
memory status --deep | 深度检查 | openclaw memory status --deep |
memory status --json | JSON 输出 | openclaw memory status --json |
👥 会话管理
| 命令 | 说明 | 示例 |
|---|
sessions | 列出会话 | openclaw sessions |
sessions --active MIN | 活跃会话 | openclaw sessions --active 120 |
sessions --agent ID | 特定 Agent | openclaw sessions --agent work |
sessions --all-agents | 所有 Agent | openclaw sessions --all-agents |
sessions --json | JSON 输出 | openclaw sessions --json |
sessions cleanup | 清理会话 | openclaw sessions cleanup |
🔒 安全审计
| 命令 | 说明 | 示例 |
|---|
security audit | 安全审计 | openclaw security audit |
security audit --deep | 深度审计 | openclaw security audit --deep |
security audit --fix | 自动修复 | openclaw security audit --fix |
security audit --json | JSON 输出 | openclaw security audit --json |
approvals get | 查看批准 | openclaw approvals get |
approvals allowlist | 编辑允许列表 | openclaw approvals allowlist |
📊 健康检查
| 命令 | 说明 | 示例 |
|---|
doctor | 健康检查 | openclaw doctor |
health | Gateway 健康 | openclaw health |
gateway health | Gateway 健康 | openclaw gateway health |
gateway probe | 可达性检查 | openclaw gateway probe |
gateway discover | 发现网关 | openclaw gateway discover |
📝 日志查看
| 命令 | 说明 | 示例 |
|---|
logs | 查看日志 | openclaw logs |
--log-level LEVEL | 日志级别 | openclaw --log-level debug |
gateway run --verbose | 详细日志 | openclaw gateway run --verbose |
日志级别:silent < fatal < error < warn < info < debug < trace
🔄 系统管理
| 命令 | 说明 | 示例 |
|---|
status | 整体状态 | openclaw status |
update | 更新系统 | openclaw update |
reset | 重置配置 | openclaw reset |
backup | 备份状态 | openclaw backup |
uninstall | 卸载 | openclaw uninstall |
🌐 通道管理
| 命令 | 说明 | 示例 |
|---|
configure --section channels | 配置通道 | openclaw configure --section channels |
status | 查看状态 | openclaw status |
directory | 联系人/群组 | openclaw directory |
支持通道:Telegram, Discord, WhatsApp, 飞书,微信,Slack, Google Chat, MS Teams, Mattermost, IRC
🎯 常用工作流
快速启动
openclaw onboard --flow quickstart
完整配置
openclaw configure --section workspace
openclaw configure --section model
openclaw configure --section gateway
openclaw configure --section channels
openclaw configure --section skills
安全检查
openclaw security audit --deep
openclaw doctor
日常维护
openclaw status
openclaw skills check
openclaw gateway status
🆘 获取帮助
openclaw --help
openclaw [command] --help
openclaw docs
官方资源:
📋 目录结构
~/.openclaw/
├── workspace/
│ ├── MEMORY.md
│ ├── SOUL.md
│ ├── USER.md
│ ├── AGENTS.md
│ ├── TOOLS.md
│ ├── HEARTBEAT.md
│ ├── memory/
│ └── docs/
├── config/
└── state/
维护:小白 | 版本:v1.0 | 更新:2026-03-11