[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71JH6JS6ABZMMZACQPVXWBJ":3,"skill-same:01M71JH6JS6ABZMMZACQPVXWBJ":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M71JH6JS6ABZMMZACQPVXWBJ","hermes-agent-install",null,"在 WSL2 环境中安装 Hermes Agent，自动处理代理网络、Git GnuTLS 兼容性等常见问题。当用户想在 WSL 中安装 hermes-agent、遇到 hermes 安装报错、或需要配置 WSL 代理访问 GitHub 时使用。","FeatherHunter\u002FSKILLS","FeatherHunter","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12967785?v=4","01M71JFD7JMNT8HWC3Y9JKMWGG","王辰浩","01M71JFD8DNYSPJPGX25Y4KX70",6,"MIT","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fhermes-agent-install-1.0.0\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32],"install","hermes","hermes agent","hermes agent install","windows","github","https","hermes-agent","git","2026-11-10 10:12:30",false,"---\nname: hermes-agent-install\ndescription: \"在 WSL2 环境中安装 Hermes Agent，自动处理代理网络、Git GnuTLS 兼容性等常见问题。当用户想在 WSL 中安装 hermes-agent、遇到 hermes 安装报错、或需要配置 WSL 代理访问 GitHub 时使用。\"\nhomepage: https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent\nmetadata: { \"emoji\": \"⚕\", \"requires\": { \"bins\": [\"git\", \"wsl\"], \"platform\": \"windows\" } }\n---\n\n# Hermes Agent Install Skill\n\n在 WSL2 环境中安装 [Hermes Agent](https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent)，自动处理 WSL 代理网络、Git GnuTLS 兼容性等常见问题。\n\n## When to Use\n\n✅ **USE this skill when:**\n\n- \"在 WSL 中安装 hermes agent\"\n- \"安装 hermes-agent\"\n- \"hermes install 报错\"\n- \"WSL 无法访问 GitHub\"\n- \"WSL git GnuTLS 错误\"\n- \"curl install.sh 失败\"\n- \"hermes API 超时\"\n- \"hermes APITimeoutError\"\n\n## When NOT to Use\n\n❌ **DON'T use this skill when:**\n\n- 在原生 Linux\u002FmacOS 上安装（直接用官方命令即可）\n- 配置 hermes 的 API Key → 用 `hermes setup`\n- 使用 hermes 聊天 → 用 `hermes chat`\n\n## 环境前提\n\n| 依赖 | 说明 |\n|------|------|\n| Windows 10\u002F11 + WSL2 | 必须已安装 WSL2 |\n| WSL2 mirrored 网络模式 | `.wslconfig` 中 `networkingMode=mirrored`，这样 WSL 可用 `127.0.0.1` 访问 Windows 代理 |\n| Windows 代理软件 | Clash\u002FV2Ray 等在 Windows 侧监听（如 127.0.0.1:7890） |\n| Windows 侧 Git | 用于从 Windows 端 clone 仓库（绕过 WSL Git GnuTLS 问题） |\n| uv | WSL 中已安装 uv 包管理器（如未安装脚本会自动处理） |\n\n## 核心问题与解决方案\n\n### 问题 1：WSL 无法直接访问 GitHub\n\n**现象**：`curl: (28) SSL connection timeout` 或 `curl: (56) OpenSSL SSL_read: error`\n\n**原因**：WSL2 默认网络模式下无法直连外网，需要通过 Windows 代理\n\n**解决方案**：配置 WSL 代理环境变量\n\n```bash\nexport http_proxy=http:\u002F\u002F127.0.0.1:7890\nexport https_proxy=http:\u002F\u002F127.0.0.1:7890\n```\n\n> ⚠️ 仅 mirrored 网络模式下可用 `127.0.0.1`。NAT 模式需用 Windows 宿主 IP（从 `\u002Fetc\u002Fresolv.conf` 获取）\n\n### 问题 2：Git GnuTLS 与 Clash 代理不兼容\n\n**现象**：`fatal: unable to access '...': GnuTLS recv error (-110): The TLS connection was non-properly terminated.` 或 `gnutls_handshake() failed`\n\n**原因**：Ubuntu 22.04 自带 Git 使用 GnuTLS，与 HTTP 代理的 TLS 握手存在兼容性 bug\n\n**临时方案**（不推荐，有安全风险）：\n```bash\ngit config --global http.sslVerify false\n```\n\n**推荐方案**：从 Windows 侧 clone 仓库，再复制到 WSL：\n```powershell\n# Windows PowerShell 端\ngit clone --recurse-submodules https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent.git \"D:\\hermes-agent\"\n```\n\n```bash\n# WSL 端\ncp -r \u002Fmnt\u002Fd\u002Fhermes-agent ~\u002F.hermes\u002Fhermes-agent\n```\n\n### 问题 3：install.sh 脚本内 git pull 失败\n\n**现象**：安装脚本检测到已有安装，执行 `git pull` 时因 GnuTLS 问题失败\n\n**解决方案**：跳过安装脚本，采用手动安装步骤\n\n### 问题 4：hermes 启动后 API 调用超时\n\n**现象**：`hermes` 启动后发送消息，报 `APITimeoutError`，显示 Provider\u002FModel\u002FEndpoint 信息，重试 3 次均失败\n\n```\n⚠️  API call failed (attempt 1\u002F3): APITimeoutError\n   🔌 Provider: xxx  Model: xxx\n   🌐 Endpoint: https:\u002F\u002Fapi.xxx.com\u002F...\n   📝 Error: Request timed out or interrupted.\n```\n\n**根因分析思路**：\n\n1. **确认是否为 WSL 网络问题**：安装阶段能访问 GitHub（因为配了代理），但 hermes 运行时是新的进程，不会继承安装时的代理环境变量\n2. **验证连通性**：用 `curl` 带代理测试 API 端点是否可达\n3. **核心洞察**：hermes 的网络请求走 Python httpx 库，该库读取 `HTTP_PROXY`\u002F`HTTPS_PROXY` 环境变量（大写），而非 `http_proxy`\u002F`https_proxy`（小写）。需要在 hermes 能读取到的地方配置代理\n\n**解决方案：双重代理配置**\n\nhermes 通过两种方式读取环境变量，因此需要在两处都配置代理：\n\n1. **`~\u002F.hermes\u002F.env`**（hermes 自身的 dotenv 文件，启动时加载）\n2. **`~\u002F.bashrc`**（shell 启动时加载，确保终端环境也有代理）\n\n```bash\n# 写入 hermes 的 .env（hermes 进程会读取）\ncat >> ~\u002F.hermes\u002F.env \u003C\u003C 'EOF'\nHTTP_PROXY=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nHTTPS_PROXY=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nhttp_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nhttps_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nEOF\n\n# 写入 .bashrc（shell 环境也生效）\ncat >> ~\u002F.bashrc \u003C\u003C 'EOF'\nexport http_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nexport https_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nEOF\n```\n\n> 💡 **关键经验**：大小写都要写！`HTTP_PROXY`（大写，Python httpx 读取）和 `http_proxy`（小写，curl\u002Fwget 等工具读取）缺一不可。\n\n**验证**：配置后用 curl 测试 API 端点连通性：\n```bash\nexport http_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nexport https_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\ncurl -s -o \u002Fdev\u002Fnull -w '%{http_code}' --connect-timeout 10 https:\u002F\u002F\u003CAPI端点>\n# 返回任意 HTTP 状态码（非 000）即表示网络通了\n```\n\n然后重新启动 hermes：`source ~\u002F.bashrc && hermes`\n\n## 完整安装流程\n\n### Step 1：检测环境与代理\n\n```bash\n# 检查 WSL 网络模式\ncat \u002Fmnt\u002Fc\u002FUsers\u002F*\u002F\\.wslconfig\n# 期望看到 networkingMode=mirrored\n\n# 测试代理连通性\nexport http_proxy=http:\u002F\u002F127.0.0.1:7890\nexport https_proxy=http:\u002F\u002F127.0.0.1:7890\ncurl -I --connect-timeout 10 https:\u002F\u002Fraw.githubusercontent.com 2>&1\n# 期望返回 HTTP\u002F2 200 或 301\n\n# 检查 Windows 代理端口（在 PowerShell 中）\nnetstat -an | findstr \"LISTENING\" | findstr \"7890\"\n```\n\n### Step 2：配置 Git 代理（WSL 端）\n\n```bash\ngit config --global http.proxy http:\u002F\u002F127.0.0.1:7890\ngit config --global https.proxy http:\u002F\u002F127.0.0.1:7890\n```\n\n### Step 3：从 Windows 端 Clone 仓库\n\n由于 WSL Git 的 GnuTLS 问题，从 Windows 端执行 git clone：\n\n```powershell\n# PowerShell 端执行\ngit clone --recurse-submodules https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent.git \"D:\\hermes-agent\"\n```\n\n### Step 4：复制仓库到 WSL\n\n```bash\n# WSL 端执行\nrm -rf ~\u002F.hermes\u002Fhermes-agent\ncp -r \u002Fmnt\u002Fd\u002Fhermes-agent ~\u002F.hermes\u002Fhermes-agent\n```\n\n### Step 5：创建虚拟环境\n\n```bash\ncd ~\u002F.hermes\u002Fhermes-agent\nexport http_proxy=http:\u002F\u002F127.0.0.1:7890\nexport https_proxy=http:\u002F\u002F127.0.0.1:7890\n~\u002F.local\u002Fbin\u002Fuv venv venv --python 3.11\n```\n\n> 如果 uv 未安装，先执行：`curl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh`\n\n### Step 6：安装 Python 依赖\n\n```bash\nexport VIRTUAL_ENV=\"$(pwd)\u002Fvenv\"\n~\u002F.local\u002Fbin\u002Fuv pip install -e \".[all]\"\n```\n\n> 仅安装核心功能（无 Telegram\u002FDiscord 等）：`~\u002F.local\u002Fbin\u002Fuv pip install -e \".\"`\n\n### Step 7：创建配置目录与文件\n\n```bash\nmkdir -p ~\u002F.hermes\u002F{cron,sessions,logs,memories,skills,pairing,hooks,image_cache,audio_cache,whatsapp\u002Fsession}\ncp ~\u002F.hermes\u002Fhermes-agent\u002Fcli-config.yaml.example ~\u002F.hermes\u002Fconfig.yaml\ntouch ~\u002F.hermes\u002F.env\n```\n\n### Step 8：创建全局命令链接\n\n```bash\nmkdir -p ~\u002F.local\u002Fbin\nln -sf ~\u002F.hermes\u002Fhermes-agent\u002Fvenv\u002Fbin\u002Fhermes ~\u002F.local\u002Fbin\u002Fhermes\n\n# 确保 PATH 包含 ~\u002F.local\u002Fbin\ngrep -q '.local\u002Fbin' ~\u002F.bashrc || echo 'export PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"' >> ~\u002F.bashrc\n```\n\n### Step 9：验证安装\n\n```bash\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\nhermes --version\nhermes doctor\n```\n\n### Step 10：配置运行时代理（关键！）\n\n> ⚠️ **这是最容易被遗漏的步骤**。安装阶段配的代理只对当前终端会话生效，hermes 启动后是独立进程，必须单独配置代理才能访问 LLM API。\n\n```bash\n# 写入 hermes 的 .env 文件（大小写都写，确保 Python httpx 和 curl 都能读取）\ncat >> ~\u002F.hermes\u002F.env \u003C\u003C 'EOF'\nHTTP_PROXY=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nHTTPS_PROXY=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nhttp_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nhttps_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nEOF\n\n# 同时写入 .bashrc（确保终端环境也有代理）\ngrep -q 'http_proxy' ~\u002F.bashrc || cat >> ~\u002F.bashrc \u003C\u003C 'EOF'\nexport http_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nexport https_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nEOF\n```\n\n> 💡 其中 `\u003C代理地址>:\u003C端口>` 替换为你 Windows 代理的实际地址。mirrored 模式下为 `127.0.0.1:\u003C端口>`，NAT 模式下为 Windows 宿主 IP。\n\n### Step 11：安装后配置\n\n```bash\n# 配置 LLM 提供商 API Key\nhermes model\n\n# 或运行完整设置向导\nhermes setup\n```\n\n### Step 12（可选）：安装可选子模块\n\n```bash\ncd ~\u002F.hermes\u002Fhermes-agent\nexport VIRTUAL_ENV=\"$(pwd)\u002Fvenv\"\n~\u002F.local\u002Fbin\u002Fuv pip install -e \".\u002Ftinker-atropos\"  # RL 训练后端\n```\n\n### Step 13（可选）：安装 Node.js 依赖\n\n```bash\ncd ~\u002F.hermes\u002Fhermes-agent\nnpm install  # 浏览器自动化 & WhatsApp bridge\n```\n\n### Step 14：清理\n\n```bash\n# 恢复 git SSL 验证（之前可能临时关闭了）\ngit config --global http.sslVerify true\n\n# 清理 Windows 端临时 clone\n# PowerShell: Remove-Item -Recurse -Force \"D:\\hermes-agent\"\n```\n\n## 故障排查速查表\n\n| 问题 | 命令\u002F方案 |\n|------|-----------|\n| `curl: (28) SSL connection timeout` | 配置 `http_proxy`\u002F`https_proxy` 环境变量 |\n| `GnuTLS recv error (-110)` | 从 Windows 端 clone 仓库再复制到 WSL |\n| `gnutls_handshake() failed` | 同上，或临时 `git config --global http.sslVerify false` |\n| `hermes: command not found` | `source ~\u002F.bashrc` 或检查 `~\u002F.local\u002Fbin` 是否在 PATH |\n| `APITimeoutError` | 在 `~\u002F.hermes\u002F.env` 和 `~\u002F.bashrc` 中配置代理（大小写都要写） |\n| `No API key found` | 运行 `hermes model` 或 `hermes setup` |\n| `uv: command not found` | 安装 uv：`curl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh \\| sh` |\n| 代理端口不确定 | PowerShell: `netstat -an \\| findstr \"LISTENING\"` 查看监听端口 |\n| WSL 网络模式检查 | `cat \u002Fmnt\u002Fc\u002FUsers\u002F*\u002F\\.wslconfig` 查看是否 mirrored |\n| 诊断命令 | `hermes doctor` |\n\n## 代理端口参考\n\n| 代理软件 | HTTP 端口 | SOCKS5 端口 |\n|---------|----------|------------|\n| Clash | 7890 | 7891 |\n| V2RayN | 10809 | 10808 |\n| Shadowsocks | 1080 | - |\n\n> 💡 具体端口以你实际配置为准，上表仅供参考。可在 PowerShell 中用 `netstat -an | findstr \"LISTENING\"` 查看本机监听端口。\n\n## WSL + hermes 代理配置的核心思路\n\nWSL2 中的网络请求需要代理才能访问外网，但不同阶段、不同工具读取代理的方式不同，容易遗漏：\n\n| 阶段 | 工具 | 读取方式 | 配置位置 |\n|------|------|---------|--------|\n| 安装时 curl | curl | `http_proxy`\u002F`https_proxy`（小写）环境变量 | 终端 export |\n| 安装时 git | git | `http.proxy`\u002F`https.proxy` git config | `~\u002F.gitconfig` |\n| 运行时 API 调用 | Python httpx | `HTTP_PROXY`\u002F`HTTPS_PROXY`（**大写**）环境变量 | `~\u002F.hermes\u002F.env` |\n| 运行时终端工具 | curl\u002Fwget | `http_proxy`\u002F`https_proxy`（小写）环境变量 | `~\u002F.bashrc` |\n\n**核心原则**：\n1. **安装时代理 ≠ 运行时代理**——安装时 export 的环境变量不会持久化，hermes 进程启动后需要重新读取\n2. **大小写都要写**——`HTTP_PROXY`（大写，Python 读取）+ `http_proxy`（小写，curl 等读取）\n3. **两处都要配**——`~\u002F.hermes\u002F.env`（hermes 进程读取）+ `~\u002F.bashrc`（shell 环境）\n4. **网络模式决定代理地址**——mirrored 用 `127.0.0.1`，NAT 用宿主 IP\n\n## WSL 网络模式差异\n\n| 模式 | 代理地址 | 配置方式 |\n|------|---------|--------|\n| mirrored | `127.0.0.1:\u003C端口>` | `.wslconfig` 中 `networkingMode=mirrored` |\n| NAT | `\u003C宿主IP>:\u003C端口>`（从 `\u002Fetc\u002Fresolv.conf` 获取） | 默认模式 |\n\n## Related Skills\n\n- `glm-models` - 智谱 GLM 大模型 API 封装，可作为 hermes 的 LLM 提供商\n","# Hermes Agent Install Skill\n\n在 WSL2 环境中安装 [Hermes Agent](https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent)，自动处理 WSL 代理网络、Git GnuTLS 兼容性等常见问题。\n\n## When to Use\n\n✅ **USE this skill when:**\n\n- \"在 WSL 中安装 hermes agent\"\n- \"安装 hermes-agent\"\n- \"hermes install 报错\"\n- \"WSL 无法访问 GitHub\"\n- \"WSL git GnuTLS 错误\"\n- \"curl install.sh 失败\"\n- \"hermes API 超时\"\n- \"hermes APITimeoutError\"\n\n## When NOT to Use\n\n❌ **DON'T use this skill when:**\n\n- 在原生 Linux\u002FmacOS 上安装（直接用官方命令即可）\n- 配置 hermes 的 API Key → 用 `hermes setup`\n- 使用 hermes 聊天 → 用 `hermes chat`\n\n## 环境前提\n\n| 依赖 | 说明 |\n|------|------|\n| Windows 10\u002F11 + WSL2 | 必须已安装 WSL2 |\n| WSL2 mirrored 网络模式 | `.wslconfig` 中 `networkingMode=mirrored`，这样 WSL 可用 `127.0.0.1` 访问 Windows 代理 |\n| Windows 代理软件 | Clash\u002FV2Ray 等在 Windows 侧监听（如 127.0.0.1:7890） |\n| Windows 侧 Git | 用于从 Windows 端 clone 仓库（绕过 WSL Git GnuTLS 问题） |\n| uv | WSL 中已安装 uv 包管理器（如未安装脚本会自动处理） |\n\n## 核心问题与解决方案\n\n### 问题 1：WSL 无法直接访问 GitHub\n\n**现象**：`curl: (28) SSL connection timeout` 或 `curl: (56) OpenSSL SSL_read: error`\n\n**原因**：WSL2 默认网络模式下无法直连外网，需要通过 Windows 代理\n\n**解决方案**：配置 WSL 代理环境变量\n\n```bash\nexport http_proxy=http:\u002F\u002F127.0.0.1:7890\nexport https_proxy=http:\u002F\u002F127.0.0.1:7890\n```\n\n> ⚠️ 仅 mirrored 网络模式下可用 `127.0.0.1`。NAT 模式需用 Windows 宿主 IP（从 `\u002Fetc\u002Fresolv.conf` 获取）\n\n### 问题 2：Git GnuTLS 与 Clash 代理不兼容\n\n**现象**：`fatal: unable to access '...': GnuTLS recv error (-110): The TLS connection was non-properly terminated.` 或 `gnutls_handshake() failed`\n\n**原因**：Ubuntu 22.04 自带 Git 使用 GnuTLS，与 HTTP 代理的 TLS 握手存在兼容性 bug\n\n**临时方案**（不推荐，有安全风险）：\n```bash\ngit config --global http.sslVerify false\n```\n\n**推荐方案**：从 Windows 侧 clone 仓库，再复制到 WSL：\n```powershell\n# Windows PowerShell 端\ngit clone --recurse-submodules https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent.git \"D:\\hermes-agent\"\n```\n\n```bash\n# WSL 端\ncp -r \u002Fmnt\u002Fd\u002Fhermes-agent ~\u002F.hermes\u002Fhermes-agent\n```\n\n### 问题 3：install.sh 脚本内 git pull 失败\n\n**现象**：安装脚本检测到已有安装，执行 `git pull` 时因 GnuTLS 问题失败\n\n**解决方案**：跳过安装脚本，采用手动安装步骤\n\n### 问题 4：hermes 启动后 API 调用超时\n\n**现象**：`hermes` 启动后发送消息，报 `APITimeoutError`，显示 Provider\u002FModel\u002FEndpoint 信息，重试 3 次均失败\n\n```\n⚠️  API call failed (attempt 1\u002F3): APITimeoutError\n   🔌 Provider: xxx  Model: xxx\n   🌐 Endpoint: https:\u002F\u002Fapi.xxx.com\u002F...\n   📝 Error: Request timed out or interrupted.\n```\n\n**根因分析思路**：\n\n1. **确认是否为 WSL 网络问题**：安装阶段能访问 GitHub（因为配了代理），但 hermes 运行时是新的进程，不会继承安装时的代理环境变量\n2. **验证连通性**：用 `curl` 带代理测试 API 端点是否可达\n3. **核心洞察**：hermes 的网络请求走 Python httpx 库，该库读取 `HTTP_PROXY`\u002F`HTTPS_PROXY` 环境变量（大写），而非 `http_proxy`\u002F`https_proxy`（小写）。需要在 hermes 能读取到的地方配置代理\n\n**解决方案：双重代理配置**\n\nhermes 通过两种方式读取环境变量，因此需要在两处都配置代理：\n\n1. **`~\u002F.hermes\u002F.env`**（hermes 自身的 dotenv 文件，启动时加载）\n2. **`~\u002F.bashrc`**（shell 启动时加载，确保终端环境也有代理）\n\n```bash\n# 写入 hermes 的 .env（hermes 进程会读取）\ncat >> ~\u002F.hermes\u002F.env \u003C\u003C 'EOF'\nHTTP_PROXY=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nHTTPS_PROXY=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nhttp_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nhttps_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nEOF\n\n# 写入 .bashrc（shell 环境也生效）\ncat >> ~\u002F.bashrc \u003C\u003C 'EOF'\nexport http_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nexport https_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nEOF\n```\n\n> 💡 **关键经验**：大小写都要写！`HTTP_PROXY`（大写，Python httpx 读取）和 `http_proxy`（小写，curl\u002Fwget 等工具读取）缺一不可。\n\n**验证**：配置后用 curl 测试 API 端点连通性：\n```bash\nexport http_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nexport https_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\ncurl -s -o \u002Fdev\u002Fnull -w '%{http_code}' --connect-timeout 10 https:\u002F\u002F\u003CAPI端点>\n# 返回任意 HTTP 状态码（非 000）即表示网络通了\n```\n\n然后重新启动 hermes：`source ~\u002F.bashrc && hermes`\n\n## 完整安装流程\n\n### Step 1：检测环境与代理\n\n```bash\n# 检查 WSL 网络模式\ncat \u002Fmnt\u002Fc\u002FUsers\u002F*\u002F\\.wslconfig\n# 期望看到 networkingMode=mirrored\n\n# 测试代理连通性\nexport http_proxy=http:\u002F\u002F127.0.0.1:7890\nexport https_proxy=http:\u002F\u002F127.0.0.1:7890\ncurl -I --connect-timeout 10 https:\u002F\u002Fraw.githubusercontent.com 2>&1\n# 期望返回 HTTP\u002F2 200 或 301\n\n# 检查 Windows 代理端口（在 PowerShell 中）\nnetstat -an | findstr \"LISTENING\" | findstr \"7890\"\n```\n\n### Step 2：配置 Git 代理（WSL 端）\n\n```bash\ngit config --global http.proxy http:\u002F\u002F127.0.0.1:7890\ngit config --global https.proxy http:\u002F\u002F127.0.0.1:7890\n```\n\n### Step 3：从 Windows 端 Clone 仓库\n\n由于 WSL Git 的 GnuTLS 问题，从 Windows 端执行 git clone：\n\n```powershell\n# PowerShell 端执行\ngit clone --recurse-submodules https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent.git \"D:\\hermes-agent\"\n```\n\n### Step 4：复制仓库到 WSL\n\n```bash\n# WSL 端执行\nrm -rf ~\u002F.hermes\u002Fhermes-agent\ncp -r \u002Fmnt\u002Fd\u002Fhermes-agent ~\u002F.hermes\u002Fhermes-agent\n```\n\n### Step 5：创建虚拟环境\n\n```bash\ncd ~\u002F.hermes\u002Fhermes-agent\nexport http_proxy=http:\u002F\u002F127.0.0.1:7890\nexport https_proxy=http:\u002F\u002F127.0.0.1:7890\n~\u002F.local\u002Fbin\u002Fuv venv venv --python 3.11\n```\n\n> 如果 uv 未安装，先执行：`curl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh`\n\n### Step 6：安装 Python 依赖\n\n```bash\nexport VIRTUAL_ENV=\"$(pwd)\u002Fvenv\"\n~\u002F.local\u002Fbin\u002Fuv pip install -e \".[all]\"\n```\n\n> 仅安装核心功能（无 Telegram\u002FDiscord 等）：`~\u002F.local\u002Fbin\u002Fuv pip install -e \".\"`\n\n### Step 7：创建配置目录与文件\n\n```bash\nmkdir -p ~\u002F.hermes\u002F{cron,sessions,logs,memories,skills,pairing,hooks,image_cache,audio_cache,whatsapp\u002Fsession}\ncp ~\u002F.hermes\u002Fhermes-agent\u002Fcli-config.yaml.example ~\u002F.hermes\u002Fconfig.yaml\ntouch ~\u002F.hermes\u002F.env\n```\n\n### Step 8：创建全局命令链接\n\n```bash\nmkdir -p ~\u002F.local\u002Fbin\nln -sf ~\u002F.hermes\u002Fhermes-agent\u002Fvenv\u002Fbin\u002Fhermes ~\u002F.local\u002Fbin\u002Fhermes\n\n# 确保 PATH 包含 ~\u002F.local\u002Fbin\ngrep -q '.local\u002Fbin' ~\u002F.bashrc || echo 'export PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"' >> ~\u002F.bashrc\n```\n\n### Step 9：验证安装\n\n```bash\nexport PATH=\"$HOME\u002F.local\u002Fbin:$PATH\"\nhermes --version\nhermes doctor\n```\n\n### Step 10：配置运行时代理（关键！）\n\n> ⚠️ **这是最容易被遗漏的步骤**。安装阶段配的代理只对当前终端会话生效，hermes 启动后是独立进程，必须单独配置代理才能访问 LLM API。\n\n```bash\n# 写入 hermes 的 .env 文件（大小写都写，确保 Python httpx 和 curl 都能读取）\ncat >> ~\u002F.hermes\u002F.env \u003C\u003C 'EOF'\nHTTP_PROXY=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nHTTPS_PROXY=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nhttp_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nhttps_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nEOF\n\n# 同时写入 .bashrc（确保终端环境也有代理）\ngrep -q 'http_proxy' ~\u002F.bashrc || cat >> ~\u002F.bashrc \u003C\u003C 'EOF'\nexport http_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nexport https_proxy=http:\u002F\u002F\u003C代理地址>:\u003C端口>\nEOF\n```\n\n> 💡 其中 `\u003C代理地址>:\u003C端口>` 替换为你 Windows 代理的实际地址。mirrored 模式下为 `127.0.0.1:\u003C端口>`，NAT 模式下为 Windows 宿主 IP。\n\n### Step 11：安装后配置\n\n```bash\n# 配置 LLM 提供商 API Key\nhermes model\n\n# 或运行完整设置向导\nhermes setup\n```\n\n### Step 12（可选）：安装可选子模块\n\n```bash\ncd ~\u002F.hermes\u002Fhermes-agent\nexport VIRTUAL_ENV=\"$(pwd)\u002Fvenv\"\n~\u002F.local\u002Fbin\u002Fuv pip install -e \".\u002Ftinker-atropos\"  # RL 训练后端\n```\n\n### Step 13（可选）：安装 Node.js 依赖\n\n```bash\ncd ~\u002F.hermes\u002Fhermes-agent\nnpm install  # 浏览器自动化 & WhatsApp bridge\n```\n\n### Step 14：清理\n\n```bash\n# 恢复 git SSL 验证（之前可能临时关闭了）\ngit config --global http.sslVerify true\n\n# 清理 Windows 端临时 clone\n# PowerShell: Remove-Item -Recurse -Force \"D:\\hermes-agent\"\n```\n\n## 故障排查速查表\n\n| 问题 | 命令\u002F方案 |\n|------|-----------|\n| `curl: (28) SSL connection timeout` | 配置 `http_proxy`\u002F`https_proxy` 环境变量 |\n| `GnuTLS recv error (-110)` | 从 Windows 端 clone 仓库再复制到 WSL |\n| `gnutls_handshake() failed` | 同上，或临时 `git config --global http.sslVerify false` |\n| `hermes: command not found` | `source ~\u002F.bashrc` 或检查 `~\u002F.local\u002Fbin` 是否在 PATH |\n| `APITimeoutError` | 在 `~\u002F.hermes\u002F.env` 和 `~\u002F.bashrc` 中配置代理（大小写都要写） |\n| `No API key found` | 运行 `hermes model` 或 `hermes setup` |\n| `uv: command not found` | 安装 uv：`curl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh \\| sh` |\n| 代理端口不确定 | PowerShell: `netstat -an \\| findstr \"LISTENING\"` 查看监听端口 |\n| WSL 网络模式检查 | `cat \u002Fmnt\u002Fc\u002FUsers\u002F*\u002F\\.wslconfig` 查看是否 mirrored |\n| 诊断命令 | `hermes doctor` |\n\n## 代理端口参考\n\n| 代理软件 | HTTP 端口 | SOCKS5 端口 |\n|---------|----------|------------|\n| Clash | 7890 | 7891 |\n| V2RayN | 10809 | 10808 |\n| Shadowsocks | 1080 | - |\n\n> 💡 具体端口以你实际配置为准，上表仅供参考。可在 PowerShell 中用 `netstat -an | findstr \"LISTENING\"` 查看本机监听端口。\n\n## WSL + hermes 代理配置的核心思路\n\nWSL2 中的网络请求需要代理才能访问外网，但不同阶段、不同工具读取代理的方式不同，容易遗漏：\n\n| 阶段 | 工具 | 读取方式 | 配置位置 |\n|------|------|---------|--------|\n| 安装时 curl | curl | `http_proxy`\u002F`https_proxy`（小写）环境变量 | 终端 export |\n| 安装时 git | git | `http.proxy`\u002F`https.proxy` git config | `~\u002F.gitconfig` |\n| 运行时 API 调用 | Python httpx | `HTTP_PROXY`\u002F`HTTPS_PROXY`（**大写**）环境变量 | `~\u002F.hermes\u002F.env` |\n| 运行时终端工具 | curl\u002Fwget | `http_proxy`\u002F`https_proxy`（小写）环境变量 | `~\u002F.bashrc` |\n\n**核心原则**：\n1. **安装时代理 ≠ 运行时代理**——安装时 export 的环境变量不会持久化，hermes 进程启动后需要重新读取\n2. **大小写都要写**——`HTTP_PROXY`（大写，Python 读取）+ `http_proxy`（小写，curl 等读取）\n3. **两处都要配**——`~\u002F.hermes\u002F.env`（hermes 进程读取）+ `~\u002F.bashrc`（shell 环境）\n4. **网络模式决定代理地址**——mirrored 用 `127.0.0.1`，NAT 用宿主 IP\n\n## WSL 网络模式差异\n\n| 模式 | 代理地址 | 配置方式 |\n|------|---------|--------|\n| mirrored | `127.0.0.1:\u003C端口>` | `.wslconfig` 中 `networkingMode=mirrored` |\n| NAT | `\u003C宿主IP>:\u003C端口>`（从 `\u002Fetc\u002Fresolv.conf` 获取） | 默认模式 |\n\n## Related Skills\n\n- `glm-models` - 智谱 GLM 大模型 API 封装，可作为 hermes 的 LLM 提供商\n",{"name":5,"homepage":38,"metadata":39,"description":7},"https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent",{"emoji":40,"requires":41},"⚕",{"bins":42,"platform":28},[32,43],"wsl","main","5b2b73ce2fbb69cd70597cfbbf24c99bc9e94b4c","hermes-agent-install-1.0.0",1,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS","https:\u002F\u002Fgithub.com\u002FFeatherHunter","The Boy, The Man, The Human.","2026-09-12 20:33:55",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add FeatherHunter\u002FSKILLS --skill hermes-agent-install",{"tool":58,"command":59},"bunx","bunx skills add FeatherHunter\u002FSKILLS --skill hermes-agent-install",{"tool":61,"command":62},"pnpm","pnpm dlx skills add FeatherHunter\u002FSKILLS --skill hermes-agent-install","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fhermes-agent-install-1.0.0\u002FSKILL.md",true,[66,72],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"_meta.json","REFERENCE","参考文档",113,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fhermes-agent-install-1.0.0\u002F_meta.json",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"hermes-agent-install-1.0.0.html",19856,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fhermes-agent-install-1.0.0\u002Fhermes-agent-install-1.0.0.html",[77,97,106,115,125,131],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":33},"01M71JPWVNC5JZ2FD4CSR3SZC1","饼干记账","记账技能。写入类:记支出、记收入、拍账单、批量录入、改记录、撤销、恢复、记报销、记退款、记借出、记借入、记收回、记偿还、记分期。查询类:查今天、查某天、查月、查区间、查分类、搜备注、查标签、查账户、查账本、查欠款、查待报销。分析类:看月度、看总览、看分类、看对比、看趋势、看大额、做统计、看洞察、看借贷。目标\u002F账户\u002F联动:设定预算、看预算、设定目标、看目标、新增账户、改账户、账户转账、看账户汇总、买东西联动、吃饭联动。**所有查询\u002F分析类唤醒词默认 invoke HTML 工作流**(scripts\u002Fbill_inject.py + templates),写入类保持文字回执。能力速查:说「饼干记账 HELP」\u002F「查帮助」\u002F「能做什么」。完整 70 个唤醒词见 references\u002F路由表.md","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F饼干记账\u002FSKILL.md",[],[79,84,85,86,87,88,89,90,91,92,93,94,95,96],"记账","invoke","templates","文字","预算","账单","统计","收入","scripts","html","支出","help","references",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":33},"01M71JPS100K4E2JN8R3B0F9NR","贴心助理","真实助手 - 主动分析用户状态，关心用户，提供帮助与提醒。不偷懒地联动所有技能，真正像个朋友一样陪伴。","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F贴心助理\u002FSKILL.md",[],[99,104,105],"陪伴","朋友",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":33},"01M71JPPN0WZ1ARA081J0JDNPC","美团","安装美团旅游技能(meituan-travel)向导 - 检查 mtskills 商店并安装 meituan-travel","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F美团\u002FSKILL.md",[],[108,113,114],"meituan","travel",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":33},"01M71JPN921TSX62DXEFY1B8FJ","网易云音乐","安装网易云音乐 CLI 工具(@music163\u002Fncm-cli) - 通过 npm 全局安装","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F网易云音乐\u002FSKILL.md",[],[117,122,123,124],"工具","cli","npm",{"skillNo":126,"name":127,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":33},"01M71JPF82PYTK0NYMJF8Y9E48","私家大厨","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F私家大厨\u002FSKILL.md",[],[127],{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":33},"01M71JPCK6Z5NT3G258NFKEJGG","目录树","目录树技能 - 递归扫描给定目录，输出所有目录和文件的树状结构清单","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F目录树\u002FSKILL.md",[],[138,133,139,140],"目录","文件","文件导航"]