返回命令列表
快速入门hermes

hermes 命令 — 完整参考与示例

hermes 命令完整参考:Hermes Agent CLI 的默认入口点,启动交互式聊天会话。等同于 hermes chat。

2026年7月27日

概述

hermes 是 Hermes Agent 的主要入口。不指定任何子命令直接运行,会在你配置的界面(TUI 或经典 REPL)中启动交互式聊天会话——等同于 hermes chat。CLI 还提供了数十个子命令,用于配置、集成、技能、会话和维护。

hermes [选项] [命令]

全局选项

选项 说明
-h, --help 显示帮助信息并退出。
--version, -V 显示版本信息并退出。
-z PROMPT, --oneshot PROMPT 单次问答模式:发送一个提示词,仅将最终回复打印到 stdout。无横幅、无加载动画、无 session ID 行——适合脚本和管道。
--usage-file PATH 仅限单次问答模式:运行结束后将 JSON 用量报告(成本、token 数、模型、api_calls)写入 PATH。
-m MODEL, --model MODEL 本次调用的模型覆盖(例如 anthropic/claude-sonnet-4.6)。适用于 --oneshot--tui
--provider PROVIDER 本次调用的提供商覆盖(例如 openrouteranthropic)。适用于 --oneshot--tui
--reasoning LEVEL 本次调用的推理强度:noneminimallowmediumhighxhighmaxultra
-t TOOLSETS, --toolsets TOOLSETS 本次调用启用的工具集,逗号分隔。
--resume SESSION, -r SESSION 按 ID 或标题恢复之前的会话。
--no-restore-cwd 不进入被恢复会话记录的 working directory。
--continue [SESSION_NAME], -c [SESSION_NAME] 按名称恢复会话;未指定名称时恢复最近的一次。
--worktree, -w 在隔离的 git worktree 中运行(用于并行 agent)。
--accept-hooks 自动批准 config.yaml 中未见过的新 shell hooks,无需 TTY 提示(适合 CI 和无头运行)。
--skills SKILLS, -s SKILLS 为会话预加载一个或多个技能(可重复使用该标志或用逗号分隔)。
--yolo 绕过所有危险命令的批准提示(风险自负)。
--pass-session-id 将会话 ID 注入 agent 的 system prompt。
--ignore-user-config 忽略 ~/.hermes/config.yaml,回退到内置默认值(.env 中的凭据仍会加载)。
--ignore-rules 跳过 AGENTS.mdSOUL.md.cursorrules、记忆和预加载技能的自动注入。
--safe-mode 故障排查模式:禁用所有自定义项——用户配置、记忆注入、插件和 MCP 服务器(隐含 --ignore-user-config--ignore-rules)。
--tui 启动现代 TUI 而非经典 REPL。
--cli 强制使用经典 prompt_toolkit REPL(覆盖 display.interface=tui)。
--dev 配合 --tui:通过 tsx 运行 TypeScript 源码(跳过 dist 构建)。
--profile PROFILE, -p PROFILE 在指定名称的 Hermes profile 下运行(设置 HERMES_HOME)。在参数解析之前被消费,因此适用于所有子命令。

子命令

hermes 自带六十多个子命令。主要分组如下:

分组 子命令
聊天与模型 chatmodelmoafallbackacp
集成与消息 gatewaywhatsappwhatsapp-cloudslacksendwebhookportalproxymcplspcomputer-use
配置与访问 setupconfigprofileprojectsecretsegressskinconsolepairingapprovalsauthloginlogout
会话、记忆与分析 sessionsmemoryjourneylearning + memory-graph 的别名)、checkpointsinsightsprompt-sizelogs
技能与扩展 skillsbundlespluginscuratorpetssync
管理与维护 statusdoctorsecuritycronhooksbackupimportimport-agentmigratedumpdebugmonitoringversionupdateuninstallcompletiondashboardservedesktop(别名 gui)、clawkanbantools

运行 hermes <命令> --help 查看任意子命令的详细信息。

示例

hermes                          # 启动交互式聊天
hermes chat -q "Hello"          # 单次查询模式
hermes -z "Summarize this repo" # 单次问答模式:只输出回复
hermes --tui                    # 启动现代 TUI
hermes --cli                    # 强制使用经典 REPL
hermes -c                       # 恢复最近一次会话
hermes -c "my project"          # 按名称恢复会话
hermes --resume <session_id>    # 按 ID 恢复指定会话
hermes -m anthropic/claude-sonnet-4.6 --reasoning high   # 覆盖模型与推理强度
hermes -t web -s hermes-agent-dev,github-auth            # 工具集 + 预加载技能
hermes --profile work           # 在 'work' profile 下运行
hermes setup                    # 运行设置向导
hermes model                    # 选择默认模型
hermes config edit              # 在 $EDITOR 中编辑配置
hermes gateway install          # 安装 gateway 后台服务
hermes sessions list            # 列出历史会话
hermes logs -f                  # 实时跟踪 agent.log
hermes dashboard                # 启动 Web 仪表盘(端口 9119)
hermes update                   # 更新到最新版本

提示

  • 不带参数的 hermes 会启动交互式聊天——等同于 hermes chat
  • 使用 --tui 进入全屏界面,或在 config.yaml 中设置 display.interface: tui 将其设为默认。
  • -c/--continue 恢复最近一次会话;-r/--resume 定位到指定 session ID。
  • -z/--oneshot 专为脚本和管道设计;可搭配 --usage-file 跟踪成本。
  • --safe-mode 禁用所有自定义项——遇到问题时首先尝试它。
  • --yolo 会跳过所有批准提示;仅在可信、隔离的环境中使用。
  • --profile/-p 在参数解析之前被处理,因此可与任何子命令搭配使用。

Explore All Commands

Browse the full command reference with search and category filters.

返回命令列表