Appearance
Hermes Agent 的安装脚本已经把 90% 的脏活累活都自动化了。你只需要复制粘贴一行命令。这篇文章用 10 分钟带你走完全程:从敲下安装命令,到和 Hermes 完成第一次对话。
一键安装:复制粘贴就完事?
理论上是的。但"复制粘贴"这四个字背后,藏着三个不同的版本。
Mac / Linux / WSL2 用户
打开终端,复制下面这行,回车:
bash
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash等几分钟。你会看到终端疯狂滚动一堆日志,最后停在 Hermes installed successfully 字样。恭喜,装完了。
国内用户:GitHub 太慢?用镜像
如果上面那条命令卡住超过 5 分钟,说明 GitHub 访问不畅。换国内镜像:
bash
curl -fsSL https://res1.hermesagent.org.cn/install.sh | bash这是中文社区维护的加速镜像,源码和官方同步,不用担心版本落后。
Windows 用户:两种路子
路子一:WSL2(推荐)
先在 PowerShell(管理员)里装好 WSL2:
powershell
wsl --install -d Ubuntu-22.04重启电脑后,会自动弹出 Ubuntu 终端。设好用户名和密码,然后执行上面那条 Mac/Linux 命令。本质上 WSL2 就是个跑在 Windows 里的 Linux 虚拟机,所以命令通用。
路子二:原生 PowerShell(不推荐)
如果你实在不想装 WSL2,可以用 PowerShell 装原生版:
powershell
irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1 | iex注意:原生 Windows 版有一些已知问题,官方明确说"不支持 Windows 原生环境",这条路属于"能跑但别报 BUG"的状态。
建议:别省那两分钟,装个 WSL2,省得后面折腾。
安装脚本在干什么
脚本会自动完成以下 9 步:
| 步骤 | 操作 | 说明 |
|---|---|---|
| 1 | 检查系统 | Linux/Mac/WSL2 |
| 2 | 安装 uv | Python 包管理器 |
| 3 | 安装 Python | 3.11+ |
| 4 | 安装 Node.js | 22+ |
| 5 | 安装 PortableGit | 如果没有的话 |
| 6 | 克隆仓库 | NousResearch/hermes-agent |
| 7 | 创建虚拟环境 | venv |
| 8 | 安装依赖 | pip install -r requirements.txt |
| 9 | 配置 PATH | 添加 hermes 命令 |
首次启动:配置向导
装完之后,第一次运行 hermes 会自动进入配置向导:
bash
hermes第一步:选择模型
| 选项 | 说明 |
|---|---|
| OpenRouter | 免费额度(推荐新手) |
| OpenAI | GPT-4 |
| Anthropic | Claude |
| Ollama | 本地模型 |
第二步:输入 API Key
bash
# 如果选 OpenRouter
Enter API Key: sk-or-v1-xxxxx
# 如果选 OpenAI
Enter API Key: sk-xxxxx第三步:选择平台
| 选项 | 说明 |
|---|---|
| Telegram | 即时通讯 |
| Discord | 社区平台 |
| Slack | 团队协作 |
| 本地终端 | 仅本地使用 |
第四步:配置记忆系统
| 选项 | 说明 |
|---|---|
| SQLite | 轻量(默认) |
| PostgreSQL | 企业级 |
| Pinecone | 向量检索 |
第五步:设置 TUI 主题
bash
# 可选主题
default / sakura / ocean / forest / cyberpunk / matrix源码安装(可选)
如果想从源码安装:
bash
# 克隆仓库
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
# 安装依赖
uv sync
# 安装 CLI
uv pip install -e .
# 验证
hermes --version验证安装
检查版本
bash
hermes --version
# → hermes-agent v0.x.x检查配置
bash
hermes config show启动对话
bash
hermes chat看到欢迎信息就说明装好了:
╔══════════════════════════════════════════════════╗
║ Hermes Agent v0.x.x ║
║ Type '/help' for commands ║
╚══════════════════════════════════════════════════╝
How can I help you today?常见问题速查
| 问题 | 原因 | 解决 |
|---|---|---|
| 命令找不到 | PATH 没刷新 | source ~/.bashrc 或重启终端 |
| GitHub 卡住 | 网络问题 | 用国内镜像 |
| Python 版本不对 | 版本过低 | uv python install 3.11 |
| API Key 无效 | Key 过期或格式错 | 重新复制 Key |
| Permission denied | 权限问题 | chmod +x 或 sudo |
| 模块找不到 | 虚拟环境没激活 | source .venv/bin/activate |
| WSL2 报错 | 虚拟化没开 | BIOS 开启 VT-x/AMD-V |
| Windows 原生抽风 | 不支持 | 换 WSL2 |
一句话总结
Hermes Agent 一行命令安装:
bash
# Mac/Linux/WSL2
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
# 国内用户
curl -fsSL https://res1.hermesagent.org.cn/install.sh | bashWindows 用户推荐装 WSL2,别省那两分钟。
