【自用】龙虾(OpenClaw)和爱马仕(Hermes)命令收集【持续更新】
为什么写这篇
OpenClaw 和 Hermes 是我用得最多的两个终端 AI Agent 工具。它们的命令很多,官方文档虽然全,但翻起来慢。这篇文章只记我反复敲过的命令,附带一两句使用心得,算是给自己和同路人的速查卡。
两个工具的定位不一样:OpenClaw 更像一个全栈 AI 网关,能接多个聊天平台、管模型、跑浏览器自动化;Hermes 更聚焦在个人私有场景,worktree 隔离、技能系统、上下文管理做得更细。我日常两个都用,场景互补。
OpenClaw 常用命令
日常启动与健康检查
# 启动
openclaw
# 健康检查——环境有问题先跑这个
openclaw doctor openclaw doctor --fix
# 看状态 openclaw status openclaw status --deep
# 看日志 openclaw logs
doctor --fix 能自动修大部分环境问题,比手动排查快很多。
网关管理
# 启动网关
openclaw gateway
# 指定端口(默认端口被占用时)
openclaw gateway --port 8080
# 调试模式
openclaw gateway --verbose
网关是 OpenClaw 的核心,所有消息通道都走它。遇到消息收不到的情况,先 gateway restart 试试。
模型切换
# 查看可用模型
openclaw models list
# 切换默认模型
openclaw models set provider/model-name
# 认证模型提供商
openclaw models auth login --provider openai
通道(Channel)管理
# 查看已接入的平台
openclaw channels list
openclaw channels status
# 添加新通道
openclaw channels add
# 查看消息日志
openclaw channels logs
技能与插件
# 本地技能
openclaw skills list
openclaw skills install <skill-name>
# 社区技能商店
clawhub search <关键词> clawhub install <skill-name>
clawhub update
聊天斜杠命令(在对话中使用)
|
|
|
|
|---|---|---|
/new |
|
|
/compact |
|
|
/model |
|
|
/approve |
|
|
/deny |
|
|
/cancel |
|
|
/undo |
|
|
/memory |
|
|
/forget |
|
|
/cost |
|
|
/sessions list |
|
|
/sessions spawn |
|
|
浏览器自动化
openclaw browser open <url>
openclaw browser snapshot
openclaw browser screenshot
openclaw browser click <selector>
openclaw browser type <selector> "内容"
openclaw browser close
这套命令适合做一些简单的网页自动化,比如批量截图、自动填表。
Hermes 常用命令
日常启动
# 启动交互对话
hermes
# 单次提问(不进入交互模式)
hermes chat -q "帮我写一个 Python 快排"
# 指定模型 hermes chat -q "问题" --model gpt-4o --provider
openai
# 预加载技能
hermes -s <skill-name>
-q 是我最常用的,配合 shell alias 可以快速问答一个问题而不进入完整的交互界面。
会话恢复
# 继续最近一次对话
hermes --continue hermes -c
# 恢复指定会话
hermes --resume <session-id> hermes -r <session-id>
Hermes 的会话恢复做得比 OpenClaw 更细,可以按 ID 精确恢复。
Worktree 隔离(多 Agent 并行)
# 在隔离的 git worktree 中启动
hermes -w
这是 Hermes 的杀手级功能。多个 Agent 各跑一个 worktree,互不干扰,适合并行处理多个独立任务。
模型与配置
# 交互式切换模型
hermes model
# 配置向导
hermes setup
# 查看/编辑配置
hermes config
# 管理多配置文件
hermes profile
hermes profile create <name>
hermes profile switch <name>
profile 功能很实用——不同项目用不同配置(不同模型、不同工具集),切换一行搞定。
系统维护
# 状态检查
hermes status
# 健康诊断
hermes doctor
# 导出环境信息(求助时贴给社区)
hermes dump
# 查看日志
hermes logs hermes logs --session <session-id>
聊天斜杠命令
|
|
|
|
|---|---|---|
/compress |
|
|
/model |
|
|
/tools |
|
|
/skills browse |
|
|
/background |
|
|
/reasoning |
|
|
/usage |
|
|
/title |
|
|
/verbose |
|
|
/skin |
|
|
定时任务
# 管理定时任务
hermes cron hermes cron list
hermes cron pause <job-id>
hermes cron run <job-id>
数据与备份
# 导出会话
hermes sessions export
# 完整备份
hermes backup
# 恢复备份
hermes import <backup-file>
两者对比速查
|
|
|
|
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/compact |
/compress |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
我的日常组合
我个人的用法是这样的:
需要接多个聊天平台、做消息转发、跑浏览器自动化时,用 OpenClaw。它的网关和通道系统是核心优势。
纯编码场景——写代码、改 Bug、做重构——用 Hermes。worktree 隔离 + 精确会话恢复 + profile 切换,编码体验更顺。
两个工具的技能系统可以互通,Hermes 有 claw 命令可以直接导入 OpenClaw 的配置和凭证。
这篇文章会持续更新。有新命令或者发现更好用的用法,我会补上来。觉得有用可以先收藏,后面回来翻。
夜雨聆风