返回顶部
分享到

macOS系统下安装与配置Hermes Agent的完整教程

Ai 来源:互联网 作者:佚名 发布时间:2026-05-11 22:19:15 人浏览
摘要

Hermes Agent 支持 macOS,但安装过程有几个点需要注意。本文是 macOS 专属安装指南,覆盖从零配置到运行的全流程,以 MiniMax 为例演示 AI 提供商配置。 1. 安装 Hermes Agent 1.1 系统要求 macOS 10.x 或更

Hermes Agent 支持 macOS,但安装过程有几个点需要注意。本文是 macOS 专属安装指南,覆盖从零配置到运行的全流程,以 MiniMax 为例演示 AI 提供商配置。

1. 安装 Hermes Agent

1.1 系统要求

  • macOS 10.x 或更高
  • Python 3.11+
  • Homebrew(可选)

1.2 一键安装

打开终端,运行:

1

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

安装脚本自动处理:

  • Python 环境检查
  • Node.js(TUI 界面依赖)
  • ripgrep(代码搜索)
  • ffmpeg(媒体处理)
  • Git 仓库 clone
  • 虚拟环境配置
  • hermes 命令全局注册

1.3 重新加载 Shell

1

source ~/.zshrc   # macOS 默认使用 zsh

建议重启终端窗口,确保环境变量生效。

1.4 验证安装

1

hermes --version

或直接启动:

1

hermes

看到欢迎界面即为成功。

2. 配置 MiniMax API

2.1 MiniMax 提供商说明

Hermes Agent 支持多个 AI 提供商,MiniMax 有两个端点:

端点 Provider 名 API Key 环境变量
api.minimax.io minimax MINIMAX_API_KEY
api.minimaxi.com minimax-cn MINIMAX_CN_API_KEY

国内 Coding Plan 用户,应选择 minimax-cn。

2.2 获取 API Key

  1. 登录 MiniMax 控制台
  2. 进入「API Key」页面
  3. 复制已有 Key 或创建新 Key

2.3 配置方式

方式一:交互式配置(推荐新手)

1

hermes setup

向导引导完成:

  • 选择推理提供商
  • 输入 API Key
  • 配置基础选项

方式二:命令行配置

1

2

3

4

5

6

7

8

# 设置 MiniMax CN API Key

hermes config set MINIMAX_CN_API_KEY sk-xxxxxxxxxxxxxxxxxxxxxxxx

 

# 设置使用 minimax-cn 提供商

hermes config set provider minimax-cn

 

# 设置默认模型(可选)

hermes config set model MiniMax-M2.7

方式三:环境变量

1

2

3

4

5

6

7

8

9

10

# 编辑 ~/.zshrc

vim ~/.zshrc

 

# 添加以下内容

export MINIMAX_CN_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxx"

export HERMES_PROVIDER="minimax-cn"

export HERMES_MODEL="MiniMax-M2.7"

 

# 重新加载

source ~/.zshrc

2.4 验证配置

1

2

3

4

5

6

7

8

# 查看当前配置

hermes config get

 

# 查看可用模型

hermes model list

 

# 诊断问题

hermes doctor

3. TUI 界面安装(可选)

TUI 模式需要 Node.js。

3.1 安装 Node.js

1

2

3

4

5

6

# 使用 Homebrew

brew install node

 

# 或使用 nvm

brew install nvm

nvm install --lts

3.2 安装依赖

1

2

cd hermes-agent/ui-tui

npm install

3.3 启动 TUI

1

hermes --tui

或指定模型:

1

hermes --tui --model minimax-cn/MiniMax-M2.7

4. 国内加速(可选)

如果 GitHub 访问较慢,使用镜像:

4.1 修改安装脚本

1

2

# 使用 Gitee 镜像

curl -fsSL https://gitee.com/nousresearch/hermes-agent/raw/main/scripts/install.sh | bash

4.2 手动安装

1

2

3

4

5

6

7

8

9

10

11

# 1. 克隆仓库

git clone https://github.com/NousResearch/hermes-agent.git

 

# 2. 进入目录

cd hermes-agent

 

# 3. 安装依赖

pip install -e .

 

# 4. 创建符号链接

ln -s /path/to/hermes-agent/hermes_cli/main.py /usr/local/bin/hermes

5. 常见问题

Q1:安装失败,curl 报错

1

2

3

4

5

6

# 检查网络

curl --version

 

# 使用代理

export https_proxy=http://127.0.0.1:7890

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

Q2:command not found: hermes

1

2

3

4

5

6

7

8

9

# 重新加载 shell

source ~/.zshrc

 

# 检查安装

ls ~/.hermes/

 

# 手动添加路径

echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc

source ~/.zshrc

Q3:MINIMAX_API_KEY 设置了但仍然报错

1

2

3

4

5

# 确认使用的是 MINIMAX_CN_API_KEY(国内版)

hermes config get | grep MINIMAX

 

# 检查 Key 是否有效

hermes doctor

Q4:Model not found

1

2

3

4

5

# 查看支持的模型

hermes model list

 

# 使用确切的模型名称

hermes config set model MiniMax-M2.7

6. 快速参考

1

2

3

4

5

6

7

8

9

10

11

12

13

# 安装

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

 

# 重启终端后配置 MiniMax

hermes config set MINIMAX_CN_API_KEY your_key

hermes config set provider minimax-cn

hermes config set model MiniMax-M2.7

 

# 启动

hermes

 

# 诊断

hermes doctor

总结

步骤 命令
安装 curl ... | bash
配置 Key hermes config set MINIMAX_CN_API_KEY xxx
设置 Provider hermes config set provider minimax-cn
启动 hermes
诊断 hermes doctor

版权声明 : 本文内容来源于互联网或用户自行发布贡献,该文观点仅代表原作者本人。本站仅提供信息存储空间服务和不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权, 违法违规的内容, 请发送邮件至2530232025#qq.cn(#换@)举报,一经查实,本站将立刻删除。

您可能感兴趣的文章 :

原文链接 :
相关文章
  • 本站所有内容来源于互联网或用户自行发布,本站仅提供信息存储空间服务,不拥有版权,不承担法律责任。如有侵犯您的权益,请您联系站长处理!
  • Copyright © 2017-2022 F11.CN All Rights Reserved. F11站长开发者网 版权所有 | 苏ICP备2022031554号-1 | 51LA统计