feat(cli): make hermes portal the human-readable Portal onboarding alias

`hermes portal` (no subcommand) now runs the one-shot Nous Portal onboarding
— OAuth login, switch provider to Nous, offer Tool Gateway — identical to
`hermes setup --portal` and the human-readable alias for
`hermes auth add nous --type oauth` (which still works).

The prior status default moves to `hermes portal info`; `status` is kept as a
hidden back-compat alias. `open`/`tools` subcommands are unchanged.

User-facing hints and docs (status.py, conversation_loop 401 guidance,
SystemPage, README, website docs + zh-Hans) now point at `hermes portal` /
`hermes portal info`. `--manual-paste` references keep the explicit auth
command since `hermes portal` does not expose that flag.
This commit is contained in:
kshitijk4poor
2026-06-04 01:19:28 +05:30
parent 39fee4f3bc
commit da4f407e51
21 changed files with 212 additions and 58 deletions
@@ -57,7 +57,7 @@ hermes auth add nous --type oauth --manual-paste
## 3. 验证配置是否成功
```bash
hermes portal status
hermes portal info
```
你应该看到:
@@ -175,12 +175,12 @@ hermes cron add "Daily AI news summary" "every day at 9am" \
## 故障排查
### 运行 `hermes setup --portal` 后,`hermes portal status` 显示"not logged in"
### 运行 `hermes setup --portal` 后,`hermes portal info` 显示"not logged in"
OAuth 流程未完成。重新运行:
```bash
hermes auth add nous --type oauth
hermes portal
```
如果浏览器未打开或回调失败,你可能在远程/无头主机上——参见 [OAuth over SSH](/guides/oauth-over-ssh) 了解端口转发和手动粘贴的解决方案。
@@ -200,7 +200,7 @@ hermes model
# 选择 Nous Portal
```
使用 `hermes portal status` 重新验证。
使用 `hermes portal info` 重新验证。
### Tool Gateway 工具显示合作方名称而非"via Nous Portal"
@@ -236,7 +236,7 @@ Portal 目录镜像了 OpenRouter 的模型列表(300+ 个)。如果某个
### 账单未出现在我的 Portal 账号中
`hermes portal status` 会告诉你是否真的在通过 Portal 路由,还是使用了其他 provider。常见原因:
`hermes portal info` 会告诉你是否真的在通过 Portal 路由,还是使用了其他 provider。常见原因:
- `model.provider` 设置为 `openrouter`/`anthropic`/等,而非 `nous`
- OAuth refresh 失败后回退到了其他已配置的 provider
@@ -126,12 +126,15 @@ OAuth 需要浏览器,但回调的 loopback 运行在 Hermes 所在的机器
### 查看当前配置状态
```bash
hermes portal status # 登录状态、订阅信息、模型与 gateway 路由
hermes portal # 登录 Nous Portal 并完成配置(一键引导)
hermes portal info # 登录状态、订阅信息、模型与 gateway 路由
hermes portal tools # 详细的 Tool Gateway 目录及每个工具的路由信息
hermes portal open # 在浏览器中打开订阅管理页面
```
`hermes portal status`(或直接 `hermes portal`)给出高层概览:
`hermes portal`(不带子命令)是 `hermes auth add nous --type oauth` 的易记别名——它会登录、把 Nous 设为推理服务商,并提供 Tool Gateway 启用选项(与 `hermes setup --portal` 等价)。
`hermes portal info` 给出高层概览:
```
Nous Portal
@@ -230,12 +233,12 @@ Hermes 在每次推理调用时从存储的 Portal refresh token 生成短期 JW
## 故障排查
### `hermes portal status` 显示"not logged in"
### `hermes portal info` 显示"not logged in"
你尚未完成 OAuth 流程,或 refresh token 已被清除。运行:
```bash
hermes auth add nous --type oauth
hermes portal
```
或使用 `hermes model` 重新选择 Nous Portal。
@@ -256,7 +259,7 @@ Portal 通过 OpenRouter 代理,因此 OpenRouter 支持的所有模型通常
### 账单未出现在我的 Portal 账号中
先检查 `hermes portal status`——如果显示你正在使用其他提供商(`Model: currently openrouter` 而非 `using Nous as inference provider`),说明本地配置已偏离。运行 `hermes model`,选择 Nous Portal,下一次请求将通过你的订阅路由。
先检查 `hermes portal info`——如果显示你正在使用其他提供商(`Model: currently openrouter` 而非 `using Nous as inference provider`),说明本地配置已偏离。运行 `hermes model`,选择 Nous Portal,下一次请求将通过你的订阅路由。
## 另请参阅
@@ -58,7 +58,7 @@ sidebar_position: 1
```bash
hermes setup --portal # 全新安装——一条命令完成 OAuth + 提供商 + 网关配置
hermes model # 已有安装——从列表中选择"Nous Portal"
hermes portal status # 随时查看登录状态和路由信息
hermes portal info # 随时查看登录状态和路由信息
```
还没有订阅?前往 [portal.nousresearch.com/manage-subscription](https://portal.nousresearch.com/manage-subscription) 购买。
@@ -77,7 +77,7 @@ OpenAI Codex 提供商通过设备码(device code)认证——打开一个 U
:::
:::tip Nous Tool Gateway
付费 Nous Portal 订阅者还可访问 **[Tool Gateway](/user-guide/features/tool-gateway)**——网页搜索、图像生成、TTS 和浏览器自动化,均通过你的订阅路由。无需额外 API key。全新安装时,`hermes setup --portal` 一条命令即可完成登录、设置 Nous 为提供商并开启网关。现有用户可通过 `hermes model``hermes tools` 按工具启用。随时使用 `hermes portal status` 查看路由状态。
付费 Nous Portal 订阅者还可访问 **[Tool Gateway](/user-guide/features/tool-gateway)**——网页搜索、图像生成、TTS 和浏览器自动化,均通过你的订阅路由。无需额外 API key。全新安装时,`hermes setup --portal` 一条命令即可完成登录、设置 Nous 为提供商并开启网关。现有用户可通过 `hermes model``hermes tools` 按工具启用。随时使用 `hermes portal info` 查看路由状态。
:::
### 模型管理的两个命令
@@ -12,7 +12,7 @@ Hermes 使用两类模型槽位:
本页介绍如何通过仪表板配置上述两类模型。如需使用配置文件或 CLI,请跳至底部的[其他方法](#alternative-methods)。
:::tip 最快路径:Nous Portal
[Nous Portal](/user-guide/features/tool-gateway) 在单一订阅下提供 300+ 个模型。全新安装后,运行 `hermes setup --portal` 即可登录并一键将 Nous 设为提供商。使用 `hermes portal status` 查看当前配置。
[Nous Portal](/user-guide/features/tool-gateway) 在单一订阅下提供 300+ 个模型。全新安装后,运行 `hermes setup --portal` 即可登录并一键将 Nous 设为提供商。使用 `hermes portal info` 查看当前配置。
:::
## Models 页面
@@ -24,7 +24,7 @@ description: "将你的 Nous Portal 订阅(或其他 OAuth 提供商)用作
### 1. 登录你的提供商(仅需一次)
```bash
hermes auth add nous
hermes portal
```
这会打开浏览器进行 Nous Portal OAuth 流程。Hermes 将刷新令牌存储在 `~/.hermes/auth.json` 中——与所有 Hermes 提供商登录信息存放在同一位置。
@@ -76,7 +76,7 @@ Hermes proxy upstream adapters
[nous ] Nous Portal — ready (bearer expires 2026-05-15T06:43:21Z)
```
如果显示 `not logged in`,请运行 `hermes auth add nous`。如果显示 `credentials need attention`,说明你的刷新令牌已被撤销(较少见——通常发生在你从 Portal Web UI 退出登录时)——重新运行 `hermes auth add nous` 即可。
如果显示 `not logged in`,请运行 `hermes portal`。如果显示 `credentials need attention`,说明你的刷新令牌已被撤销(较少见——通常发生在你从 Portal Web UI 退出登录时)——重新运行 `hermes portal` 即可。
## 允许的路径