CLI 命令参考
> 📖 本文档翻译自 Hermes Agent 官方文档 > 最后更新:2026-04-16
CLI 命令参考
本页介绍从终端运行的命令行命令。
聊天内斜杠命令请参见斜杠命令参考。
全局入口
hermes [全局选项] <命令> [子命令/选项]
全局选项
| 选项 | 说明 |
|---|---|
--version、-V | 显示版本并退出。 |
--profile <名称>、-p <名称> | 选择本次调用使用的 Hermes 配置文件。覆盖 hermes profile use 设置的粘性默认值。 |
--resume <会话>、-r <会话> | 通过 ID 或标题恢复之前的会话。 |
--continue [名称]、-c [名称] | 恢复最近的会话,或恢复与标题匹配的最近会话。 |
--worktree、-w | 在隔离的 git worktree 中启动,用于并行 Agent 工作流。 |
--yolo | 跳过危险命令审批提示。 |
--pass-session-id | 在 Agent 的系统提示词中包含会话 ID。 |
顶级命令
| 命令 | 用途 |
|---|---|
hermes chat | 与 Agent 进行交互式或一次性对话。 |
hermes model | 交互式选择默认 Provider 和模型。 |
hermes gateway | 运行或管理消息网关服务。 |
hermes setup | 全部或部分配置的交互式设置向导。 |
hermes whatsapp | 配置和配对 WhatsApp 桥接。 |
hermes auth | 管理凭据——添加、列出、删除、重置、设置策略。处理 Codex/Nous/Anthropic 的 OAuth 流程。 |
hermes login / logout | 已弃用——请使用 hermes auth。 |
hermes status | 显示 Agent、认证和平台状态。 |
hermes cron | 检查和触发 Cron 调度器。 |
hermes webhook | 管理动态 Webhook 订阅,用于事件驱动激活。 |
hermes doctor | 诊断配置和依赖问题。 |
hermes dump | 可复制粘贴的配置摘要,用于支持/调试。 |
hermes debug | 调试工具——上传日志和系统信息以获取支持。 |
hermes backup | 将 Hermes 主目录备份为 zip 文件。 |
hermes import | 从 zip 文件恢复 Hermes 备份。 |
hermes logs | 查看、跟踪和过滤 Agent/网关/错误日志文件。 |
hermes config | 显示、编辑、迁移和查询配置文件。 |
hermes pairing | 批准或撤销消息配对码。 |
hermes skills | 浏览、安装、发布、审计和配置技能。 |
hermes honcho | 管理 Honcho 跨会话记忆集成。 |
hermes memory | 配置外部记忆 Provider。 |
hermes acp | 将 Hermes 作为 ACP 服务器运行,用于编辑器集成。 |
hermes mcp | 管理 MCP 服务器配置,并将 Hermes 作为 MCP 服务器运行。 |
hermes plugins | 管理 Hermes Agent 插件(安装、启用、禁用、删除)。 |
hermes tools | 按平台配置启用的工具。 |
hermes sessions | 浏览、导出、清理、重命名和删除会话。 |
hermes insights | 显示 Token/成本/活动分析。 |
hermes claw | OpenClaw 迁移辅助工具。 |
hermes dashboard | 启动 Web 仪表板,管理配置、API 密钥和会话。 |
hermes profile | 管理配置文件——多个隔离的 Hermes 实例。 |
hermes completion | 打印 Shell 补全脚本(bash/zsh)。 |
hermes version | 显示版本信息。 |
hermes update | 拉取最新代码并重新安装依赖。 |
hermes uninstall | 从系统中移除 Hermes。 |
hermes chat
hermes chat [options]
常用选项:
| 选项 | 说明 |
|---|---|
-q、--query "..." | 一次性非交互式提示。 |
-m、--model <模型> | 覆盖本次运行的模型。 |
-t、--toolsets <csv> | 启用逗号分隔的工具集。 |
--provider <provider> | 强制指定 Provider:auto、openrouter、nous、openai-codex、copilot-acp、copilot、anthropic、gemini、huggingface、zai、kimi-coding、minimax、minimax-cn、kilocode、xiaomi、arcee。 |
-s、--skills <名称> | 为会话预加载一个或多个技能(可重复或逗号分隔)。 |
-v、--verbose | 详细输出。 |
-Q、--quiet | 编程模式:隐藏 banner/spinner/工具预览。 |
--image <路径> | 将本地图片附加到单次查询。 |
--resume <会话> / --continue [名称] | 直接从 chat 恢复会话。 |
--worktree | 为本次运行创建隔离的 git worktree。 |
--checkpoints | 在破坏性文件变更前启用文件系统检查点。 |
--yolo | 跳过审批提示。 |
--pass-session-id | 将会话 ID 传入系统提示词。 |
--source <标签> | 用于过滤的会话来源标签(默认:cli)。对于不应出现在用户会话列表中的第三方集成使用 tool。 |
--max-turns <N> | 每次对话轮次的最大工具调用迭代次数(默认:90,或配置中的 agent.max_turns)。 |
示例:
hermes hermes chat -q "总结最新的 PR" hermes chat --provider openrouter --model anthropic/claude-sonnet-4.6 hermes chat --toolsets web,terminal,skills hermes chat --quiet -q "只返回 JSON" hermes chat --worktree -q "审查这个仓库并提交 PR"
hermes model
交互式 Provider + 模型选择器。这是添加新 Provider、设置 API 密钥和运行 OAuth 流程的命令。 请在终端中运行——而不是在活跃的 Hermes 聊天会话中。
hermes model
适用于以下场景:
- 添加新 Provider(OpenRouter、Anthropic、Copilot、DeepSeek、自定义等)
- 登录支持 OAuth 的 Provider(Anthropic、Copilot、Codex、Nous Portal)
- 输入或更新 API 密钥
- 从 Provider 特定的模型列表中选择
- 配置自定义/自托管端点
- 将新默认值保存到配置
hermes model 与 /model 的区别
hermes model(在终端中运行,不在任何 Hermes 会话内)是完整的 Provider 设置向导。它可以添加新 Provider、运行 OAuth 流程、提示输入 API 密钥以及配置端点。
/model(在活跃的 Hermes 聊天会话中输入)只能在已设置的 Provider 和模型之间切换。它不能添加新 Provider、运行 OAuth 或提示输入 API 密钥。
如果你需要添加新 Provider: 先退出 Hermes 会话(Ctrl+C 或 /quit),然后在终端提示符下运行 hermes model。
/model 斜杠命令(会话中)
在会话内切换已配置的模型:
/model # 显示当前模型和可用选项 /model claude-sonnet-4 # 切换模型(自动检测 Provider) /model zai:glm-5 # 切换 Provider 和模型 /model custom:qwen-2.5 # 使用自定义端点上的模型 /model custom # 从自定义端点自动检测模型 /model custom:local:qwen-2.5 # 使用命名的自定义 Provider /model openrouter:anthropic/claude-sonnet-4 # 切换回云端
默认情况下,/model 更改仅应用于当前会话。添加 --global 可将更改持久化到 config.yaml:
/model claude-sonnet-4 --global # 切换并保存为新默认值
如果我只看到 OpenRouter 模型怎么办?
如果你只配置了 OpenRouter,/model 将只显示 OpenRouter 模型。要添加其他 Provider(Anthropic、DeepSeek、Copilot 等),退出会话并在终端中运行 hermes model。
Provider 和 Base URL 更改会自动持久化到 config.yaml。切换离开自定义端点时,过期的 Base URL 会被清除,以防止泄露到其他 Provider。
hermes gateway
hermes gateway <子命令>
子命令:
| 子命令 | 说明 |
|---|---|
run | 在前台运行网关。推荐用于 WSL、Docker 和 Termux。 |
start | 启动已安装的 systemd/launchd 后台服务。 |
stop | 停止服务(或前台进程)。 |
restart | 重启服务。 |
status | 显示服务状态。 |
install | 安装为 systemd(Linux)或 launchd(macOS)后台服务。 |
uninstall | 移除已安装的服务。 |
setup | 交互式消息平台设置。 |
WSL 用户
使用 hermes gateway run 而不是 hermes gateway start——WSL 的 systemd 支持不可靠。用 tmux 包装以实现持久化:tmux new -s hermes 'hermes gateway run'。详情参见 WSL FAQ。
hermes setup
hermes setup [model|tts|terminal|gateway|tools|agent] [--non-interactive] [--reset]
使用完整向导或跳转到某个部分:
| 部分 | 说明 |
|---|---|
model | Provider 和模型设置。 |
terminal | 终端后端和沙盒设置。 |
gateway | 消息平台设置。 |
tools | 按平台启用/禁用工具。 |
agent | Agent 行为设置。 |
选项:
| 选项 | 说明 |
|---|---|
--non-interactive | 使用默认值/环境变量值,不弹出提示。 |
--reset | 在设置前将配置重置为默认值。 |
hermes whatsapp
hermes whatsapp
运行 WhatsApp 配对/设置流程,包括模式选择和二维码配对。
hermes login / hermes logout (已弃用)
注意
hermes login 已被移除。使用 hermes auth 管理 OAuth 凭据,使用 hermes model 选择 Provider,或使用 hermes setup 进行完整的交互式设置。
hermes auth
管理同 Provider 密钥轮换的凭据池。完整文档参见凭据池。
hermes auth # 交互式向导 hermes auth list # 显示所有池 hermes auth list openrouter # 显示特定 Provider hermes auth add openrouter --api-key sk-or-v1-xxx # 添加 API 密钥 hermes auth add anthropic --type oauth # 添加 OAuth 凭据 hermes auth remove openrouter 2 # 按索引删除 hermes auth reset openrouter # 清除冷却
子命令:add、list、remove、reset。不带子命令调用时,启动交互式管理向导。
hermes status
hermes status [--all] [--deep]
| 选项 | 说明 |
|---|---|
--all | 以可分享的脱敏格式显示所有详情。 |
--deep | 运行可能耗时更长的深度检查。 |
hermes cron
hermes cron <list|create|edit|pause|resume|run|remove|status|tick>
| 子命令 | 说明 |
|---|---|
list | 显示计划任务。 |
create / add | 从提示词创建计划任务,可通过重复 --skill 附加一个或多个技能。 |
edit | 更新任务的计划、提示词、名称、投递、重复次数或附加技能。支持 --clear-skills、--add-skill 和 --remove-skill。 |
pause | 暂停任务但不删除。 |
resume | 恢复暂停的任务并计算下次运行时间。 |
run | 在下次调度器滴答时触发任务。 |
remove | 删除计划任务。 |
status | 检查 Cron 调度器是否在运行。 |
tick | 运行到期任务一次后退出。 |
hermes webhook
hermes webhook <subscribe|list|remove|test>
管理用于事件驱动 Agent 激活的动态 Webhook 订阅。需要在配置中启用 Webhook 平台——如果未配置,会打印设置说明。
| 子命令 | 说明 |
|---|---|
subscribe / add | 创建 Webhook 路由。返回 URL 和 HMAC 密钥以配置到你的服务上。 |
list / ls | 显示所有 Agent 创建的订阅。 |
remove / rm | 删除动态订阅。config.yaml 中的静态路由不受影响。 |
test | 发送测试 POST 以验证订阅是否正常工作。 |
hermes webhook subscribe
hermes webhook subscribe <名称> [选项]
| 选项 | 说明 |
|---|---|
--prompt | 带有 {dot.notation} 载荷引用的提示词模板。 |
--events | 逗号分隔的接受事件类型(例如 issues,pull_request)。空 = 全部。 |
--description | 人类可读的描述。 |
--skills | 逗号分隔的技能名称,用于 Agent 运行时加载。 |
--deliver | 投递目标:log(默认)、telegram、discord、slack、github_comment。 |
--deliver-chat-id | 跨平台投递的目标聊天/频道 ID。 |
--secret | 自定义 HMAC 密钥。省略时自动生成。 |
订阅持久化到 ~/.hermes/webhook_subscriptions.json,Webhook 适配器热加载,无需重启网关。
hermes doctor
hermes doctor [--fix]
| 选项 | 说明 |
|---|---|
--fix | 尽可能尝试自动修复。 |
hermes dump
hermes dump [--show-keys]
输出整个 Hermes 配置的紧凑纯文本摘要。专为复制粘贴到 Discord、GitHub issues 或 Telegram 寻求支持而设计——没有 ANSI 颜色、没有特殊格式,只有数据。
| 选项 | 说明 |
|---|---|
--show-keys | 显示脱敏的 API 密钥前缀(前 4 位和后 4 位字符)而非仅显示 set/not set。 |
包含内容
| 部分 | 详情 |
|---|---|
| 头部 | Hermes 版本、发布日期、git commit hash |
| 环境 | 操作系统、Python 版本、OpenAI SDK 版本 |
| 身份 | 活跃的配置文件名称、HERMES_HOME 路径 |
| 模型 | 配置的默认模型和 Provider |
| 终端 | 后端类型(local、docker、ssh 等) |
| API 密钥 | 所有 22 个 Provider/工具 API 密钥的存在性检查 |
| 功能 | 启用的工具集、MCP 服务器数量、记忆 Provider |
| 服务 | 网关状态、已配置的消息平台 |
| 工作负载 | Cron 任务计数、已安装技能数 |
| 配置覆盖 | 任何与默认值不同的配置值 |
示例输出
--- hermes dump --- version: 0.8.0 (2026.4.8) [af4abd2f] os: Linux 6.14.0-37-generic x86_64 python: 3.11.14 openai_sdk: 2.24.0 profile: default hermes_home: ~/.hermes model: anthropic/claude-opus-4.6 provider: openrouter terminal: local
api_keys: openrouter set openai not set anthropic set nous not set firecrawl set ...
features: toolsets: all mcp_servers: 0 memory_provider: built-in gateway: running (systemd) platforms: telegram, discord cron_jobs: 3 active / 5 total skills: 42
config_overrides: agent.max_turns: 250 compression.threshold: 0.85 display.streaming: True --- end dump ---
使用场景
- 在 GitHub 上报告 bug——将 dump 粘贴到 issue 中
- 在 Discord 中寻求帮助——以代码块形式分享
- 将你的配置与他人的进行比较
- 出问题时快速检查
hermes dump 专为分享设计。交互式诊断请使用 hermes doctor。可视化概览请使用 hermes status。
hermes debug
hermes debug share [选项]
上传调试报告(系统信息 + 最近日志)到粘贴服务并获取可分享的 URL。适合快速支持请求——包含诊断问题所需的一切信息。
| 选项 | 说明 |
|---|---|
--lines <N> | 每个日志文件包含的行数(默认:200)。 |
--expire <天数> | 粘贴过期天数(默认:7)。 |
--local | 在本地打印报告而非上传。 |
报告包括系统信息(操作系统、Python 版本、Hermes 版本)、最近的 Agent 和网关日志(每个文件 512 KB 限制)以及脱敏的 API 密钥状态。密钥始终脱敏——不会上传任何密钥。
粘贴服务按顺序尝试:paste.rs、dpaste.com。
示例
hermes debug share # 上传调试报告,打印 URL hermes debug share --lines 500 # 包含更多日志行 hermes debug share --expire 30 # 保留粘贴 30 天 hermes debug share --local # 在终端打印报告(不上传)
hermes backup
hermes backup [选项]
创建 Hermes 配置、技能、会话和数据的 zip 归档。备份排除 hermes-agent 代码库本身。
| 选项 | 说明 |
|---|---|
-o、--output <路径> | zip 文件输出路径(默认:~/hermes-backup-<timestamp>.zip)。 |
-q、--quick | 快速快照:仅关键状态文件(config.yaml、state.db、.env、auth、cron 任务)。比完整备份快得多。 |
-l、--label <名称> | 快照标签(仅与 --quick 一起使用)。 |
备份使用 SQLite 的 backup() API 进行安全复制,即使在 Hermes 运行时也能正常工作(WAL 模式安全)。
示例
hermes backup # 完整备份到 ~/hermes-backup-*.zip hermes backup -o /tmp/hermes.zip # 完整备份到指定路径 hermes backup --quick # 快速仅状态快照 hermes backup --quick --label "pre-upgrade" # 带标签的快速快照
hermes import
hermes import <zip文件> [选项]
将之前创建的 Hermes 备份恢复到 Hermes 主目录。
| 选项 | 说明 |
|---|---|
-f、--force | 无需确认即覆盖现有文件。 |
hermes logs
hermes logs [日志名称] [选项]
查看、跟踪和过滤 Hermes 日志文件。所有日志存储在 ~/.hermes/logs/(非默认配置文件则为 <profile>/logs/)。
日志文件
| 名称 | 文件 | 记录内容 |
|---|---|---|
agent(默认) | agent.log | 所有 Agent 活动——API 调用、工具分发、会话生命周期(INFO 及以上) |
errors | errors.log | 仅警告和错误——agent.log 的过滤子集 |
gateway | gateway.log | 消息网关活动——平台连接、消息分发、Webhook 事件 |
选项
| 选项 | 说明 |
|---|---|
日志名称 | 要查看的日志:agent(默认)、errors、gateway,或 list 显示可用文件及大小。 |
-n、--lines <N> | 显示行数(默认:50)。 |
-f、--follow | 实时跟踪日志,类似 tail -f。按 Ctrl+C 停止。 |
--level <级别> | 最低日志级别:DEBUG、INFO、WARNING、ERROR、CRITICAL。 |
--session <ID> | 过滤包含会话 ID 子串的行。 |
--since <时间> | 显示从多久以前的日志:30m、1h、2d 等。支持 s(秒)、m(分钟)、h(小时)、d(天)。 |
--component <名称> | 按组件过滤:gateway、agent、tools、cli、cron。 |
示例
查看最近 50 行 agent.log(默认)
hermes logs
实时跟踪 agent.log
hermes logs -f
查看最近 100 行 gateway.log
hermes logs gateway -n 100
仅显示最近一小时的警告和错误
hermes logs --level WARNING --since 1h
按特定会话过滤
hermes logs --session abc123
跟踪 errors.log,从 30 分钟前开始
hermes logs errors --since 30m -f
列出所有日志文件及其大小
hermes logs list
过滤
过滤器可组合使用。当多个过滤器活跃时,日志行必须通过所有过滤器才会显示:
最近 2 小时内包含会话 "tg-12345" 的 WARNING+ 行
hermes logs --level WARNING --since 2h --session tg-12345
没有可解析时间戳的行在 --since 激活时会被包含(它们可能是多行日志条目的续行)。没有可检测级别的行在 --level 激活时会被包含。
日志轮转
Hermes 使用 Python 的 RotatingFileHandler。旧日志会自动轮转——查找 agent.log.1、agent.log.2 等。hermes logs list 子命令显示所有日志文件包括已轮转的。
hermes config
hermes config <子命令>
子命令:
| 子命令 | 说明 |
|---|---|
show | 显示当前配置值。 |
edit | 在编辑器中打开 config.yaml。 |
set <键> <值> | 设置配置值。 |
path | 打印配置文件路径。 |
env-path | 打印 .env 文件路径。 |
check | 检查缺失或过期的配置。 |
migrate | 交互式添加新引入的选项。 |
hermes pairing
hermes pairing <list|approve|revoke|clear-pending>
| 子命令 | 说明 |
|---|---|
list | 显示待审批和已批准的用户。 |
approve <平台> <配对码> | 批准配对码。 |
revoke <平台> <用户ID> | 撤销用户访问权限。 |
clear-pending | 清除待处理的配对码。 |
hermes skills
hermes skills <子命令>
子命令:
| 子命令 | 说明 |
|---|---|
browse | 技能注册表的分页浏览器。 |
search | 搜索技能注册表。 |
install | 安装技能。 |
inspect | 预览技能而不安装。 |
list | 列出已安装的技能。 |
check | 检查已安装的 Hub 技能是否有上游更新。 |
update | 有上游变更时重新安装 Hub 技能。 |
audit | 重新扫描已安装的 Hub 技能。 |
uninstall | 移除 Hub 安装的技能。 |
publish | 将技能发布到注册表。 |
snapshot | 导出/导入技能配置。 |
tap | 管理自定义技能源。 |
config | 按平台交互式启用/禁用技能配置。 |
常用示例:
hermes skills browse hermes skills browse --source official hermes skills search react --source skills-sh hermes skills search https://mintlify.com/docs --source well-known hermes skills inspect official/security/1password hermes skills inspect skills-sh/vercel-labs/json-render/json-render-react hermes skills install official/migration/openclaw-migration hermes skills install skills-sh/anthropics/skills/pdf --force hermes skills check hermes skills update hermes skills config
注意:
--force可以覆盖第三方/社区技能的非危险策略阻止。--force不会覆盖dangerous扫描判定。--source skills-sh搜索公共skills.sh目录。--source well-known让你指向暴露/.well-known/skills/index.json的站点。
hermes honcho
hermes honcho [--target-profile 名称] <子命令>
管理 Honcho 跨会话记忆集成。此命令由 Honcho 记忆 Provider 插件提供,仅在配置中设置 memory.provider 为 honcho 时可用。
--target-profile 标志让你管理另一个配置文件的 Honcho 配置而无需切换到它。
子命令:
| 子命令 | 说明 |
|---|---|
setup | 重定向到 hermes memory setup(统一设置路径)。 |
status [--all] | 显示当前 Honcho 配置和连接状态。--all 显示跨配置文件概览。 |
peers | 显示所有配置文件的 peer 身份。 |
sessions | 列出已知的 Honcho 会话映射。 |
map [名称] | 将当前目录映射到 Honcho 会话名称。省略 名称 列出当前映射。 |
peer | 显示或更新 peer 名称和辩证推理级别。选项:--user 名称、--ai 名称、--reasoning 级别。 |
mode [模式] | 显示或设置回忆模式:hybrid、context 或 tools。省略显示当前值。 |
tokens | 显示或设置上下文和辩证的 Token 预算。选项:--context N、--dialectic N。 |
identity [文件] [--show] | 种子化或显示 AI peer 身份表示。 |
enable | 为活跃配置文件启用 Honcho。 |
disable | 为活跃配置文件禁用 Honcho。 |
sync | 将 Honcho 配置同步到所有现有配置文件(创建缺失的 host 块)。 |
migrate | 从 openclaw-honcho 到 Hermes Honcho 的逐步迁移指南。 |
hermes memory
hermes memory <子命令>
设置和管理外部记忆 Provider 插件。可用 Provider:honcho、openviking、mem0、hindsight、holographic、retaindb、byterover、supermemory。同一时间只能激活一个外部 Provider。内置记忆(MEMORY.md/USER.md)始终激活。
子命令:
| 子命令 | 说明 |
|---|---|
setup | 交互式 Provider 选择和配置。 |
status | 显示当前记忆 Provider 配置。 |
off | 禁用外部 Provider(仅内置)。 |
hermes acp
hermes acp
将 Hermes 作为 ACP(Agent Client Protocol)stdio 服务器启动,用于编辑器集成。
相关入口点:
hermes-acp python -m acp_adapter
先安装支持:
pip install -e '.[acp]'
hermes mcp
hermes mcp <子命令>
管理 MCP(Model Context Protocol)服务器配置,并将 Hermes 作为 MCP 服务器运行。
| 子命令 | 说明 |
|---|---|
serve [-v|--verbose] | 将 Hermes 作为 MCP 服务器运行——向其他 Agent 暴露对话。 |
add <名称> [--url URL] [--command CMD] [--args ...] [--auth oauth|header] | 添加 MCP 服务器并自动发现工具。 |
remove <名称>(别名:rm) | 从配置中移除 MCP 服务器。 |
list(别名:ls) | 列出已配置的 MCP 服务器。 |
test <名称> | 测试与 MCP 服务器的连接。 |
configure <名称>(别名:config) | 切换服务器的工具选择。 |
参见 MCP 配置参考、在 Hermes 中使用 MCP和 MCP 服务器模式。
hermes plugins
hermes plugins [子命令]
统一插件管理——通用插件、记忆 Provider 和上下文引擎集于一处。不带子命令运行 hermes plugins 会打开一个包含两部分的复合交互界面:
- 通用插件——多选复选框启用/禁用已安装的插件
- Provider 插件——单选配置记忆 Provider 和上下文引擎。按 ENTER 在类别上打开单选选择器。
| 子命令 | 说明 |
|---|---|
| (无) | 复合交互式 UI——通用插件切换 + Provider 插件配置。 |
install <标识符> [--force] | 从 Git URL 或 owner/repo 安装插件。 |
update <名称> | 拉取已安装插件的最新更改。 |
remove <名称>(别名:rm、uninstall) | 移除已安装的插件。 |
enable <名称> | 启用已禁用的插件。 |
disable <名称> | 禁用插件但不移除。 |
list(别名:ls) | 列出已安装的插件及其启用/禁用状态。 |
Provider 插件选择保存到 config.yaml:
memory.provider——活跃的记忆 Provider(空 = 仅内置)context.engine——活跃的上下文引擎("compressor"= 内置默认值)
通用插件禁用列表存储在 config.yaml 的 plugins.disabled 中。
参见插件和构建 Hermes 插件。
hermes tools
hermes tools [--summary]
| 选项 | 说明 |
|---|---|
--summary | 打印当前启用工具摘要并退出。 |
不带 --summary 时,启动交互式按平台工具配置 UI。
hermes sessions
hermes sessions <子命令>
子命令:
| 子命令 | 说明 |
|---|---|
list | 列出最近的会话。 |
browse | 带搜索和恢复功能的交互式会话选择器。 |
export <输出> [--session-id ID] | 将会话导出为 JSONL。 |
delete <会话ID> | 删除一个会话。 |
prune | 删除旧会话。 |
stats | 显示会话存储统计。 |
rename <会话ID> <标题> | 设置或更改会话标题。 |
hermes insights
hermes insights [--days N] [--source 平台]
| 选项 | 说明 |
|---|---|
--days <n> | 分析最近 n 天(默认:30)。 |
--source <平台> | 按来源过滤,如 cli、telegram 或 discord。 |
hermes claw
hermes claw migrate [选项]
将 OpenClaw 配置迁移到 Hermes。从 ~/.openclaw(或自定义路径)读取,写入 ~/.hermes。自动检测旧版目录名(~/.clawdbot、~/.moltbot)和配置文件名(clawdbot.json、moltbot.json)。
| 选项 | 说明 |
|---|---|
--dry-run | 预览将要迁移的内容而不实际写入。 |
--preset <名称> | 迁移预设:full(默认,包含密钥)或 user-data(排除 API 密钥)。 |
--overwrite | 冲突时覆盖现有 Hermes 文件(默认:跳过)。 |
--migrate-secrets | 在迁移中包含 API 密钥(--preset full 时默认启用)。 |
--source <路径> | 自定义 OpenClaw 目录(默认:~/.openclaw)。 |
--workspace-target <路径> | 工作区指令(AGENTS.md)的目标目录。 |
--skill-conflict <模式> | 处理技能名称冲突:skip(默认)、overwrite 或 rename。 |
--yes | 跳过确认提示。 |
迁移内容
迁移覆盖 30+ 个类别,包括人格、记忆、技能、模型 Provider、消息平台、Agent 行为、会话策略、MCP 服务器、TTS 等。项目要么直接导入到 Hermes 等效项,要么归档以供手动审查。
直接导入: SOUL.md、MEMORY.md、USER.md、AGENTS.md、技能(4 个源目录)、默认模型、自定义 Provider、MCP 服务器、消息平台 Token 和允许列表(Telegram、Discord、Slack、WhatsApp、Signal、Matrix、Mattermost)、Agent 默认值(推理力度、压缩、人工延迟、时区、沙盒)、会话重置策略、审批规则、TTS 配置、浏览器设置、工具设置、执行超时、命令允许列表、网关配置以及来自 3 个源的 API 密钥。
归档供手动审查: Cron 任务、插件、钩子/Webhook、记忆后端(QMD)、技能注册表配置、UI/身份、日志、多 Agent 设置、频道绑定、IDENTITY.md、TOOLS.md、HEARTBEAT.md、BOOTSTRAP.md。
API 密钥解析按优先级检查三个来源:配置值 → ~/.openclaw/.env → auth-profiles.json。所有 Token 字段处理纯字符串、环境模板(${VAR})和 SecretRef 对象。
完整的配置键映射、SecretRef 处理详情和迁移后检查清单,参见**完整迁移指南**。
示例
预览将要迁移的内容
hermes claw migrate --dry-run
完整迁移,包含 API 密钥
hermes claw migrate --preset full
仅迁移用户数据(不含密钥),覆盖冲突
hermes claw migrate --preset user-data --overwrite
从自定义 OpenClaw 路径迁移
hermes claw migrate --source /home/user/old-openclaw
hermes dashboard
hermes dashboard [选项]
启动 Web 仪表板——基于浏览器的 UI,用于管理配置、API 密钥和监控会话。需要 pip install hermes-agent[web](FastAPI + Uvicorn)。完整文档参见 Web 仪表板。
| 选项 | 默认值 | 说明 |
|---|---|---|
--port | 9119 | Web 服务器端口 |
--host | 127.0.0.1 | 绑定地址 |
--no-open | — | 不自动打开浏览器 |
默认——打开浏览器访问 http://127.0.0.1:9119
hermes dashboard
自定义端口,不打开浏览器
hermes dashboard --port 8080 --no-open
hermes profile
hermes profile <子命令>
管理配置文件——多个隔离的 Hermes 实例,每个都有自己的配置、会话、技能和主目录。
| 子命令 | 说明 |
|---|---|
list | 列出所有配置文件。 |
use <名称> | 设置粘性默认配置文件。 |
create <名称> [--clone] [--clone-all] [--clone-from <源>] [--no-alias] | 创建新配置文件。--clone 从活跃配置文件复制配置、.env 和 SOUL.md。--clone-all 复制所有状态。--clone-from 指定源配置文件。 |
delete <名称> [-y] | 删除配置文件。 |
show <名称> | 显示配置文件详情(主目录、配置等)。 |
alias <名称> [--remove] [--name 名称] | 管理包装脚本以快速访问配置文件。 |
rename <旧名> <新名> | 重命名配置文件。 |
export <名称> [-o 文件] | 将配置文件导出为 .tar.gz 归档。 |
import <归档> [--name 名称] | 从 .tar.gz 归档导入配置文件。 |
示例:
hermes profile list hermes profile create work --clone hermes profile use work hermes profile alias work --name h-work hermes profile export work -o work-backup.tar.gz hermes profile import work-backup.tar.gz --name restored hermes -p work chat -q "Hello from work profile"
hermes completion
hermes completion [bash|zsh]
将 Shell 补全脚本打印到标准输出。在你的 Shell 配置文件中加载输出,以实现 Hermes 命令、子命令和配置文件名称的 Tab 补全。
示例:
Bash
hermes completion bash >> ~/.bashrc
Zsh
hermes completion zsh >> ~/.zshrc
维护命令
| 命令 | 说明 |
|---|---|
hermes version | 打印版本信息。 |
hermes update | 拉取最新更改并重新安装依赖。 |
hermes uninstall [--full] [--yes] | 移除 Hermes,可选择删除所有配置/数据。 |