CLI Reference

Hermes Agent CLI 命令 — 完整参考

每个 CLI 命令尽在指尖 — 分类展示、可搜索、带用法示例。

hermes

启动交互式对话(同 `hermes chat`)。默认的日常入口。

用法
hermes [global-options]
示例
$hermes --tui
hermes setup

交互式设置向导 — 逐步配置供应商、模型、网关和工具。

用法
hermes setup
示例
$hermes setup
子命令
modelttsterminalgatewaytoolstelemetryagent
hermes chat

与智能体进行交互式或一次性对话。支持恢复会话、图片附件和工具集选择。

用法
hermes chat [-q "query"] [-m model] [-s skill]
示例
$hermes chat -q "Summarize this repo" --model claude-sonnet-4-20250514
选项
-q, --query "..."— One-shot non-interactive prompt
-m, --model <model>— Override model for this run
-s, --skills <name>— Preload one or more skills
-t, --toolsets <csv>— Enable comma-separated toolset list
--image <path>— Attach a local image to the query
--resume <session>— Resume a session directly
-v, --verbose— Verbose output
-Q, --quiet— Programmatic mode: suppress banner/spinner
hermes doctor

诊断配置、依赖和运行时问题。精确告诉你哪里有问题以及如何修复。

用法
hermes doctor
示例
$hermes doctor
hermes version

显示版本号、构建信息和运行时摘要。

用法
hermes version
示例
$hermes version
hermes update

拉取最新代码,重装依赖。支持可选更新前备份和网关重启。

用法
hermes update [--gateway] [--check] [--no-backup] [--backup] [--yes] [--branch NAME] [--force] [--force-venv]
示例
$hermes update --check --backup
选项
--check— Only check for updates, do not apply
--backup— Snapshot ~/.hermes before updating
--branch <NAME>— Update against a specific branch instead of main
hermes uninstall

从系统中删除 Hermes。可选择删除所有数据。

用法
hermes uninstall [--full] [--yes]
示例
$hermes uninstall --full --yes
hermes completion

为 bash、zsh 或 fish 生成 shell 自动补全脚本,启用所有命令和选项的 Tab 补全。

用法
hermes completion <bash|zsh|fish>
示例
$hermes completion bash > ~/.hermes-completion.bash
hermes config

查看、编辑、设置或查询 ~/.hermes/config.yaml 中的配置值。

用法
hermes config <show|edit|set|get|unset|path|env-path|check|migrate>
示例
$hermes config set display.interface tui
子命令
showeditset <key> <value>get <key>unset <key>pathenv-pathcheckmigrate
hermes model

交互式选择默认供应商和模型。打开可搜索的选择器界面。

用法
hermes model
示例
$hermes model
hermes moa

配置命名混合智能体预设 — 将多个模型组合用于单次查询。

用法
hermes moa <list|configure|delete>
示例
$hermes moa configure expert-panel --models claude-sonnet,gpt-5.1,gemini-2.5-pro
hermes fallback

管理主模型出错时尝试的备用供应商。

用法
hermes fallback <list|add|remove|clear>
示例
$hermes fallback add openrouter
hermes auth

管理凭据 — 添加、列出、移除、重置、状态、登出。支持 Codex、Nous 和 Anthropic 的 OAuth 流程。

用法
hermes auth <add|list|remove|reset|status|logout>
示例
$hermes auth add anthropic --type oauth
子命令
add <provider>listremove <provider> [index]reset <provider>status <provider>logout <provider>spotify
hermes migrate

诊断并可选择重写 config.yaml,替换已退役模型或废弃设置。

用法
hermes migrate [provider]
示例
$hermes migrate xai
hermes dump

生成可粘贴的配置摘要,用于支持和调试。不含任何密钥信息。

用法
hermes dump
示例
$hermes dump
hermes prompt-size

显示系统提示词 + 工具模式的字节分解(技能索引、记忆、配置文件)。离线运行。

用法
hermes prompt-size
示例
$hermes prompt-size
hermes gateway

运行或管理消息网关服务 — 连接 Hermes 到 Telegram、Discord、Slack、WhatsApp、Signal 等平台。

用法
hermes gateway <run|start|stop|restart|status|install|uninstall|list|setup|migrate-legacy|enroll>
示例
$hermes gateway run
子命令
run (foreground)start (daemon)stoprestartstatusinstalluninstalllistsetupmigrate-legacyenroll
hermes whatsapp

通过 Baileys 配置并配对 WhatsApp 桥接(个人 WhatsApp 账号)。

用法
hermes whatsapp
示例
$hermes whatsapp
hermes whatsapp-cloud

配置官方的 Meta WhatsApp Business Cloud API 适配器。需要 Business 账号和公开 webhook。

用法
hermes whatsapp-cloud
示例
$hermes whatsapp-cloud
hermes slack

Slack 助手 — 生成带有所有斜杠命令预注册的应用清单。

用法
hermes slack
示例
$hermes slack
hermes send

向已配置的消息平台发送一次性消息。适用于 shell 脚本、cron 任务、CI 钩子 — 不需要智能体循环。

用法
hermes send [-t TARGET] [-f PATH] [-s LINE] [-l] [-q] [--json] [message]
示例
$hermes send --to telegram "Build passed!"
选项
-t, --to <target>— Delivery target: platform, platform:chat_id, or platform:#channel
-f, --file <path>— Read message body from file (use MEDIA:<path> for attachments)
-s, --subject <line>— Prepend a subject/header line
-l, --list— List available targets
-q, --quiet— Suppress stdout on success
--json— Emit raw JSON result
hermes pairing

批准或撤销消息配对码 — 管理哪些设备/用户可以通过网关连接。

用法
hermes pairing <list|approve|revoke|clear-pending>
示例
$hermes pairing approve ABCD1234
hermes skills

从 agentskills.io 浏览、安装、发布、审计和配置技能。

用法
hermes skills <list|browse|search|install|inspect|update|audit|uninstall|publish|snapshot|tap|config>
示例
$hermes skills search "web scraping"
子命令
listbrowsesearch <query>install <name>inspect <name>checkupdateaudituninstall <name>publishsnapshottapconfig
hermes plugins

管理 Hermes Agent 插件 — 安装、启用、禁用或删除扩展。

用法
hermes plugins <list|install|enable|disable|remove>
示例
$hermes plugins install my-plugin
hermes hooks

检查、批准或删除 config.yaml 中声明的 shell 钩子。

用法
hermes hooks <list|test|revoke|remove|doctor>
示例
$hermes hooks list
hermes memory

配置外部记忆供应商(向量数据库后端)。管理跨会话持久记忆。

用法
hermes memory <setup|status|off|reset>
示例
$hermes memory setup
子命令
setupstatusoffreset
hermes sessions

浏览、导出、清理、重命名和删除聊天会话。

用法
hermes sessions <list|browse|export|delete|prune|archive|optimize|repair|recover|stats|rename|retitle-skills>
示例
$hermes sessions list --limit 20
子命令
listbrowseexportdeleteprunearchiveoptimizerepairrecoverstatsrenameretitle-skills
hermes profile

管理配置文件 — 运行多个独立的 Hermes 实例,各自拥有独立的配置、会话、技能和记忆。

用法
hermes profile <list|use|create|delete|describe|show|alias|rename|export|import|install|update|info>
示例
$hermes profile create work
子命令
listuse <name>create <name>delete <name>describeshow <name>aliasrename <old> <new>exportimportinstallupdateinfo
选项
-p, --profile <name>— Select profile for a single invocation (global flag)
hermes status

显示智能体健康状态、认证状态、网关状态和平台连接情况。

用法
hermes status
示例
$hermes status
hermes logs

查看、实时跟踪和过滤智能体、网关及错误日志文件。

用法
hermes logs [-n LINES] [-f] [--level LEVEL] [--session ID] [--since TIME] [--component NAME] [log_name]
示例
$hermes logs --follow --level debug
选项
-n, --lines N— Show last N lines (default 50)
-f, --follow— Tail logs in real time
--level <LEVEL>— Minimum level: DEBUG, INFO, WARNING, ERROR
--session <ID>— Filter lines by session ID
--since <TIME>— Show lines since TIME ago (e.g. 1h, 30m)
--component <NAME>— Filter by component: gateway, agent, tools, cli, cron, gui
[log_name]— Log file to view: agent (default), errors, gateway, gui, desktop, or list
hermes backup

将整个 Hermes 主目录(~/.hermes)备份为 zip 文件。

用法
hermes backup [-o OUTPUT] [-q] [-l LABEL]
示例
$hermes backup -o ~/backups/hermes-2026-07-27.zip
hermes import

从 zip 文件恢复 Hermes 备份。

用法
hermes import <path/to/backup.zip>
示例
$hermes import ~/backups/hermes-2026-07-27.zip
hermes checkpoints

检查、清理或清除文件系统检查点(/rollback 使用的影子存储)。

用法
hermes checkpoints <status|prune|clear|clear-legacy>
示例
$hermes checkpoints status
hermes insights

显示所有会话的 token 用量、费用明细和活动分析。

用法
hermes insights [days]
示例
$hermes insights 30
hermes cron

检查和管理内置 cron 调度器,用于定时任务自动化。

用法
hermes cron <list|create|add|edit|pause|resume|run|remove|delete|status|runs|history|tick>
示例
$hermes cron create "daily-brief" "0 9 * * *" --prompt "Summarize yesterday's work"
hermes kanban

多配置文件协作看板 — 任务、链接、调度。跨多个 Hermes 实例协调工作。

用法
hermes kanban <init|boards|create|list|show|assign|claim|complete|edit|block|unblock|schedule|promote|archive|tail|dispatch|stats|gc|repair>
示例
$hermes kanban create "Add OAuth flow" --assign backend
hermes project

管理命名多文件夹工作区(项目)。锚定桌面会话分组和确定性工作树。

用法
hermes project <create|list|show|add-folder|remove-folder|rename|set-primary|use|archive|restore|bind-board>
示例
$hermes project create my-saas --path ~/code/my-saas
hermes webhook

管理动态 webhook 订阅,实现事件驱动的智能体激活。

用法
hermes webhook <subscribe|list|remove|test>
示例
$hermes webhook subscribe deploy-hooks --events github.push --prompt "Deploy {repo}"
hermes mcp

管理 MCP(模型上下文协议)服务器配置。将 Hermes 作为 MCP 服务器运行以集成 IDE。

用法
hermes mcp <serve|add|remove|list|test|configure|login|reauth|picker|catalog|install>
示例
$hermes mcp add github-server --command "npx @modelcontextprotocol/server-github"
hermes acp

将 Hermes 作为 ACP(智能体通信协议)服务器运行,用于 VS Code、Zed 和 JetBrains 集成。

用法
hermes acp
示例
$hermes acp
hermes dashboard

启动 Web 仪表盘(端口 9119),用于管理配置、API 密钥、会话和嵌入式聊天。

用法
hermes dashboard
示例
$hermes dashboard
hermes proxy

启动本地 OpenAI 兼容代理,附加 OAuth 供应商凭据。可将 Hermes 作为任何 OpenAI 兼容客户端的即插即用后端。

用法
hermes proxy <start|status|providers>
示例
$hermes proxy start
hermes security

按需供应链安全审计(OSV.dev),覆盖虚拟环境、插件依赖和固定的 MCP 服务器。

用法
hermes security <audit>
示例
$hermes security audit
hermes secrets

管理外部密钥源(Bitwarden Secrets Manager),用于启动时拉取 API 密钥。

用法
hermes secrets <bitwarden|onepassword>
示例
$hermes secrets bitwarden setup
hermes debug

调试工具 — 上传日志和系统信息供支持使用。生成可分享的诊断链接。

用法
hermes debug
示例
$hermes debug

全局选项

这些选项适用于所有 hermes 命令,需放在子命令之前。

--version, -V— Show version and exit
--profile <name>, -p <name>— Select which Hermes profile to use for this invocation
--resume <session>, -r <session>— Resume a previous session by ID or title
--continue [name], -c [name]— Resume the most recent session, optionally filtered by title
--worktree, -w— Start in an isolated git worktree for parallel-agent workflows
--yolo— Bypass dangerous-command approval prompts
--tui— Launch the full-screen TUI instead of the classic CLI
--cli— Force the classic prompt_toolkit REPL (override display.interface: tui)
--pass-session-id— Include the session ID in the system prompt
--ignore-user-config— Ignore ~/.hermes/config.yaml and use built-in defaults
--ignore-rules— Skip auto-injection of AGENTS.md, SOUL.md, memory, and preloaded skills

Ready to try these commands?

Install Hermes Agent and start exploring the full power of the CLI.