跳到主要内容

CLI 命令参考

本页介绍的是你在 shell 中直接运行的终端命令

会话内 slash command 请参见 Slash Commands Reference

全局入口

hermes [global-options] <command> [subcommand/options]

全局选项

OptionDescription
--version, -V显示版本并退出
--profile <name>, -p <name>选择本次调用使用的 Hermes profile,会覆盖 hermes profile use 设定的默认 profile
--resume <session>, -r <session>按 ID 或标题恢复历史会话
--continue [name], -c [name]恢复最近一次会话,或恢复最近一次匹配指定标题的会话
--worktree, -w在隔离的 git worktree 中启动,适合并行 agent 工作流
--yolo跳过危险命令审批提示
--pass-session-id把 session ID 注入 agent 的 system prompt
--ignore-user-config忽略 ~/.hermes/config.yaml,仅使用内置默认值;.env 中凭证仍会加载
--ignore-rules跳过自动注入 AGENTS.mdSOUL.md.cursorrules、记忆和预加载技能
--tui启动 TUI,而不是经典 CLI;等价于 HERMES_TUI=1
--dev--tui 一起使用时,直接通过 tsx 运行 TypeScript 源码

顶层命令

CommandPurpose
hermes chat与 agent 进行交互式或一次性聊天
hermes model交互式选择默认 provider 和模型
hermes gateway运行或管理消息网关服务
hermes setup全量或局部配置的交互式安装向导
hermes whatsapp配置并配对 WhatsApp bridge
hermes auth管理凭证,支持添加、列出、删除、重置和策略设置
hermes login / logout已废弃,请改用 hermes auth
hermes status显示 agent、认证与平台状态
hermes cron检查并驱动 cron 调度器
hermes webhook管理事件驱动激活用的动态 webhook 订阅
hermes doctor诊断配置和依赖问题
hermes dump输出便于复制粘贴的环境摘要,用于支持/排障
hermes debug调试工具,包括上传日志和系统信息
hermes backup将 Hermes home 目录备份为 zip
hermes import从 zip 恢复 Hermes 备份
hermes logs查看、跟随和过滤日志文件
hermes config显示、编辑、迁移和查询配置文件
hermes pairing批准或撤销消息平台 pairing code
hermes skills浏览、安装、发布、审计和配置技能
hermes honcho管理 Honcho 跨会话记忆集成
hermes memory配置外部 memory provider
hermes acp以 ACP server 方式运行 Hermes,用于编辑器集成
hermes mcp管理 MCP server 配置,并以 MCP server 方式运行 Hermes
hermes plugins管理 Hermes Agent 插件
hermes tools按平台配置启用工具
hermes sessions浏览、导出、清理、重命名和删除会话
hermes insights显示 token/成本/活动分析
hermes clawOpenClaw 迁移辅助命令
hermes dashboard启动用于配置、API key 和会话管理的 Web 仪表盘
hermes profile管理 profile,即多个隔离的 Hermes 实例
hermes completion输出 shell 补全脚本(bash/zsh)
hermes version显示版本信息
hermes update拉取最新代码并重装依赖
hermes uninstall从系统中移除 Hermes

hermes chat

hermes chat [options]

常用选项:

OptionDescription
-q, --query "..."一次性、非交互式 prompt
-m, --model <model>本次运行临时覆盖模型
-t, --toolsets <csv>启用逗号分隔的 toolset 集合
--provider <provider>强制指定 provider
-s, --skills <name>为会话预加载一个或多个技能
-v, --verbose详细输出
-Q, --quiet程序化模式,隐藏 banner/spinner/工具预览
--image <path>给一次性查询附加本地图片
--resume <session> / --continue [name]直接从 chat 恢复会话
--worktree为本次运行创建隔离 git worktree
--checkpoints在破坏性文件变更前启用文件系统 checkpoint
--yolo跳过审批提示
--pass-session-id把 session ID 传入 system prompt
--ignore-user-config忽略 ~/.hermes/config.yaml,仅用内置默认值
--ignore-rules跳过自动注入规则、记忆和预加载技能
--source <tag>会话来源标签,默认 cli
--max-turns <N>每轮对话最大工具调用迭代次数

示例:

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 chat --ignore-user-config --ignore-rules -q "Repro without my personal setup"

hermes model

交互式 provider + model 选择器。这是新增 provider、设置 API key、执行 OAuth 流程的标准命令。 它必须在终端中运行,而不是在已进入的 Hermes 聊天会话里执行。

hermes model

适用场景:

  • 新增 provider(OpenRouter、Anthropic、Copilot、DeepSeek、自定义端点等)
  • 登录 OAuth 类型 provider
  • 输入或更新 API key
  • 从 provider 模型列表中选择模型
  • 配置自定义/自托管端点
  • 将新的默认值保存到配置中
hermes model/model 的区别

hermes model(终端命令)是完整的大模型提供商(provider)安装向导,可以新增 provider、执行 OAuth、录入 API key 和配置端点。

/model(会话内 slash command)只能在已经配置过的 provider 与模型之间切换,不能新增 provider,也不能执行 OAuth 或提示录入 API key。

/model slash command(会话中)

/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

默认情况下,/model 的变更只作用于当前会话。加上 --global 会持久化到 config.yaml

/model claude-sonnet-4 --global

切换 provider 或 base URL 时,Hermes 会自动更新 config.yaml;当你离开 custom endpoint 时,旧 base URL 也会被清理,避免污染其他 provider。

hermes gateway

hermes gateway <subcommand>
SubcommandDescription
run在前台运行网关。推荐用于 WSL、Docker 和 Termux
start启动已安装的 systemd/launchd 后台服务
stop停止服务(或前台进程)
restart重启服务
status显示服务状态
install安装为 systemd(Linux)或 launchd(macOS)后台服务
uninstall移除已安装的服务
setup交互式消息平台配置向导
WSL 用户

WSL 下更推荐 hermes gateway run,而不是 hermes gateway start。如需常驻,建议用 tmux new -s hermes 'hermes gateway run'

hermes setup

hermes setup [model|tts|terminal|gateway|tools|agent] [--non-interactive] [--reset]
SectionDescription
modelprovider 与模型设置
terminal终端后端与沙箱设置
gateway消息平台设置
tools按平台启用/禁用工具
agentagent 行为设置
OptionDescription
--non-interactive使用默认值/环境值,不进行提示
--reset在 setup 前先重置为默认配置

hermes whatsapp

hermes whatsapp

运行 WhatsApp 配对/设置流程,包括模式选择和二维码配对。

hermes login / hermes logout (已废弃)

警告

hermes login 已移除。请使用 hermes auth 管理 OAuth 凭证,用 hermes model 选择 provider,或用 hermes setup 进行完整交互式配置。

hermes auth

管理同 provider 多 key 轮换的凭证池。

hermes auth
hermes auth list
hermes auth list openrouter
hermes auth add openrouter --api-key sk-or-v1-xxx
hermes auth add anthropic --type oauth
hermes auth remove openrouter 2
hermes auth reset openrouter

子命令:addlistremovereset。不带子命令时进入交互式管理向导。

hermes status

hermes status [--all] [--deep]
OptionDescription
--all以便于分享的脱敏格式显示全部细节
--deep运行更深入、耗时更长的检查

hermes cron

hermes cron <list|create|edit|pause|resume|run|remove|status|tick>
SubcommandDescription
list显示定时任务
create / add基于 prompt 创建定时任务,可重复传 --skill 绑定多个技能
edit更新任务的调度、prompt、名称、投递方式、重复次数或绑定技能
pause暂停任务但不删除
resume恢复已暂停任务,并重新计算下次运行时间
run在下一次 scheduler tick 时触发任务
remove删除任务
status检查 cron scheduler 是否在运行
tick只运行一次到期任务后退出

hermes webhook

hermes webhook <subscribe|list|remove|test>
SubcommandDescription
subscribe / add创建 webhook 路由,返回要配置到外部服务上的 URL 与 HMAC secret
list / ls显示全部 agent 创建的订阅
remove / rm删除动态订阅;不会影响 config.yaml 中的静态路由
test发送测试 POST,验证订阅是否工作正常

hermes webhook subscribe

hermes webhook subscribe <name> [options]
OptionDescription
--prompt{dot.notation} payload 引用的 prompt 模板
--events可接受的事件类型,逗号分隔
--description人类可读描述
--skills要为本次 agent 运行加载的技能,逗号分隔
--deliver投递目标:logtelegramdiscordslackgithub_comment
--deliver-chat-id跨平台投递时的目标 chat/channel ID
--secret自定义 HMAC secret;省略则自动生成

订阅会持久化到 ~/.hermes/webhook_subscriptions.json,且 webhook adapter 会热加载,无需重启网关。

hermes doctor

hermes doctor [--fix]
OptionDescription
--fix在可能时自动修复问题

hermes dump

hermes dump [--show-keys]

输出你的 Hermes 环境摘要,适合复制到 Discord、GitHub issue 或 Telegram 中求助。

OptionDescription
--show-keys用 API key 的前后 4 位替代简单的 set/not set

包含内容

SectionDetails
HeaderHermes 版本、发布日期、git commit
EnvironmentOS、Python 版本、OpenAI SDK 版本
Identity当前 profile 名称与 HERMES_HOME
Model默认模型与 provider
Terminal终端后端类型
API keys各 provider/工具 API key 的存在性检查
Features启用的 toolset、MCP server 数量、memory provider
Services网关状态与已配置消息平台
Workloadcron 任务数量、已安装技能数量
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
...
--- end dump ---

hermes debug

hermes debug share [options]

上传调试报告(系统信息 + 最近日志)到 paste 服务,并返回可分享 URL。

OptionDescription
--lines <N>每个日志文件包含多少行
--expire <days>paste 过期时间(天)
--local不上传,直接在本地打印报告

hermes backup

hermes backup [options]

创建 Hermes 配置、技能、会话和数据的 zip 备份,不包含 hermes-agent 代码库本身。

OptionDescription
-o, --output <path>备份 zip 输出路径
-q, --quick快速快照,只保存关键状态文件
-l, --label <name>快照标签(仅对 --quick 有效)

hermes import

hermes import <zipfile> [options]

把历史备份恢复到 Hermes home 目录。

OptionDescription
-f, --force不经确认直接覆盖现有文件

hermes logs

hermes logs [log_name] [options]

查看、跟随与过滤 Hermes 日志文件。默认日志位于 ~/.hermes/logs/(非默认 profile 则在 <profile>/logs/)。

日志文件

NameFileWhat it captures
agent(默认)agent.log全部 agent 活动,包括 API 调用、工具分发和会话生命周期
errorserrors.log仅警告与错误,是 agent.log 的过滤子集
gatewaygateway.log消息网关活动,如平台连接、消息分发和 webhook 事件

选项

OptionDescription
log_name要查看的日志:agenterrorsgateway,或 list
-n, --lines <N>显示的行数
-f, --follow实时跟随,类似 tail -f
--level <LEVEL>最低日志级别
--session <ID>仅显示包含某 session ID 的行
--since <TIME>仅显示某个相对时间之后的日志
--component <NAME>按组件过滤,如 gatewayagenttoolsclicron

hermes config

hermes config <subcommand>
SubcommandDescription
show显示当前配置值
edit在编辑器中打开 config.yaml
set <key> <value>设置配置值
path输出配置文件路径
env-path输出 .env 文件路径
check检查配置是否缺失或过期
migrate交互式补充新引入的配置项

hermes pairing

hermes pairing <list|approve|revoke|clear-pending>
SubcommandDescription
list显示待审批和已批准用户
approve <platform> <code>批准一个 pairing code
revoke <platform> <user-id>撤销某个用户访问权限
clear-pending清空待处理 pairing code

hermes skills

hermes skills <subcommand>
SubcommandDescription
browse分页浏览技能注册表
search搜索技能注册表
install安装技能
inspect安装前预览技能
list列出已安装技能
check检查已安装 hub 技能是否有上游更新
update重新安装有更新的 hub 技能
audit重新扫描已安装 hub 技能
uninstall卸载通过 hub 安装的技能
publish发布技能到注册表
snapshot导出/导入技能配置
tap管理自定义技能源
config按平台交互式启用/禁用技能

hermes honcho

hermes honcho [--target-profile NAME] <subcommand>

用于管理 Honcho 跨会话记忆集成,仅当 memory.provider 设为 honcho 时可用。

SubcommandDescription
setup重定向到 hermes memory setup
status [--all]显示当前 Honcho 配置与连接状态
peers显示所有 profile 中的 peer 身份
sessions列出已知 Honcho session 映射
map [name]将当前目录映射到某个 Honcho session 名称
peer显示或更新 peer 名称与 dialectic reasoning 级别
mode [mode]显示或设置 recall 模式
tokens显示或设置 context/dialectic token 预算
identity [file] [--show]初始化或显示 AI peer identity 表示
enable为当前 profile 启用 Honcho
disable为当前 profile 关闭 Honcho
sync将 Honcho 配置同步到已有 profile
migrate从 openclaw-honcho 迁移到 Hermes Honcho 的引导流程

hermes memory

hermes memory <subcommand>

设置与管理外部 memory provider plugin。内置记忆(MEMORY.md/USER.md)始终启用。

SubcommandDescription
setup交互式选择并配置 provider
status显示当前 memory provider 配置
off关闭外部 provider,仅保留内置记忆

hermes acp

hermes acp

以 ACP(Agent Client Protocol)stdio server 的方式启动 Hermes,用于编辑器集成。

相关入口:

hermes-acp
python -m acp_adapter

hermes mcp

hermes mcp <subcommand>
SubcommandDescription
serve [-v|--verbose]以 MCP server 模式运行 Hermes
add <name> [--url URL] [--command CMD] [--args ...] [--auth oauth|header]添加 MCP server 并自动发现工具
remove <name>(别名:rm从配置中删除 MCP server
list(别名:ls列出已配置 MCP server
test <name>测试与 MCP server 的连接
configure <name>(别名:config切换该 server 的工具选择

hermes plugins

hermes plugins [subcommand]

统一插件管理入口,涵盖通用插件、memory provider 和 context engine。

SubcommandDescription
(none)组合式交互 UI:通用插件开关 + provider plugin 配置
install <identifier> [--force]从 Git URL 或 owner/repo 安装插件
update <name>拉取已安装插件的最新变化
remove <name>(别名:rm, uninstall删除插件
enable <name>启用已禁用插件
disable <name>禁用插件但不移除
list(别名:ls列出已安装插件及启用状态

hermes tools

hermes tools [--summary]
OptionDescription
--summary打印当前启用工具摘要后退出

--summary 时,会启动按平台配置工具的交互式 UI。

hermes sessions

hermes sessions <subcommand>
SubcommandDescription
list列出最近会话
browse带搜索与恢复功能的交互式会话选择器
export <output> [--session-id ID]导出会话到 JSONL
delete <session-id>删除单个会话
prune清理旧会话
stats显示 session store 统计
rename <session-id> <title>设置或修改会话标题

hermes insights

hermes insights [--days N] [--source platform]
OptionDescription
--days <n>分析最近 n 天,默认 30
--source <platform>按来源平台过滤,如 clitelegramdiscord

hermes claw

hermes claw migrate [options]

将 OpenClaw 配置迁移到 Hermes,默认从 ~/.openclaw 读取并写入 ~/.hermes

OptionDescription
--dry-run只预览,不写入
--preset <name>迁移预设:fulluser-data
--overwrite冲突时覆盖现有 Hermes 文件
--migrate-secrets一并迁移 API key
--source <path>自定义 OpenClaw 目录
--workspace-target <path>工作区指令(AGENTS.md)目标目录
--skill-conflict <mode>技能重名处理策略:skipoverwriterename
--yes跳过确认提示

hermes dashboard

hermes dashboard [options]

启动 Web 仪表盘,用于浏览器中管理配置、API key 和会话。

OptionDefaultDescription
--port9119Web server 端口
--host127.0.0.1绑定地址
--no-open不自动打开浏览器

hermes profile

hermes profile <subcommand>

管理 profile,即多个彼此隔离的 Hermes 实例,每个实例都有独立的配置、会话、技能和 home 目录。

SubcommandDescription
list列出全部 profile
use <name>设置一个持久默认 profile
create <name> [--clone] [--clone-all] [--clone-from <source>] [--no-alias]创建新 profile
delete <name> [-y]删除 profile
show <name>显示 profile 详情
alias <name> [--remove] [--name NAME]管理 profile 包装脚本别名
rename <old> <new>重命名 profile
export <name> [-o FILE]导出 profile 为 .tar.gz
import <archive> [--name NAME].tar.gz 导入 profile

示例:

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。将其 source 到 shell 配置中后,即可对 Hermes 命令、子命令和 profile 名启用 tab 补全。

# Bash
hermes completion bash >> ~/.bashrc

# Zsh
hermes completion zsh >> ~/.zshrc

维护命令

CommandDescription
hermes version输出版本信息
hermes update拉取最新变更并重装依赖
hermes uninstall [--full] [--yes]移除 Hermes,可选删除所有配置与数据

另见