Hermes Agent 完整命令参考手册

社区话题 📺 VFX Pipeline | 数字创意工作流 Hermes Agent 完整命令参考手册

标签: ,

  • 该话题为空。
正在查看 0 条回复
  • 作者
    帖子
    • #132324

      追光
      参与者

      📚 目录

      1. [安装与初始化](#安装与初始化)
      2. [基础交互命令](#基础交互命令)
      3. [配置管理命令](#配置管理命令)
      4. [工具与技能管理](#工具与技能管理)
      5. [Profile 多环境管理](#profile-多环境管理)
      6. [网关与消息平台](#网关与消息平台)
      7. [诊断与维护](#诊断与维护)
      8. [高级选项与参数](#高级选项与参数)

      Hermes Agent 命令速查表

      Hermes Agent 实际使用案例


      安装与初始化

      🚀 安装

      bash
      # 1. 交互式安装(推荐,首次使用)
      curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
      
      # 2. PowerShell 安装(Windows)
      iwr -useb https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1 | iex
      
      # 3. 使用 Homebrew 安装(macOS)
      brew install nous/hermes/hermes-agent
      
      # 4. 从源码安装(开发环境)
      git clone https://github.com/NousResearch/hermes-agent.git
      cd hermes-agent
      uv sync
      uv pip install -e ".[voice,mcp]"
      
      # 5. Desktop 应用安装(图形界面)
      # 下载从官网:https://hermes-agent.nousresearch.com/

      ⚙️ 初始设置

      bash
      # 运行完整配置向导
      hermes setup
      
      # 快速设置模型(交互式)
      hermes setup --model
      
      # 设置 Nous Portal(300+ 模型,订阅制)
      hermes setup --portal
      
      # 跳过交互式,使用预设配置
      hermes setup --provider openrouter --model claude-3-5-sonnet
      
      # 配置语音识别(faster-whisper)
      uv pip install -e ".[voice]"
      
      # 配置浏览器扩展(用于视觉分析工具)
      # 自动检测并安装,或手动安装:
      # https://chromewebstore.google.com/detail/hermes-agent-browser-extensio/hkdbmldpplkbhokhmdpplkbhokhmdppl

      基础交互命令

      💬 对话模式

      bash
      # 交互式聊天(默认)
      hermes
      
      # 单次查询模式(非交互式)
      hermes chat -q "总结这篇文档的内容"
      
      # 使用特定模型
      hermes chat --model "anthropic/claude-3-5-sonnet"
      hermes chat --model "gemini/gemini-2.0-flash"
      hermes chat --model "openai/o1"
      
      # 使用特定提供商
      hermes chat --provider nous
      hermes chat --provider openrouter
      hermes chat --provider anthropic
      hermes chat --provider gemini
      hermes chat --provider openai
      
      # 使用 Nous Portal(统一订阅)
      hermes chat --provider nous-portal
      hermes chat --pr  # Portal 快捷方式
      
      # 指定工作目录(Agent 上下文)
      hermes chat -w /path/to/project "分析这个代码库"
      
      # 静默模式(仅返回最终答案)
      hermes chat -q "快速问答"
      
      # 显示工具调用过程
      hermes chat --summary "想看思考过程"
      
      # 启用检查点(会话保存)
      hermes chat --checkpoints
      hermes chat --max-snapshots 50
      
      # 通过会话 ID 恢复
      hermes chat --resume <session_id>
      hermes chat --continue "上次会话"

      🎯 模型管理

      bash
      # 查看可用模型
      hermes model
      
      # 设置默认模型
      hermes model set --provider anthropic --model "claude-3-5-sonnet-20241022"
      hermes model set --provider gemini --model "gemini-2.0-flash"
      hermes model set --provider openai --model "gpt-4o"
      hermes model set --provider nous --model "our-model-name"
      
      # 查看所有可用模型
      hermes model list
      
      # 搜索模型
      hermes model search "long-context"
      
      # 设置 Provider
      hermes model set-provider anthropic
      hermes model set-provider gemini
      hermes model set-provider openrouter
      hermes model set-provider openai
      hermes model set-provider nous
      hermes model set-provider NousPortal

      配置管理命令

      📝 配置设置

      bash
      # 交互式配置(推荐)
      hermes config
      
      # 设置单个配置值
      hermes config set display.tool_progress_command false
      hermes config set agent.max_turns 90
      hermes config set tools.enabled terminal
      hermes config set enabled_toolsets web,terminal,skills,browser
      
      # 批量设置
      hermes config set -f display.tool_progress_command=false
      hermes config set -f agent.max_turns=90 -f tools.enabled=terminal
      
      # 从环境变量加载配置
      hermes config set OPENAI_API_KEY $OPENAI_API_KEY
      hermes config set ANTHROPIC_API_KEY $ANTHROPIC_API_KEY
      
      # 忽略用户配置(使用默认)
      hermes chat --ignore-user-config
      
      # 查看当前配置
      hermes config show
      hermes config get display.tool_progress_command

      🔧 配置选项说明

      选项类型默认值说明
      display.tool_progress_command
      booleanfalse是否在聊天中显示工具进度命令
      agent.max_turns
      integer90每次对话的最大工具调用次数
      tools.enabled
      list[]启用的工具列表
      enabled_toolsets
      list[]启用的工具集
      tools.disabled
      list[]禁用的工具
      disabled_toolsets
      list[]禁用的工具集
      checkpoints.enabled
      booleanfalse是否启用检查点
      checkpoints.max_snapshots
      integer20检查点保留数量
      skip_context_files
      booleanfalse跳过上下文文件注入
      skip_memory
      booleanfalse跳过记忆注入
      quiet_mode
      booleanfalse静默模式

      🌍 全局选项

      bash
      # --version, -V          # 显示版本并退出
      # --profile <name>, -p   # 选择配置文件
      # --resume <session>     # 恢复会话
      # --continue [name]      # 继续最近会话
      # --worktree, -w         # 隔离工作区
      # --yolo                 # 跳过危险命令确认
      # --pass-session-id      # 将 session ID 加入系统提示
      # --ignore-user-config   # 忽略用户配置
      # --ignore-rules         # 跳过规则注入
      # --tui                  # 启动 TUI 界面
      # --dev                  # 开发模式(源码运行)

      工具与技能管理

      🔨 工具管理

      bash
      # 交互式配置工具(推荐)
      hermes tools
      
      # 启用终端工具
      hermes tools enable terminal
      
      # 禁用终端工具
      hermes tools disable terminal
      
      # 查看所有可用工具
      hermes tools list
      
      # 查看工具状态
      hermes tools status
      
      # 启用所有工具
      hermes tools enable all
      
      # 禁用所有工具
      hermes tools disable all
      
      # 设置特定工具
      hermes tools set terminal.enabled true
      hermes tools set browser.enabled true
      hermes tools set wechat.enabled true
      
      # 查看工具配置
      hermes tools get terminal.enabled
      hermes tools show
      
      # 安装工具依赖(如 cua-driver)
      hermes computer-use install
      
      # 检查工具状态
      hermes computer-use doctor
      
      # 浏览器扩展状态检查
      hermes browser-extension status

      🛠️ 终端工具集

      bash
      # 查看可用终端后端
      hermes tools list environments
      
      # 查看本地终端配置
      hermes tools environments local show
      
      # 查看 Docker 配置
      hermes tools environments docker show
      
      # 设置终端环境
      hermes tools set terminal.environment local
      hermes tools set terminal.environment docker
      hermes tools set terminal.environment ssh
      hermes tools set terminal.environment modal
      hermes tools set terminal.environment daytona
      hermes tools set terminal.environment singularity
      
      # 查看环境变量配置
      hermes tools environments local env show
      hermes tools environments docker env show
      hermes tools environments ssh env show

      🧠 技能管理

      bash
      # 查看所有可用技能
      hermes skills list
      
      # 搜索技能
      hermes skills search kubernetes
      hermes skills search "python script"
      hermes skills search web-scraping
      
      # 安装技能
      hermes skills install openai/skills/k8s
      hermes skills install openai/skills/python-script
      
      # 查看已安装技能
      hermes skills installed list
      
      # 卸载技能
      hermes skills uninstall openai/skills/k8s
      
      # 启用/禁用技能
      hermes skills enable openai/skills/k8s
      hermes skills disable openai/skills/k8s
      
      # 设置技能状态
      hermes skills set openai/skills/k8s.enabled true
      
      # 查看技能详情
      hermes skills show openai/skills/k8s
      
      # 批量管理技能
      hermes skills set -r "*k8s*.enabled"=true

      🔧 终端工具详细配置

      bash
      # 查看终端工具集
      hermes tools show toolsets terminal
      
      # 本地终端配置
      hermes tools terminal local set shell=bash
      hermes tools terminal local set timeout=180
      hermes tools terminal local set pty=true
      
      # Docker 终端配置
      hermes tools terminal docker set image=nous/hermes-agent:latest
      hermes tools terminal docker set context=local
      
      # SSH 终端配置
      hermes tools terminal ssh set default_host=localhost
      hermes tools terminal ssh set default_port=22
      
      # Modal 终端配置
      hermes tools terminal modal set default_region=us-east-1
      
      # Daytona 终端配置
      hermes tools terminal daytona set default_env=local
      
      # Singularity 终端配置
      hermes tools terminal singularity set container=/path/to/container
      
      # 查看所有终端后端
      hermes tools environments list

      🌐 Web 工具集

      bash
      # Web 提取工具
      hermes tools web show
      
      # 查看浏览器工具状态
      hermes browser-extension status
      
      # 启用浏览器扩展
      hermes browser-extension enable
      
      # 检查扩展安装
      hermes browser-extension doctor
      
      # 查看扩展日志
      hermes browser-extension logs

      Profile 多环境管理

      👤 创建 Profile

      bash
      # 创建新的 Profile
      hermes profile create coder
      hermes profile create work
      hermes profile create personal
      hermes profile create dev
      hermes profile create production
      
      # 批量创建
      hermes profile create coder work personal
      hermes profile create -n 5          # 创建 5 个默认 profile
      hermes profile create -n 10 coder  # 创建 10 个 coder 类型 profile

      ⚙️ Profile 配置

      bash
      # 交互式配置 Profile
      hermes profile configure coder
      hermes profile use coder
      
      # 设置模型
      hermes profile set coder.model "anthropic/claude-3-5-sonnet"
      hermes profile set coder.provider anthropic
      hermes profile set work.model "gemini/gemini-2.0-flash"
      
      # 设置工具
      hermes profile set coder.tools enabled terminal,web,skills
      hermes profile set work.tools enabled terminal,web,browser,wechat
      
      # 设置环境变量
      hermes profile set coder.ENV OPENAI_API_KEY=$OPENAI_API_KEY
      hermes profile set work.ENV ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY
      
      # 设置 MCP 服务器
      hermes profile set coder.mcp_servers github command:npx args:["-y", "@modelcontextprotocol/server-github"]
      
      # 查看 Profile 配置
      hermes profile show coder
      hermes profile use coder config show
      
      # 导出 Profile 配置
      hermes profile export coder

      🔄 Profile 管理

      bash
      # 列出所有 Profile
      hermes profile list
      
      # 使用指定 Profile
      hermes -p coder chat "用 coder profile 聊天"
      hermes --profile work tools list
      
      # 删除 Profile
      hermes profile delete coder
      hermes profile remove work
      
      # 重置 Profile
      hermes profile reset coder
      hermes profile delete coder && hermes profile create coder
      
      # 创建 Profile 分布(多机器部署)
      hermes profile distribute coder ./profiles --exclude-workdir

      网关与消息平台

      🌉 网关管理

      bash
      # 启动网关(交互式)
      hermes gateway
      
      # 启动指定平台
      hermes gateway telegram start
      hermes gateway discord start
      hermes gateway slack start
      hermes gateway whatsapp start
      hermes gateway signal start
      hermes gateway email start
      
      # 停止网关
      hermes gateway stop
      hermes gateway kill
      
      # 重启网关
      hermes gateway restart
      
      # 查看网关日志
      hermes gateway logs
      hermes gateway logs --follow
      hermes gateway logs --level=error
      
      # 网关配置
      hermes gateway config show
      hermes gateway config set telegram.enabled=true

      📱 平台配置

      bash
      # 交互式配置平台
      hermes gateway config
      
      # 配置 Telegram
      hermes gateway telegram config set bot_token=$TELEGRAM_BOT_TOKEN
      hermes gateway telegram start
      
      # 配置 Discord
      hermes gateway discord config set client_id=$DISCORD_CLIENT_ID
      hermes gateway discord config set client_secret=$DISCORD_CLIENT_SECRET
      
      # 配置 Slack
      hermes gateway slack config set bot_token=$SLACK_BOT_TOKEN
      
      # 配置 WhatsApp
      hermes gateway whatsapp config set phone_number=$PHONE_NUMBER
      
      # 配置 Email
      hermes gateway email config set smtp_server=$SMTP_SERVER
      hermes gateway email config set smtp_port=587
      hermes gateway email config set smtp_user=$SMTP_USER
      hermes gateway email config set from_address=$FROM_EMAIL
      
      # 配置 Signal
      hermes gateway signal config set device_id=$DEVICE_ID
      
      # 查看所有平台状态
      hermes gateway status
      
      # 查看所有网关日志
      hermes gateway logs --all

      🎯 平台预设

      bash
      # 查看平台预设
      hermes tools show toolsets hermes-telegram
      hermes tools show toolsets hermes-discord
      hermes tools show toolsets hermes-slack
      hermes tools show toolsets hermes-whatsapp
      hermes tools show toolsets hermes-signal
      hermes tools show toolsets hermes-email

      诊断与维护

      🏥 诊断工具

      bash
      # 系统诊断
      hermes doctor
      
      # 查看详细诊断报告
      hermes doctor --verbose
      hermes doctor --all
      
      # 检查 API 密钥
      hermes doctor check-keys
      
      # 检查配置完整性
      hermes doctor check-config
      
      # 检查工具状态
      hermes doctor check-tools
      
      # 检查模型连接
      hermes doctor check-models
      
      # 检查网关状态
      hermes doctor check-gateway
      
      # 浏览器扩展诊断
      hermes browser-extension doctor
      
      # 修复常见问题
      hermes doctor fix

      🔄 更新管理

      bash
      # 更新 Hermes 到最新版本
      hermes update
      
      # 查看详细更新日志
      hermes update --verbose
      
      # 检查更新
      hermes update check
      
      # 回滚到旧版本
      hermes update rollback --version 0.12.0

      📦 数据管理

      bash
      # 备份配置
      hermes config backup ./hermes-backup-$(date +%Y%m%d)
      
      # 恢复配置
      hermes config restore ./hermes-backup-20260525
      
      # 清理临时文件
      hermes cleanup
      
      # 查看会话历史
      hermes logs list
      hermes logs show latest
      
      # 删除旧会话
      hermes logs clean --older-than 30d

      高级选项与参数

      🎨 命令行选项

      bash
      # 版本信息
      hermes --version
      hermes -V
      
      # Profile 选项
      hermes --profile <name> -p <name>
      hermes --resume <session> -r <session>
      hermes --continue [name] -c [name]
      
      # 工作区选项
      hermes --worktree -w
      hermes --yolo
      hermes --pass-session-id
      hermes --ignore-user-config
      hermes --ignore-rules
      
      # TUI 选项
      hermes --tui
      hermes --dev
      
      # 静默模式
      hermes chat -q
      hermes chat --quiet
      hermes chat --summary
      
      # 检查点选项
      hermes chat --checkpoints
      hermes chat --max-snapshots 50
      
      # 工作目录
      hermes chat -w /path/to/project

      🔧 快速命令(config.yaml)

      在 

      ~/.hermes/config.yaml

       中配置:


      yaml

      quick_commands:
        status:
          type: exec
          command: hermes doctor
        gpu:
          type: exec
          command: nvidia-smi --query-gpu=name,memory.total --format=csv,noheader
        restart:
          type: alias
          target: /gateway restart</code></pre>
      </div>
       
      <h3>🌐 MCP 服务器配置</h3>
      <div class="pre-header">bash</div>
      <pre><code class="language-bash"># 设置 MCP 服务器
      hermes config set mcp_servers.github command:npx args:["-y", "@modelcontextprotocol/server-github"]
      hermes config set mcp_servers.gitlab command:npx args:["-y", "@modelcontextprotocol/server-gitlab"]
      hermes config set mcp_servers.docker command:npx args:["-y", "@modelcontextprotocol/server-docker"]
      
      # 设置环境变量
      hermes config set mcp_servers.github.ENV GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_TOKEN
      hermes config set mcp_servers.docker.ENV DOCKER_HOST=$DOCKER_HOST</code></pre>
      <h3>📁 配置文件示例</h3>
      <h4><code>~/.hermes/config.yaml

       

      yaml
      # 基础配置
      model:
        provider: anthropic
        model: claude-3-5-sonnet-20241022
      
      agent:
        max_turns: 90
        tool_choice: auto
        quiet_mode: false
        save_trajectories: false
        skip_context_files: false
        skip_memory: false
      
      display:
        tool_progress_command: false
      
      tools:
        enabled:
          - terminal
          - web
          - skills
        disabled: []
      
      # 终端工具配置
      tools:
        terminal:
          environment: local
          timeout: 180
          pty: true
      
      # 检查点配置
      checkpoints:
        enabled: true
        max_snapshots: 20
      
      # 会话配置
      session:
        pass_session_id: false
      
      # 快速命令
      quick_commands:
        status:
          type: exec
          command: hermes doctor
        gpu:
          type: exec
          command: nvidia-smi
        restart:
          type: alias
          target: /gateway restart</code></pre>
      </div>
       
      <h4><code>~/.hermes/.env
      bash
      # API Keys
      OPENAI_API_KEY=sk-xxx
      ANTHROPIC_API_KEY=sk-ant-xxx
      GEMINI_API_KEY=xxx
      GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx
      
      # Gateway 配置
      TELEGRAM_BOT_TOKEN=xxx
      DISCORD_CLIENT_ID=xxx
      DISCORD_CLIENT_SECRET=xxx
      SLACK_BOT_TOKEN=xoxb-xxx
      
      # SMTP 配置(如使用)
      SMTP_SERVER=smtp.gmail.com
      SMTP_PORT=587
      SMTP_USER=your@email.com
      SMTP_PASSWORD=xxx
      FROM_EMAIL=your@email.com
      
      # sudo 密码(如需)
      SUDO_PASSWORD=xxx

      常用工作流

      🚀 快速开始

      bash
      # 1. 安装
      curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
      
      # 2. 配置
      hermes setup
      
      # 3. 设置模型
      hermes model set --provider anthropic --model "claude-3-5-sonnet"
      
      # 4. 启用工具
      hermes tools enable terminal
      hermes tools enable web
      
      # 5. 开始聊天
      hermes

      💼 开发环境设置

      bash
      # 创建开发 Profile
      hermes profile create dev
      hermes profile set dev.model "gemini/gemini-2.0-flash"
      hermes profile set dev.tools enabled terminal,web,skills,browser
      hermes profile set dev.mcp_servers github command:npx args:["-y", "@modelcontextprotocol/server-github"]
      
      # 使用开发 Profile
      hermes -p dev chat "帮我审查这个代码"

      🏢 工作环境设置

      bash
      # 创建工作 Profile
      hermes profile create work
      hermes profile set work.model "anthropic/claude-3-5-sonnet"
      hermes profile set work.tools enabled terminal,web,browser,wechat
      
      # 使用工作 Profile
      hermes -p work chat "准备周报"

      📱 消息平台集成

      bash
      # 配置 Telegram 并启动
      hermes gateway telegram config set bot_token=$TELEGRAM_BOT_TOKEN
      hermes gateway telegram start
      
      # 配置 Discord 并启动
      hermes gateway discord config set client_id=$DISCORD_CLIENT_ID
      hermes gateway discord config set client_secret=$DISCORD_CLIENT_SECRET
      hermes gateway discord start
      
      # 配置 Slack 并启动
      hermes gateway slack config set bot_token=$SLACK_BOT_TOKEN
      hermes gateway slack start

      🔍 故障排查

      bash
      # 诊断问题
      hermes doctor --verbose
      
      # 检查 API 密钥
      hermes doctor check-keys
      
      # 检查配置
      hermes doctor check-config
      
      # 检查工具
      hermes doctor check-tools
      
      # 浏览器扩展诊断
      hermes browser-extension doctor
      
      # 查看详细日志
      hermes gateway logs --follow --level=debug

      🔄 更新和迁移

      bash
      # 更新到最新版本
      hermes update
      
      # 从 OpenClaw 迁移
      hermes claw migrate
      
      # 清理临时文件
      hermes cleanup
      
      # 备份配置
      hermes config backup

      附录:完整命令列表

      主要命令

      命令说明
      hermes
      交互式聊天(默认)
      hermes chat
      单次查询模式
      hermes model
      模型管理
      hermes tools
      工具配置
      hermes skills
      技能管理
      hermes config
      配置设置
      hermes profile
      Profile 管理
      hermes gateway
      网关管理
      hermes update
      更新 Hermes
      hermes doctor
      系统诊断
      hermes cleanup
      清理临时文件
      hermes browser-extension
      浏览器扩展管理
      hermes computer-use
      计算机使用工具管理

      子命令

      命令说明
      hermes model set
      设置模型
      hermes model list
      列出模型
      hermes model search
      搜索模型
      hermes tools enable
      启用工具
      hermes tools disable
      禁用工具
      hermes tools list
      列出工具
      hermes tools show
      显示工具详情
      hermes skills install
      安装技能
      hermes skills uninstall
      卸载技能
      hermes skills list
      列出技能
      hermes profile create
      创建 Profile
      hermes profile delete
      删除 Profile
      hermes profile configure
      配置 Profile
      hermes profile use
      使用 Profile
      hermes gateway start
      启动网关
      hermes gateway stop
      停止网关
      hermes gateway logs
      查看日志
      hermes gateway config
      网关配置

      常用组合

      bash
      # 完整交互会话
      hermes --profile dev --model "gemini/gemini-2.0-flash" chat -w /path/to/project
      
      # 静默模式快速查询
      hermes chat -q "总结这个文件" -w /path/to/file.md
      
      # 启用多个工具
      hermes tools enable terminal web skills browser
      
      # 配置 MCP 服务器
      hermes config set mcp_servers.github command:npx args:["-y", "@modelcontextprotocol/server-github"]
      
      # 查看配置
      hermes config show
      hermes config get agent.max_turns

      参考链接


      更新日志

      v1.0 (当前版本)

      • ✅ 完整的 CLI 命令文档
      • ✅ 所有子命令和选项
      • ✅ 常用工作流示例
      • ✅ 故障排查指南

      重要变更

      • hermes tools

         替代了旧版 

        hermes tools enable/disable
      • hermes profile create

         支持批量创建

      • hermes computer-use install

         用于安装 cua-driver

      • hermes browser-extension doctor

         用于诊断浏览器扩展


      最后更新: 2026-05-25
      维护者: Nous Research

正在查看 0 条回复
  • 在下方一键注册,登录后就可以回复啦。