OpenClaw CLI 备忘单:命令参考与示例 - Openclaw Skills
作者:互联网
2026-03-30
什么是 OpenClaw CLI 备忘单?
OpenClaw CLI 备忘单是一项专门的技能,旨在让开发者和操作人员能够精确控制 OpenClaw 生态系统。作为权威知识库,它消除了执行复杂终端命令时的猜测,确保从会话管理到网关配置的每一次 CLI 交互都准确且安全。对于任何使用 Openclaw Skills 构建项目并需要高效管理基础设施、消息通道和模型回退的人来说,该工具都是基石。
该技能填补了原始文档与实际执行之间的鸿沟。它不仅是列出命令,还能理解开发者请求的上下文,从而提供特定任务所需的精确标志或子命令。无论您是通过定时任务自动化工作流还是诊断系统健康状况,该技能都能为专业操作提供所需的技术真相。
下载入口:https://github.com/openclaw/skills/tree/main/skills/teeddub/openclaw-cheatsheet
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install openclaw-cheatsheet
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 openclaw-cheatsheet。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
OpenClaw CLI 备忘单 应用场景
- 在运行网关重启或配置设置等操作变更前验证特定标志,以防止系统停机。
- 生成可直接复制粘贴的消息传递、定时任务管理或模型配置命令示例。
- 通过解释各种 CLI 子命令和全局选项的功能,帮助新开发者快速熟悉 OpenClaw 生态系统。
- 通过标准化的诊断命令审计系统健康状况、日志和网关状态。
- 该技能识别与 OpenClaw CLI 操作、标志验证或命令用法示例相关的用户查询。
- 它访问权威的 references/openclaw-cheatsheet.md 文件,以获取 2026.2.17+ 版本的最新语法。
- 它针对当前系统状态验证命令逻辑,确保标志是经过验证而非猜测的。
- 对于危险操作(如重置或卸载),它会拦截工作流并要求用户明确确认。
- 它提供简洁的响应,包括相关的命令章节、定制示例以及所用标志的技术说明。
OpenClaw CLI 备忘单 配置指南
要将此技能集成到您的工作流中,请确保项目结构中包含参考文档:
# 如果不存在,则创建 references 目录
mkdir -p references
# 确保该技能在您的 OpenClaw 环境中已激活
openclaw skills install openclaw-cheatsheet
# 通过提问一个 CLI 问题来测试该技能
openclaw agent "如何列出所有活动会话?"
OpenClaw CLI 备忘单 数据架构与分类体系
该技能将其参考数据组织到特定的功能域中,以便快速检索:
| 领域 | 命令范围 | 主要元数据 |
|---|---|---|
| 核心操作 | agent, message, sessions | 会话 ID,线程状态,成员角色 |
| 基础设施 | gateway, config, models, channels | API 密钥,模型别名,网关状态 |
| 自动化 | cron, hooks | 调度语法,挂钩状态,安装路径 |
| 诊断 | health, status, doctor, logs | 系统运行时间,错误代码,日志尾部 |
| 知识库 | obsidian | 笔记内容,搜索查询,元数据标签 |
name: openclaw-cheatsheet
description: Quick reference for every OpenClaw CLI command, sub-command, and flag. Use when the user asks about OpenClaw CLI usage (agent, message, config, gateway, cron, hooks, models, channels, directory, sessions, skills, agents, memory, health, status, doctor, logs), needs command examples, or needs to verify flags before running a command.
OpenClaw Cheatsheet
Primary reference: references/openclaw-cheatsheet.md
When to invoke
- User asks for an OpenClaw command, flag list, or usage example.
- User asks how to send messages, manage cron jobs, configure channels/models, run the gateway, etc.
- Before any operational change (
config set,gateway restart,cron add/edit,channels add/remove,models set,hooks install/enable). - User says "check the cheatsheet" or asks "what flags does X have?"
Rules
- Always read
references/openclaw-cheatsheet.mdbefore answering CLI questions — never guess flags. - If the cheatsheet doesn't cover a flag, verify with
openclaw.--help - Never run destructive or state-changing commands (
config set,gateway restart,cron rm,channels remove,reset,uninstall) without confirming with the user first. - Keep answers concise — surface only the sections relevant to the request.
Response pattern
- Pull the relevant section(s) from the cheatsheet.
- Provide 1-3 copy-paste-ready examples tailored to the user's context.
- For dangerous operations (restart, update, config change, delete, uninstall), include a warning line before the command.
- If the user is new, add a one-line explanation of what each flag does.
Coverage (sections in the cheatsheet)
| Section | Key sub-commands |
|---|---|
| Global Options | --dev, --profile, --no-color, -V |
| Agent | agent (run a single agent turn) |
| Message | send, read, edit, delete, search, broadcast, react, reactions, thread, pin/unpin/pins, poll, ban/kick/timeout, permissions, emoji, sticker, event, member, role, channel, voice |
| Config | get, set, unset, wizard |
| Sessions | sessions (list, filter by active/store) |
| Gateway | run, status, start/stop/restart, install/uninstall, discover, call, probe, usage-cost |
| Daemon | Legacy alias for gateway service management |
| Skills | list, info, check |
| Agents | list, add, delete, set-identity |
| Memory | search, index, status |
| Cron | add, edit, list, rm, run, runs, status, enable/disable |
| Hooks | list, info, enable/disable, install, check, update |
| Models | list, set, scan, status, aliases, auth, fallbacks/image-fallbacks |
| Channels | list, add, login/logout, remove, status, capabilities, resolve, logs |
| Directory | self, peers list, groups list, groups members |
| Health / Status / Doctor / Logs | diagnostics and log tailing |
| Obsidian | create, print, search, search-content, delete |
Reference
references/openclaw-cheatsheet.md— authoritative, kept up-to-date with OpenClaw 2026.2.17+
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
ACN:AI 智能体协作网络 - Openclaw Skills
微调:优化大语言模型 - Openclaw Skills
AI 治理政策生成器:企业 AI 合规框架 - Openclaw Skills
apiosk-publish:安全的 API 生命周期管理 - Openclaw Skills
obsidian-task: 通过 CLI 管理 Obsidian 任务 - Openclaw Skills
Latent Press:AI 智能体书籍出版 - Openclaw Skills
表情符号反应自动生成器:基于情感的表情建议 - Openclaw Skills
面向房产经纪人的 GHL CRM:GoHighLevel API 自动化 - Openclaw Skills
Tator Trader:自然语言加密交易 API - Openclaw Skills
依赖审计:使用 Openclaw Skills 保护您的项目
AI精选
