Hermes Agent 支持 macOS,但安装过程有几个点需要注意。本文是 macOS 专属安装指南,覆盖从零配置到运行的全流程,以 MiniMax 为例演示 AI 提供商配置。
打开终端,运行:
|
1 |
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash |
安装脚本自动处理:
|
1 |
source ~/.zshrc # macOS 默认使用 zsh |
建议重启终端窗口,确保环境变量生效。
|
1 |
hermes --version |
或直接启动:
|
1 |
hermes |
看到欢迎界面即为成功。
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。
方式一:交互式配置(推荐新手)
|
1 |
hermes setup |
向导引导完成:
方式二:命令行配置
|
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 |
|
1 2 3 4 5 6 7 8 |
# 查看当前配置 hermes config get
# 查看可用模型 hermes model list
# 诊断问题 hermes doctor |
TUI 模式需要 Node.js。
|
1 2 3 4 5 6 |
# 使用 Homebrew brew install node
# 或使用 nvm brew install nvm nvm install --lts |
|
1 2 |
cd hermes-agent/ui-tui npm install |
|
1 |
hermes --tui |
或指定模型:
|
1 |
hermes --tui --model minimax-cn/MiniMax-M2.7 |
如果 GitHub 访问较慢,使用镜像:
|
1 2 |
# 使用 Gitee 镜像 curl -fsSL https://gitee.com/nousresearch/hermes-agent/raw/main/scripts/install.sh | bash |
|
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 |
|
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 |
|
1 2 3 4 5 6 7 8 9 |
# 重新加载 shell source ~/.zshrc
# 检查安装 ls ~/.hermes/
# 手动添加路径 echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc source ~/.zshrc |
|
1 2 3 4 5 |
# 确认使用的是 MINIMAX_CN_API_KEY(国内版) hermes config get | grep MINIMAX
# 检查 Key 是否有效 hermes doctor |
|
1 2 3 4 5 |
# 查看支持的模型 hermes model list
# 使用确切的模型名称 hermes config set model MiniMax-M2.7 |
|
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 |