CLI 命令参考
本页介绍您在终端中运行的命令行指令。
有关聊天中的斜杠命令,请参阅 斜杠命令参考。
全局入口点
hermes [global-options] <command> [subcommand/options]
全局选项
| 选项 | 描述 |
|---|---|
--version, -V | 显示版本号并退出。 |
--profile <name>, -p <name> | 为本次调用选择要使用的 Hermes 配置文件。覆盖由 hermes profile use 设置的持久默认值。 |
--resume <session>, -r <session> | 通过 ID 或标题恢复之前的会话。 |
--continue [name], -c [name] | 恢复最近一次会话,或与标题匹配的最近一次会话。 |
--worktree, -w | 在隔离的 git 工作树中启动,用于并行代理工作流。 |
--yolo | 跳过危险命令的确认提示。 |
--pass-session-id | 将会话 ID 包含在代理的系统提示中。 |
顶层命令
| 命令 | 用途 |
|---|---|
hermes chat | 与代理进行交互式或单次对话。 |
hermes model | 交互式选择默认提供方和模型。 |
hermes gateway | 运行或管理消息网关服务。 |
hermes setup | 交互式设置向导,用于配置全部或部分设置。 |
hermes whatsapp | 配置并配对 WhatsApp 桥接。 |
hermes auth | 管理凭证 —— 添加、列出、删除、重置、设置策略。处理 Codex/Nous/Anthropic 的 OAuth 流程。 |
hermes login / logout | 已弃用 —— 请改用 hermes auth。 |
hermes status | 显示代理、认证和平台状态。 |
hermes cron | 检查并触发定时任务调度器。 |
hermes webhook | 管理动态 webhook 订阅,以实现事件驱动激活。 |
hermes doctor | 诊断配置和依赖问题。 |
hermes dump | 复制粘贴式的设置摘要,用于支持/调试。 |
hermes logs | 查看、实时追踪和过滤代理/网关/错误日志文件。 |
hermes config | 显示、编辑、迁移和查询配置文件。 |
hermes pairing | 批准或撤销消息配对码。 |
hermes skills | 浏览、安装、发布、审计和配置技能。 |
hermes honcho | 管理 Honcho 跨会话记忆集成。 |
hermes memory | 配置外部记忆提供方。 |
hermes acp | 以 ACP 服务器模式运行 Hermes,用于编辑器集成。 |
hermes mcp | 管理 MCP 服务器配置,并将 Hermes 作为 MCP 服务器运行。 |
hermes plugins | 管理 Hermes Agent 插件(安装、启用、禁用、移除)。 |
hermes tools | 配置各平台启用的工具。 |
hermes sessions | 浏览、导出、清理、重命名和删除会话。 |
hermes insights | 显示令牌/成本/活动分析数据。 |
hermes claw | OpenClaw 迁移辅助工具。 |
hermes profile | 管理配置文件 —— 多个隔离的 Hermes 实例。 |
hermes completion | 输出 shell 补全脚本(bash/zsh)。 |
hermes version | 显示版本信息。 |
hermes update | 拉取最新代码并重新安装依赖项。 |
hermes uninstall | 从系统中移除 Hermes。 |
hermes chat
hermes chat [options]
常用选项:
| 选项 | 描述 |
|---|---|
-q, --query "..." | 单次执行,非交互式提示。 |
-m, --model <model> | 覆盖本次运行的模型。 |
-t, --toolsets <csv> | 启用逗号分隔的工具集。 |
--provider <provider> | 强制指定提供方:auto, openrouter, nous, openai-codex, copilot-acp, copilot, anthropic, huggingface, zai, kimi-coding, minimax, minimax-cn, deepseek, ai-gateway, opencode-zen, opencode-go, kilocode, alibaba。 |
-s, --skills <name> | 为会话预加载一个或多个技能(可重复或用逗号分隔)。 |
-v, --verbose | 启用详细输出。 |
-Q, --quiet | 程序化模式:抑制横幅/旋转图标/工具预览。 |
--resume <session> / --continue [name] | 直接从 chat 恢复会话。 |
--worktree | 为此运行创建隔离的 git 工作树。 |
--checkpoints | 在破坏性文件更改前启用文件系统检查点。 |
--yolo | 跳过确认提示。 |
--pass-session-id | 将会话 ID 传递给系统提示。 |
--source <tag> | 会话源标签,用于过滤(默认: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 # Show current model and available options
/model claude-sonnet-4 # Switch model (auto-detects provider)
/model zai:glm-5 # Switch provider and model
/model custom:qwen-2.5 # Use model on your custom endpoint
/model custom # Auto-detect model from custom endpoint
/model custom:local:qwen-2.5 # Use a named custom provider
/model openrouter:anthropic/claude-sonnet-4 # Switch back to cloud
提供方和基础 URL 的更改会自动保存到 config.yaml。切换出自定义端点时,旧的基础 URL 会被清除,以防止其泄露到其他提供方。
hermes gateway
hermes gateway <subcommand>
子命令:
| 子命令 | 描述 |
|---|---|
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 常见问题。
hermes setup
hermes setup [model|terminal|gateway|tools|agent] [--non-interactive] [--reset]
使用完整向导或跳转至某一章节:
| 章节 | 描述 |
|---|---|
model | 提供方和模型设置。 |
terminal | 终端后端和沙箱设置。 |
gateway | 消息平台设置。 |
tools | 按平台启用/禁用工具。 |
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 # Interactive wizard
hermes auth list # Show all pools
hermes auth list openrouter # Show specific provider
hermes auth add openrouter --api-key sk-or-v1-xxx # Add API key
hermes auth add anthropic --type oauth # Add OAuth credential
hermes auth remove openrouter 2 # Remove by index
hermes auth reset openrouter # Clear cooldowns
子命令: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>
管理用于事件驱动代理激活的动态 Webhook 订阅。需要在配置中启用 Webhook 平台——如果未配置,将打印设置说明。
| 子命令 | 说明 |
|---|---|
subscribe / add | 创建一个 Webhook 路由。返回 URL 和 HMAC 密钥,用于在您的服务上进行配置。 |
list / ls | 显示所有由代理创建的订阅。 |
remove / rm | 删除一个动态订阅。配置文件中的静态路由不受影响。 |
test | 发送测试 POST 请求以验证订阅是否正常工作。 |
hermes webhook subscribe
hermes webhook subscribe <name> [options]
| 选项 | 说明 |
|---|---|
--prompt | 包含 {dot.notation} 数据载荷引用的提示模板。 |
--events | 要接受的事件类型(例如 issues,pull_request),用逗号分隔。空值表示全部接受。 |
--description | 人类可读的描述信息。 |
--skills | 为代理运行加载的技能名称列表,用逗号分隔。 |
--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 问题或 Telegram 中请求支持而设计——无 ANSI 颜色,无特殊格式,仅包含数据。
| 选项 | 说明 |
|---|---|
--show-keys | 显示被遮蔽的 API 密钥前缀(首尾各 4 个字符),而不是仅显示 set/not set。 |
包含内容
| 部分 | 详细信息 |
|---|---|
| 头部 | Hermes 版本、发布日期、Git 提交哈希 |
| 环境 | 操作系统、Python 版本、OpenAI SDK 版本 |
| 身份 | 当前活跃的配置文件名、HERMES_HOME 路径 |
| 模型 | 已配置的默认模型及其提供者 |
| 终端 | 后端类型(本地、Docker、SSH 等) |
| API 密钥 | 所有 22 个提供者/工具 API 密钥的存在性检查 |
| 功能 | 已启用的功能集、MCP 服务器数量、内存提供者 |
| 服务 | 网关状态、配置的消息平台 |
| 工作负载 | 定时任务数量、已安装技能数量 |
| 配置覆盖项 | 任何与默认值不同的配置项 |
示例输出
--- 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 —— 将摘要粘贴进问题中
- 在 Discord 中寻求帮助 —— 以代码块形式分享
- 与他人对比你的配置
- 当某项功能异常时快速进行健康检查
hermes dump 是专门用于分享的。如需交互式诊断,请使用 hermes doctor;如需可视化概览,请使用 hermes status。
hermes logs
hermes logs [log_name] [options]
查看、实时追踪和过滤 Hermes 日志文件。所有日志均存储于 ~/.hermes/logs/(非默认配置文件则为 <profile>/logs/)。
日志文件
| 名称 | 文件路径 | 记录内容 |
|---|---|---|
agent(默认) | agent.log | 所有代理活动记录 —— 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 <LEVEL> | 最小显示日志级别:DEBUG、INFO、WARNING、ERROR、CRITICAL。 |
--session <ID> | 过滤包含会话 ID 子串的日志行。 |
--since <TIME> | 显示来自相对时间之前的日志行:30m、1h、2d 等。支持 s(秒)、m(分钟)、h(小时)、d(天)。 |
示例
# View the last 50 lines of agent.log (default)
hermes logs
# Follow agent.log in real time
hermes logs -f
# View the last 100 lines of gateway.log
hermes logs gateway -n 100
# Show only warnings and errors from the last hour
hermes logs --level WARNING --since 1h
# Filter by a specific session
hermes logs --session abc123
# Follow errors.log, starting from 30 minutes ago
hermes logs errors --since 30m -f
# List all log files with their sizes
hermes logs list
过滤规则
可以组合多个过滤条件。当多个过滤器同时启用时,一条日志必须全部通过才能显示:
# WARNING+ lines from the last 2 hours containing session "tg-12345"
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 <subcommand>
子命令:
| 子命令 | 说明 |
|---|---|
show | 显示当前配置值。 |
edit | 在您的编辑器中打开 config.yaml。 |
set <key> <value> | 设置一个配置项。 |
path | 打印配置文件路径。 |
env-path | 打印 .env 文件路径。 |
check | 检查缺失或过期的配置。 |
migrate | 交互式添加新引入的配置选项。 |
hermes pairing
hermes pairing <list|approve|revoke|clear-pending>
| 子命令 | 说明 |
|---|---|
list | 显示待处理和已批准的用户。 |
approve <platform> <code> | 批准一个配对码。 |
revoke <platform> <user-id> | 撤销用户的访问权限。 |
clear-pending | 清除待处理的配对码。 |
hermes skills
hermes skills <subcommand>
子命令:
| 子命令 | 说明 |
|---|---|
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] <subcommand>
管理 Honcho 跨会话记忆集成。此命令由 Honcho 记忆提供者插件提供,仅当你的配置中 memory.provider 设置为 honcho 时可用。
--target-profile 标志允许你在不切换配置文件的情况下管理其他配置文件的 Honcho 配置。
子命令:
| 子命令 | 描述 |
|---|---|
setup | 重定向至 hermes memory setup(统一设置路径)。 |
status [--all] | 显示当前 Honcho 配置和连接状态。--all 显示跨配置文件概览。 |
peers | 显示所有配置文件中的对等身份。 |
sessions | 列出已知的 Honcho 会话映射。 |
map [name] | 将当前目录映射到一个 Honcho 会话名称。省略 name 可列出当前映射。 |
peer | 显示或更新对等身份名称及辩证推理等级。选项:--user NAME、--ai NAME、--reasoning LEVEL。 |
mode [mode] | 显示或设置回忆模式:hybrid、context 或 tools。省略则显示当前设置。 |
tokens | 显示或设置上下文与辩证推理的 token 预算。选项:--context N、--dialectic N。 |
identity [file] [--show] | 种植或查看 AI 对等身份的表征。 |
enable | 为当前活动配置文件启用 Honcho。 |
disable | 为当前活动配置文件禁用 Honcho。 |
sync | 将 Honcho 配置同步到所有现有配置文件(创建缺失的主机区块)。 |
migrate | 从 openclaw-honcho 迁移到 Hermes Honcho 的逐步指南。 |
hermes memory
hermes memory <subcommand>
设置和管理外部记忆提供者插件。可用提供者包括:honcho、openviking、mem0、hindsight、holographic、retaindb、byterover、supermemory。同一时间只能激活一个外部提供者。内置记忆(MEMORY.md/USER.md)始终处于激活状态。
子命令:
| 子命令 | 描述 |
|---|---|
setup | 交互式选择并配置记忆提供者。 |
status | 显示当前记忆提供者配置。 |
off | 禁用外部提供者(仅使用内置提供者)。 |
hermes acp
hermes acp
以 ACP(代理客户端协议)stdio 服务器模式启动 Hermes,用于编辑器集成。
相关入口点:
hermes-acp
python -m acp_adapter
请先安装支持:
pip install -e '.[acp]'
hermes mcp
hermes mcp <subcommand>
管理 MCP(模型上下文协议)服务器配置,并将 Hermes 运行在 MCP 服务器模式下。
| 子命令 | 描述 |
|---|---|
serve [-v|--verbose] | 以 MCP 服务器模式运行 Hermes — 向其他代理暴露对话。 |
add <name> [--url URL] [--command CMD] [--args ...] [--auth oauth|header] | 添加一个具备自动工具发现功能的 MCP 服务器。 |
remove <name>(别名:rm) | 从配置中移除一个 MCP 服务器。 |
list(别名:ls) | 列出已配置的 MCP 服务器。 |
test <name> | 测试与 MCP 服务器的连接。 |
configure <name>(别名:config) | 切换某个服务器的工具选择。 |
参见 MCP 配置参考、使用 Hermes 的 MCP 和 MCP 服务器模式。
hermes plugins
hermes plugins [subcommand]
统一插件管理 — 在一处集中管理通用插件、记忆提供者和上下文引擎。运行 hermes plugins 且无子命令时,将打开一个复合交互界面,包含两个部分:
- 通用插件 — 多选复选框,用于启用/禁用已安装的插件
- 提供者插件 — 单选配置,用于选择记忆提供者和上下文引擎。按 ENTER 键可打开单选菜单。
| 子命令 | 描述 |
|---|---|
| (无) | 复合交互界面 — 通用插件开关 + 提供者插件配置。 |
install <identifier> [--force] | 从 Git URL 或 owner/repo 安装插件。 |
update <name> | 拉取已安装插件的最新更改。 |
remove <name>(别名:rm、uninstall) | 移除已安装的插件。 |
enable <name> | 启用已禁用的插件。 |
disable <name> | 禁用插件但不删除。 |
list(别名:ls) | 列出已安装插件及其启用/禁用状态。 |
提供者插件的选择将保存至 config.yaml:
memory.provider— 当前激活的记忆提供者(为空表示仅使用内置提供者)context.engine— 当前激活的上下文引擎("compressor"= 内置默认)
通用插件的禁用列表存储于 config.yaml 中的 plugins.disabled 下。
参见 插件 和 构建 Hermes 插件。
hermes tools
hermes tools [--summary]
| 选项 | 描述 |
|---|---|
--summary | 打印当前启用工具的摘要后退出。 |
若未使用 --summary,则启动交互式平台特定工具配置 UI。
hermes sessions
hermes sessions <subcommand>
子命令:
| 子命令 | 描述 |
|---|---|
list | 列出最近的会话。 |
browse | 支持搜索与恢复的交互式会话选择器。 |
export <output> [--session-id ID] | 将会话导出为 JSONL 格式。 |
delete <session-id> | 删除一个会话。 |
prune | 删除旧会话。 |
stats | 显示会话存储统计信息。 |
rename <session-id> <title> | 设置或更改会话标题。 |
hermes insights
hermes insights [--days N] [--source platform]
| 选项 | 描述 |
|---|---|
--days <n> | 分析最近 n 天的数据(默认:30 天)。 |
--source <platform> | 按来源过滤,例如 cli、telegram 或 discord。 |
hermes claw
hermes claw migrate [options]
将你的 OpenClaw 设置迁移到 Hermes。从 ~/.openclaw(或自定义路径)读取数据,并写入 ~/.hermes。自动检测旧版目录名(~/.clawdbot、~/.moldbot)和配置文件名(clawdbot.json、moldbot.json)。
| 选项 | 描述 |
|---|---|
--dry-run | 预览迁移内容,但不实际写入任何数据。 |
--preset <name> | 迁移预设:full(默认,包含密钥)或 user-data(不包含 API 密钥)。 |
--overwrite | 在冲突时覆盖现有的 Hermes 文件(默认:跳过)。 |
--migrate-secrets | 在迁移中包含 API 密钥(默认启用,配合 --preset full 使用)。 |
--source <path> | 自定义 OpenClaw 目录(默认:~/.openclaw)。 |
--workspace-target <path> | 工作区指令的目标目录(AGENTS.md)。 |
--skill-conflict <mode> | 处理技能名称冲突:skip(默认)、overwrite 或 rename。 |
--yes | 跳过确认提示。 |
迁移内容
迁移涵盖超过 30 个类别,包括角色设定、记忆、技能、模型提供者、消息平台、代理行为、会话策略、MCP 服务器、TTS 等。项目要么被直接导入为 Hermes 对应项,要么被归档以供手动审查。
直接导入: SOUL.md、MEMORY.md、USER.md、AGENTS.md、技能(4 个源目录)、默认模型、自定义提供者、MCP 服务器、消息平台令牌与白名单(Telegram、Discord、Slack、WhatsApp、Signal、Matrix、Mattermost)、代理默认设置(推理强度、压缩、人类延迟、时区、沙箱)、会话重置策略、审批规则、TTS 配置、浏览器设置、工具设置、执行超时、命令白名单、网关配置,以及来自 3 个来源的 API 密钥。已归档以供手动审查: 定时任务(Cron jobs)、插件、钩子/网页钩子(hooks/webhooks)、记忆后端(QMD)、技能注册表配置、UI/身份信息、日志记录、多代理设置、频道绑定、IDENTITY.md、TOOLS.md、HEARTBEAT.md、BOOTSTRAP.md。
API 密钥解析 按优先级顺序检查三个来源:配置值 → ~/.openclaw/.env → auth-profiles.json。所有令牌字段均支持纯字符串、环境变量模板(${VAR})以及 SecretRef 对象。
有关完整的配置键映射、SecretRef 处理细节及迁移后检查清单,请参阅 完整迁移指南。
示例
# Preview what would be migrated
hermes claw migrate --dry-run
# Full migration including API keys
hermes claw migrate --preset full
# Migrate user data only (no secrets), overwrite conflicts
hermes claw migrate --preset user-data --overwrite
# Migrate from a custom OpenClaw path
hermes claw migrate --source /home/user/old-openclaw
hermes profile
hermes profile <subcommand>
管理配置文件 —— 多个独立的 Hermes 实例,每个实例拥有自己的配置、会话、技能和主目录。
| 子命令 | 说明 |
|---|---|
list | 列出所有配置文件。 |
use <name> | 设置一个持久默认配置文件。 |
create <name> [--clone] [--clone-all] [--clone-from <source>] [--no-alias] | 创建新配置文件。--clone 复制配置,.env 和 SOUL.md 复制会话数据。--clone-all 复制全部状态。--clone-from 指定源配置文件。 |
delete <name> [-y] | 删除配置文件。 |
show <name> | 显示配置文件详情(主目录、配置等)。 |
alias <name> [--remove] [--name NAME] | 管理快捷访问配置文件的包装脚本。 |
rename <old> <new> | 重命名配置文件。 |
export <name> [-o FILE] | 将配置文件导出为 .tar.gz 压缩包。 |
import <archive> [--name 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 命令、子命令及配置文件名的自动补全功能。
示例:
# Bash
hermes completion bash >> ~/.bashrc
# Zsh
hermes completion zsh >> ~/.zshrc
维护命令
| 命令 | 说明 |
|---|---|
hermes version | 输出版本信息。 |
hermes update | 拉取最新更新并重新安装依赖项。 |
hermes uninstall [--full] [--yes] | 卸载 Hermes,可选地删除所有配置/数据。 |