CLI 命令参考
本页面涵盖你从 shell 运行的终端命令。
关于应用内斜杠命令,请参阅斜杠命令参考。
全局入口点
hermes [全局选项] <命令> [子命令/选项]
全局选项
| 选项 | 描述 |
|---|---|
--version、-V | 显示版本并退出。 |
--profile <名称>、-p <名称> | 为此调用选择要使用的 Hermes 配置。覆盖 hermes profile use 设置的粘性默认值。 |
--resume <会话>、-r <会话> | 通过 ID 或标题恢复之前的会话。 |
--continue [名称]、-c [名称] | 恢复最近的会话,或恢复与标题匹配的最最近的会话。 |
--worktree、-w | 为并行 agent 工作流在隔离的 git worktree 中启动。 |
--yolo | 绕过危险命令批准提示。 |
--pass-session-id | 在 agent 的系统提示中包含会话 ID。 |
顶层命令
| 命令 | 用途 |
|---|---|
hermes chat | 与 agent 进行交互式或一次性聊天。 |
hermes model | 交互式选择默认提供商和模型。 |
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 | 配置外部记忆提供商。 |
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 debug | 调试工具 —— 上传日志和系统信息以获取支持。 |
hermes backup | 将 Hermes 主目录备份到 zip 文件。 |
hermes import | 从 zip 文件恢复 Hermes 备份。 |
hermes profile | 管理配置 —— 多个隔离的 Hermes 实例。 |
hermes completion | 打印 shell 补全脚本(bash/zsh)。 |
hermes version | 显示版本信息。 |
hermes update | 拉取最新代码并重新安装依赖。 |
hermes uninstall | 从系统移除 Hermes。 |
hermes chat
hermes chat [选项]
常用选项:
| 选项 | 描述 |
|---|---|
-q、--query "..." | 一次性、非交互式提示。 |
-m、--model <模型> | 覆盖此次运行的模型。 |
-t、--toolsets <csv> | 启用逗号分隔的工具集。 |
--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 | 编程模式:抑制横幅/旋转器/工具预览。 |
--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 "Summarize the latest PRs"
hermes chat --provider openrouter --model anthropic/claude-sonnet-4.6
hermes chat --toolsets web,terminal,skills
hermes chat --quiet -q "Return only JSON"
hermes chat --worktree -q "Review this repo and open a PR"
hermes model
交互式提供商 + 模型选择器。
hermes model
当你想要以下操作时使用:
- 切换默认提供商
- 在模型选择期间登录 OAuth 支持的提供商
- 从提供商特定的模型列表中选择
- 配置自定义/自托管端点
- 将新默认值保存到配置
/model 斜杠命令(会话中)
在不离开会话的情况下切换模型:
/model # 显示当前模型和可用选项
/model claude-sonnet-4 # 切换模型(自动检测提供商)
/model zai:glm-5 # 切换提供商和模型
/model custom:qwen-2.5 # 使用自定义端点上的模型
/model custom # 从自定义端点自动检测模型
/model custom:local:qwen-2.5 # 使用命名的自定义提供商
/model openrouter:anthropic/claude-sonnet-4 # 切换回云端
提供商和基础 URL 更改会自动持久化到 config.yaml。当从自定义端点切换走时,陈旧的基础 URL 会被清除以防止泄漏到其他提供商。
hermes gateway
hermes gateway <子命令>
子命令:
| 子命令 | 描述 |
|---|---|
run | 在前台运行网关。推荐用于 WSL、Docker 和 Termux。 |
start | 启动已安装的 systemd/launchd 后台服务。 |
stop | 停止服务(或前台进程)。 |
restart | 重启服务。 |
status | 显示服务状态。 |
install | 作为 systemd(Linux)或 launchd(macOS)后台服务安装。 |
uninstall | 移除已安装的服务。 |
setup | 交互式消息平台设置。 |
使用 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 | 提供商和模型设置。 |
terminal | 终端后端和沙箱设置。 |
gateway | 消息平台设置。 |
tools | 每个平台启用/禁用工具。 |
agent | Agent 行为设置。 |
选项:
| 选项 | 描述 |
|---|---|
--non-interactive | 使用默认值/环境值而不提示。 |
--reset | 在设置前重置配置为默认值。 |
hermes whatsapp
hermes whatsapp
运行 WhatsApp 配对/设置流程,包括模式选择和二维码配对。
hermes login / hermes logout (已弃用)
hermes login 已被移除。请使用 hermes auth 管理 OAuth 凭证,使用 hermes model 选择提供商,或使用 hermes setup 进行完整的交互式设置。
hermes auth
管理同一提供商密钥轮换的凭证池。见 凭证池 获取完整文档。
hermes auth # 交互式向导
hermes auth list # 显示所有池
hermes auth list openrouter # 显示特定提供商
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 | 在下一个调度器 tick 时触发作业。 |
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 | 删除动态订阅。配置中的静态路由不受影响。 |
test | 发送测试 POST 以验证订阅是否正常工作。 |
hermes webhook subscribe
hermes webhook subscribe <名称> [选项]
| 选项 | 描述 |
|---|---|
--prompt | 带有 {dot.notation} payload 引用的提示模板。 |
--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 个字符),而不是仅显示 set/not set。 |
它包含的内容
| 部分 | 详情 |
|---|---|
| Header | Hermes 版本、发布日期、git commit hash |
| Environment | OS、Python 版本、OpenAI SDK 版本 |
| Identity | 活动配置名称、HERMES_HOME 路径 |
| Model | 配置的默认模型和提供商 |
| Terminal | 后端类型(本地、docker、ssh 等) |
| API keys | 所有 22 个提供商/工具 API 密钥的存在性检查 |
| Features | 启用的工具集、MCP 服务器数量、记忆提供商 |
| Services | 网关状态、配置的消息平台 |
| Workload | Cron 作业计数、已安装技能计数 |
| Config overrides | 任何与默认值不同的配置值 |
示例输出
--- 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 上报告错误 —— 将 dump 粘贴到你的 issue
- 在 Discord 中寻求帮助 —— 在代码块中分享
- 将你的设置与别人的进行比较
- 当某些东西不工作时的快速完整性检查
hermes dump 是专门为分享设计的。对于交互式诊断,使用 hermes doctor。对于可视化概述,使用 hermes status。
hermes debug
hermes debug share [选项]
上传调试报告(系统信息 + 最新日志)到粘贴服务并获取可分享的 URL。对快速支持请求很有用 —— 包含帮助者诊断问题所需的一切。
| 选项 | 描述 |
|---|---|
--lines <N> | 每个日志文件包含的日志行数(默认:200)。 |
--expire <天数> | 粘贴过期天数(默认:7)。 |
--local | 在本地打印报告而不是上传。 |
报告包括系统信息(OS、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 <zipfile> [选项]
将之前创建的 Hermes 备份恢复到你的 Hermes 主目录。
| 选项 | 描述 |
|---|---|
-f、--force | 无需确认即覆盖现有文件。 |
hermes logs
hermes logs [log_name] [选项]
查看、跟踪和过滤 Hermes 日志文件。所有日志存储在 ~/.hermes/logs/(或非默认配置文件的 <profile>/logs/)。
日志文件
| 名称 | 文件 | 捕获内容 |
|---|---|---|
agent(默认) | agent.log | 所有 agent 活动 —— API 调用、工具调度、会话生命周期(INFO 级及以上) |
errors | errors.log | 仅警告和错误 —— agent.log 的过滤子集 |
gateway | gateway.log | 消息网关活动 —— 平台连接、消息调度、webhook 事件 |
选项
| 选项 | 描述 |
|---|---|
log_name | 查看哪个日志: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。 |
示例
# 查看 agent.log 的最后 50 行(默认)
hermes logs
# 实时跟踪 agent.log
hermes logs -f
# 查看 gateway.log 的最后 100 行
hermes logs gateway -n 100
# 仅显示最近一小时的警告和错误
hermes logs --level WARNING --since 1h
# 按特定会话过滤
hermes logs --session abc123
# 从 30 分钟前开始跟踪 errors.log
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让你将 Hermes 指向暴露/.well-known/skills/index.json的站点
hermes honcho
hermes honcho [--target-profile NAME] <子命令>
管理 Honcho 跨会话记忆集成。此命令由 Honcho 记忆提供商插件提供,仅当你的配置中 memory.provider 设置为 honcho 时可用。
--target-profile 标志让你管理另一个配置文件的 Honcho 配置而无需切换到它。
子命令:
| 子命令 | 描述 |
|---|---|
setup | 重定向到 hermes memory setup(统一设置路径)。 |
status [--all] | 显示当前 Honcho 配置和连接状态。--all 显示跨配置文件概览。 |
peers | 显示所有配置文件中的对等身份。 |
sessions | 列出已知的 Honcho 会话映射。 |
map [名称] | 将当前目录映射到 Honcho 会话名称。省略 名称 以列出当前映射。 |
peer | 显示或更新对等名称和辩证推理级别。选项:--user 名称、--ai 名称、--reasoning 级别。 |
mode [模式] | 显示或设置召回模式:hybrid、context 或 tools。省略以显示当前。 |
tokens | 显示或设置 context 和 dialectic 的 token 预算。选项:--context N、--dialectic N。 |
identity [文件] [--show] | 种子或显示 AI 对等身份表示。 |
enable | 为活动配置文件启用 Honcho。 |
disable | 为活动配置文件禁用 Honcho。 |
sync | 将 Honcho 配置同步到所有现有配置文件(创建缺失的主机块)。 |
migrate | 从 openclaw-honcho 到 Hermes Honcho 的分步迁移指南。 |
hermes memory
hermes memory <子命令>
设置和管理外部记忆提供商插件。可用提供商:honcho、openviking、mem0、hindsight、holographic、retaindb、byterover、supermemory。一次只能激活一个外部提供商。内置记忆(MEMORY.md/USER.md)始终激活。
子命令:
| 子命令 | 描述 |
|---|---|
setup | 交互式提供商选择和配置。 |
status | 显示当前记忆提供商配置。 |
off | 禁用外部提供商(仅内置)。 |
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]` |
add <名称> [--url URL] [--command CMD] [--args ...] [--auth oauth|header] | 添加具有自动工具发现的 MCP 服务器。 |
remove <名称>(别名:rm) | 从配置中移除 MCP 服务器。 |
list(别名:ls) | 列出配置的 MCP 服务器。 |
test <名称> | 测试到 MCP 服务器的连接。 |
configure <名称>(别名:config) | 切换服务器的工具选择。 |
见 MCP 配置参考、将 MCP 与 Hermes 结合使用 和 MCP 服务器模式。
hermes plugins
hermes plugins [子命令]
统一插件管理 —— 一般插件、记忆提供商和上下文引擎合在一处。运行不带子命令的 hermes plugins 会打开一个复合交互式屏幕,有两个部分:
- 一般插件 —— 多选复选框用于启用/禁用已安装插件
- 提供商插件 —— 记忆提供商和上下文引擎的单选配置。在类别上按 ENTER 打开单选选择器。
| 子命令 | 描述 |
|---|---|
| (无) | 复合交互式 UI —— 一般插件切换 + 提供商插件配置。 |
install <标识符> [--force] | 从 Git URL 或 owner/repo 安装插件。 |
update <名称> | 为已安装插件拉取最新更改。 |
remove <名称>(别名:rm、uninstall) | 移除已安装的插件。 |
enable <名称> | 启用已禁用的插件。 |
disable <名称> | 禁用插件而不移除。 |
list(别名:ls) | 列出已安装的插件及其启用/禁用状态。 |
提供商插件选择保存到 config.yaml:
memory.provider—— 活动的记忆提供商(空 = 仅内置)context.engine—— 活动的上下文引擎("compressor"= 内置默认)
一般插件禁用列表存储在 config.yaml 的 plugins.disabled 下。
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+ 类别,包括 persona、记忆、技能、模型提供商、消息平台、agent 行为、会话策略、MCP 服务器、TTS 等。项目直接导入到 Hermes 等效项或存档供手动审查。
直接导入: SOUL.md、MEMORY.md、USER.md、AGENTS.md、技能(4 个源目录)、默认模型、自定义提供商、MCP 服务器、消息平台令牌和允许列表(Telegram、Discord、Slack、WhatsApp、Signal、Matrix、Mattermost)、agent 默认(推理努力、压缩、人为延迟、时区、沙箱)、会话重置策略、批准规则、TTS 配置、浏览器设置、工具设置、exec 超时、命令允许列表、网关配置以及 3 个来源的 API 密钥。
存档供手动审查: Cron 作业、插件、hooks/webhooks、记忆后端(QMD)、技能注册表配置、UI/identity、日志记录、多 agent 设置、通道绑定、IDENTITY.md、TOOLS.md、HEARTBEAT.md、BOOTSTRAP.md。
API 密钥解析按优先级顺序检查三个来源:配置值 → ~/.openclaw/.env → auth-profiles.json。所有令牌字段处理纯字符串、环境模板(${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 FILE] | 将配置导出到 .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 补全脚本到 stdout。在你的 shell 配置文件中获取输出以获得 Hermes 命令、子命令和配置文件名的标签补全。
示例:
# Bash
hermes completion bash >> ~/.bashrc
# Zsh
hermes completion zsh >> ~/.zshrc
维护命令
| 命令 | 描述 |
|---|---|
hermes version | 打印版本信息。 |
hermes update | 拉取最新更改并重新安装依赖。 |
hermes uninstall [--full] [--yes] | 移除 Hermes,可选择删除所有配置/数据。 |