一、核心命令
hermes(直接启动)
无参数时进入交互式对话。
hermes # 进入交互式聊天
hermes chat -q "你好" # 单次查询模式
hermes -c # 继续上一个会话
hermes -c "项目名称" # 按名称继续最近匹配的会话
hermes --resume <session_id> # 凭会话 ID 恢复特定会话
hermes --tui # 启动现代 TUI 界面(替代经典 REPL)
hermes --skills skill1,skill2 # 预加载技能后启动会话
hermes --yolo # 跳过所有危险命令确认(慎用)
hermes --worktree # 在隔离的 git worktree 中运行(用于并行 Agent)
hermes --accept-hooks # 自动批准所有未见的 Shell Hooks(CI/无头运行用)
二、配置与管理
hermes config — 配置管理
hermes config show # 查看当前配置
hermes config edit # 在编辑器中打开配置文件
hermes config set model gpt-4 # 设置配置项
hermes config path # 打印配置文件路径
hermes config env-path # 打印 .env 文件路径
hermes config check # 检查缺失/过时的配置项
hermes config migrate # 用新选项更新配置
hermes model — 模型选择
hermes model # 交互式选择推理供应商和默认模型
hermes model --no-browser # 登录时不自动打开浏览器
hermes model --timeout 30 # 设置 HTTP 请求超时(秒)
hermes auth — 凭证管理(池化)
hermes auth add <provider> # 添加池化凭证
hermes auth list # 列出所有池化凭证
hermes auth remove <provider> <index> # 按索引/ID/标签移除凭证
hermes auth reset <provider> # 清除提供商的所有耗尽状态
hermes doctor — 诊断检查
hermes doctor # 检查 Hermes 配置和依赖问题
hermes doctor --fix # 自动尝试修复问题
hermes dump — 导出诊断摘要
hermes dump # 输出纯文本摘要(用于技术支持)
hermes dump --show-keys # 显示 API key 的首尾字符
hermes debug — 调试工具
hermes debug share # 上传调试报告到粘贴服务并获取分享链接
hermes debug share --lines 500 # 包含更多日志行
hermes debug share --expire 30 # 保留 30 天
hermes debug share --local # 本地打印(不上传)
hermes debug delete <url> # 删除已上传的粘贴
三、会话管理
hermes sessions — 会话历史
hermes sessions list # 列出最近的会话
hermes sessions browse # 交互式会话选择器(浏览/搜索/继续)
hermes sessions rename <ID> <标题> # 重命名/设置会话标题
hermes sessions export <文件> # 将会话导出为 JSONL 文件
hermes sessions delete <ID> # 删除特定会话
hermes sessions prune # 删除旧会话
hermes sessions stats # 显示会话存储统计
四、技能(Skills)
hermes skills — 技能管理
hermes skills browse # 浏览所有可用技能(分页)
hermes skills search <关键词> # 搜索技能注册表
hermes skills install <技能名> # 安装技能
hermes skills inspect <技能名> # 预览技能(不安装)
hermes skills list # 列出已安装的技能
hermes skills check # 检查已安装技能是否有更新
hermes skills update # 更新已安装的技能
hermes skills audit # 重新扫描已安装的技能
hermes skills uninstall <技能名> # 移除技能
hermes skills reset <技能名> # 重置捆绑技能(清除 user-modified 追踪)
hermes skills publish <技能名> # 发布技能到注册表
hermes skills snapshot # 导出/导入技能配置
hermes skills tap # 管理技能来源
hermes skills config # 交互式配置——启用/禁用单个技能
五、插件(Plugins)
hermes plugins — 插件管理
hermes plugins install <git-url> # 从 Git 仓库安装插件
hermes plugins update # 拉取已安装插件的最新更改
hermes plugins remove <插件名> # 移除已安装的插件
hermes plugins list # 列出已安装的插件
hermes plugins enable <插件名> # 启用已禁用的插件
hermes plugins disable <插件名> # 禁用插件(不移除)
六、工具(Tools)
hermes tools — 工具集配置
hermes tools list # 显示所有工具及其启用/禁用状态
hermes tools disable <工具名> # 禁用工具集或 MCP 工具
hermes tools enable <工具名> # 启用工具集或 MCP 工具
hermes tools --summary # 打印每个平台启用工具的摘要
七、MCP(Model Context Protocol)
hermes mcp — MCP 服务器管理
hermes mcp serve # 以 MCP 服务器模式运行 Hermes(暴露对话给其他 Agent)
hermes mcp add # 添加 MCP 服务器(先发现后安装)
hermes mcp remove <服务器名> # 移除 MCP 服务器
hermes mcp list # 列出已配置的 MCP 服务器
hermes mcp test # 测试 MCP 服务器连接
hermes mcp configure # 切换工具选择
hermes mcp login # 强制对 OAuth 认证的 MCP 服务器重新认证
八、消息网关(Gateway)
hermes gateway — 消息平台管理
hermes gateway run # 前台运行(推荐用于 WSL/Docker/Termux)
hermes gateway start # 启动 systemd/launchd 后台服务
hermes gateway stop # 停止网关服务
hermes gateway restart # 重启网关服务
hermes gateway status # 显示网关状态
hermes gateway install # 安装为后台服务
hermes gateway uninstall # 卸载网关服务
hermes gateway setup # 配置消息平台(Telegram/Discord/WhatsApp)
hermes gateway migrate-legacy # 移除遗留的 hermes.service 单元
hermes whatsapp — WhatsApp 集成
hermes whatsapp # 配置 WhatsApp 并通过二维码配对
九、计划任务(Cron)
hermes cron — 定时任务
hermes cron list # 列出所有计划任务
hermes cron create # 创建新的计划任务
hermes cron edit <job_id> # 编辑现有任务
hermes cron pause <job_id> # 暂停任务
hermes cron resume <job_id> # 恢复已暂停的任务
hermes cron run <job_id> # 在下一个调度周期运行任务
hermes cron remove <job_id> # 删除任务
hermes cron status # 检查 cron 调度器是否在运行
hermes cron tick # 运行一次到期任务后退出
十、Webhook
hermes webhook — Webhook 订阅
hermes webhook subscribe <url> # 创建 webhook 订阅
hermes webhook list # 列出所有动态订阅
hermes webhook remove <id> # 移除订阅
hermes webhook test <route> # 向 webhook 路由发送测试 POST
十一、Shell Hooks
hermes hooks — Shell 钩子管理
hermes hooks list # 列出已配置的钩子(匹配器/超时/授权状态)
hermes hooks test <event> # 用合成载荷触发每个匹配的钩子
hermes hooks revoke <command> # 移除命令的允许列表条目
hermes hooks doctor # 检查每个钩子:执行位/允许列表/mtime 漂移/JSON 有效性
十二、内存(Memory)
hermes memory — 外部记忆提供商
hermes memory setup # 交互式选择并配置提供商
hermes memory status # 显示当前内存提供商配置
hermes memory off # 禁用外部提供商(仅使用内置)
hermes memory reset # 擦除所有内置记忆(MEMORY.md 和 USER.md)
支持的外部提供商:honcho, openviking, mem0, hindsight, holographic, retaindb, byterover
十三、日志
hermes logs — 日志查看
hermes logs # 查看 agent.log 最后 50 行
hermes logs -f # 实时跟踪 agent.log
hermes logs errors # 查看 errors.log
hermes logs gateway -n 100 # 查看 gateway.log 最后 100 行
hermes logs --level WARNING # 仅显示 WARNING 及以上级别
hermes logs --session abc123 # 按会话 ID 过滤
hermes logs --since 1h # 显示最近 1 小时的所有行
hermes logs --since 30m -f # 从 30 分钟前开始跟踪
hermes logs --component tools # 仅显示工具相关行
hermes logs list # 列出所有可用的日志文件及大小
十四、备份与恢复
hermes backup — 备份
hermes backup # 备份整个 Hermes 配置到 zip 文件
hermes backup -o <路径> # 指定输出路径
hermes backup -q # 快速快照:仅关键状态文件(config, state.db, .env, auth, cron)
hermes backup -l <标签> # 为快照添加标签
hermes import — 恢复
hermes import <备份文件> # 从 zip 备份恢复 Hermes
十五、用户授权
hermes pairing — 配对码管理
hermes pairing list # 显示待批准和已批准的用户
hermes pairing approve <代码> # 批准配对码
hermes pairing revoke <用户> # 撤销用户访问权限
hermes pairing clear-pending # 清除所有待处理代码
十六、多配置文件(Profile)
hermes profile — 多配置文件
hermes profile list # 列出所有配置文件
hermes profile use <名称> # 设置默认配置文件
hermes profile create <名称> # 创建新配置文件
hermes profile delete <名称> # 删除配置文件
hermes profile show <名称> # 显示配置文件详情
hermes profile alias # 管理包装脚本
hermes profile rename <旧> <新> # 重命名配置文件
hermes profile export <名称> # 导出配置文件为归档
hermes profile import <归档> # 从归档导入配置文件
十七、数据分析
hermes insights — 使用洞察
hermes insights # 分析最近 30 天的会话历史
hermes insights --days 7 # 分析最近 7 天
hermes insights --source telegram # 按平台过滤
十八、OpenClaw 迁移
hermes claw — OpenClaw 迁移工具
hermes claw migrate # 从 OpenClaw 迁移到 Hermes
hermes claw cleanup # 迁移后存档遗留的 OpenClaw 目录
十九、系统级命令
hermes setup # 运行交互式设置向导
hermes login # 向推理供应商进行身份验证
hermes logout # 清除推理供应商的身份验证信息
hermes version # 显示版本信息
hermes update # 更新到最新版本
hermes uninstall # 卸载 Hermes Agent
hermes status # 显示所有组件状态
hermes completion bash # 打印 Bash 补全脚本
hermes completion zsh # 打印 Zsh 补全脚本
hermes completion fish # 打印 Fish 补全脚本
hermes dashboard # 启动 Web UI 仪表板(默认端口 9119)
hermes dashboard --port 8080 # 自定义端口
hermes dashboard --no-open # 不自动打开浏览器
hermes dashboard --insecure # 允许绑定到非 localhost(危险:网络上暴露 API keys)
二十、ACP 模式
hermes acp — Agent Client Protocol 模式
hermes acp # 以 ACP 服务器模式启动(用于 VS Code/Zed/JetBrains 编辑器集成)
附录:全局选项
| 选项 | 说明 |
|---|---|
-h, --help |
显示帮助信息 |
--version, -V |
显示版本信息 |
-r SESSION, --resume SESSION |
凭 ID 恢复指定会话 |
-c [SESSION_NAME], --continue [SESSION_NAME] |
凭名称继续会话 |
-w, --worktree |
在隔离 git worktree 中运行 |
--accept-hooks |
自动批准未见的 Shell Hooks |
-s SKILLS, --skills SKILLS |
预加载技能(逗号分隔或多 repeat flag) |
--yolo |
跳过所有危险命令确认 |
--pass-session-id |
在系统提示中包含会话 ID |
--ignore-user-config |
忽略 ~/.hermes/config.yaml |
--ignore-rules |
跳过 AGENTS.md/SOUL.md/.cursorrules/memory/预加载技能注入 |
--tui |
启动现代 TUI 界面 |
--dev |
以 tsx 运行 TypeScript 源码(配合 --tui 使用) |
📌 提示:任意命令后加
--help即可查看详细帮助,如hermes cron --help。