9路特 - FREE AI 路由器和托肯保护器
永不停止编码. 以RTK + 自动倒回FREE & 廉价AI模式保存20-40%的令牌.
连接所有AI代码工具(Claude Code, Cursor, Antigravity, Copilot, Codex, 双子座, OpenCode, Cline, OpenClaw...)到40+AI提供商和100+模型.
为什么是9路特?
停止浪费钱,代币和打出限制:
- * 每月订阅配额到期
- QQ 利率限制停止中编码
- QQ 工具输出( git diff, grep, Is. ) 快速刻录符号
- * 昂贵的API(每个供应商每月20-50美元)
9路特解决了这个问题:
- ✅ RTK 托肯保护程序 - 自动压缩工具 结果, 保存 20- 40% 的令牌
- ✅ 最大限度的订阅 - 曲目配额,在重置前使用每一分
- ✅ 自动倒置 免费、零停机
- ✅ 多账户 - 每家供应商账户之间的轮旋
- ✅ 通用 - 与OpenAI/Claude兼容的CLI合作
QQ 快速启动
选项1- npm( 建议桌面):
npm install -g 9router
9router
# Or run directly with npx
npx 9router
备选案文2——多克(服务器/VPS):
docker run -d --name 9router -p 20128:20128 \
-v "$HOME/.9router:/app/data" -e DATA_DIR=/app/data \
decolua/9router:latest
已发布图像 : 多克枢纽 二. 支助 千兆赫 (多平台 amd64/arm64).
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080} http://localhost:20128
2. 连接FREE供应商(不需要注册):
盘子 提供商 连接 基罗大赦国际 (自由克洛德无限)或 打开代码自由 (无授权) 完成!
3. 将以下工具用于国家领导才能工具:
Claude Code/Codex/OpenClaw/Cursor/Cline Settings:
Endpoint: http://localhost:20128/v1
API Key: [copy from dashboard]
Model: kr/claude-sonnet-4.5
就这样! 开始用FREE AI模型编码.
QQ CLI 选项
9router # Start with default settings
9router --port 8080 # Custom port
9router --no-browser # Don't open browser
9router --skip-update # Skip auto-update check
9router --help # Show all options
盘子数字 : http://localhost:20128/dashboard
连接到远程 9 路透社
已经在另一台机器上运行了9路透(比如在你的局域网上运行团队服务器)? 将这个机器的 CLI 工具对准它——没有开始本地服务器:
npx 9router connect http://<server-host>:20128 # pick tools interactively
npx 9router connect http://<server-host>:20128 --tools claude,codex # or choose up front
npx 9router connect --reset --tools claude,codex # undo
它使用仪表板密码( 隐藏快取) 登录、 重复使用或创建命名的 API 密钥 cli-<hostname>,并写入每个工具的配置(备份一次原作) *.bak-9router) (中文(简体) ).
支持的工具 : claude, (中文(简体) ), codex, (中文(简体) ), opencode, (中文(简体) ), droid, (中文(简体) ), crush, (中文(简体) ), kilo, (中文(简体) ), cline, (中文(简体) ), pi, (中文(简体) ), omp,或 all。 。 。 .
模型
模型来自 服务器自己的 CLI 工具配置,所以客户端得到任何 操作员已经选择在仪表板上。 没有硬码.
| 工具 | 模式取自( 第一次比赛获胜) |
|---|---|
claude | 分级旗 (--opus • 服务器的克洛德级 未设置 (Claude Code自己默认) |
| 其他人员 | --model ~ 该工具在服务器上的自有模型 ~ 服务器的OpenCode模型 ~ 工具跳过 |
kilo 服务器上没有可读模型, 因此它总是使用 --model 或 OpenCode 模型. omp (Oh My Pi)不需要模型:它使用代理发现,所以每个服务器模型都出现在下面 9router 内 /model。服务器没有设置的 Claude 级从您的配置中删除, 而不是从早先的运行中删除 。 跳过的工具使命令退出 1。 。 。 .
覆盖服务器的模型
# One Claude tier; the other tiers still come from the server
npx 9router connect http://<server-host>:20128 --tools claude --sonnet cc/claude-sonnet-5-5
# Every Claude tier
npx 9router connect http://<server-host>:20128 --tools claude \
--fable cc/claude-fable-5-1 --opus cc/claude-opus-5-5 \
--sonnet cc/claude-sonnet-5-5 --haiku cc/claude-haiku-4-5-20251001
# All non-Claude tools at once
npx 9router connect http://<server-host>:20128 --tools codex,opencode,kilo --model ocg/deepseek-flash
# Claude and other tools in one run
npx 9router connect http://<server-host>:20128 --tools claude,codex --opus cc/claude-opus-5-5 --model gpt-6
# A different model per tool: --model covers every non-Claude tool in a run, so run once per tool
npx 9router connect http://<server-host>:20128 --tools codex --model gpt-6
npx 9router connect http://<server-host>:20128 --tools opencode --model ocg/glm-5.3
服务器未列出的模型仍然被写入,其中有一个 not listed by server 警告 警告他们 看它所服务的ID: curl http://<server-host>:20128/v1/models -H "Authorization: Bearer <your key>"。 。 。 .
检查当前配置
9router show 打印此机上每个 CLI 工具目前设定的 URL 、 遮盖的 API 密钥和模型 。 它只读取本地文件,从来不接触服务器.
npx 9router show # every supported tool
npx 9router show claude # one tool
npx 9router show claude codex # several
npx 9router show claude --json # machine-readable (key still masked)
✅ Claude Code
File: ~/.claude/settings.json
Base URL: http://<server-host>:20128/v1
API key: sk-a1b…9f3c
Models:
fable cc/claude-fable-5-1
opus cc/claude-opus-5-5
sonnet cc/claude-sonnet-5-5
未指向9路特的工具列为 not configured。对于 Codex 、 OpenCode 和 Cline , 当一个 9router 条目存在时, 它也会发出警告, 但另一个提供者是活动者 .
其他选择
| 选项 | 目的 |
|---|---|
--password <pw> | 密码(或 NINE_ROUTER_PASSWORD; 如果省略, 提示 —— 首选, 使其远离外壳历史 |
--save | 成功登录后, 请保存此服务器的密码到 ~/.9router/connect.env (plain text, mode 600) 所以以后会跳过提示 。 删除文件以忘记它 |
--api-key <key> | 使用此密钥并跳过登录 。 服务器的模型没有登录就无法读取,所以通过模型旗 |
--key-name <name> | 重新使用/创建的 API 密钥名( 默认) cli-<hostname>(中文(简体) ) |
--print-env | 还打印 OPENAI_BASE_URL 编号 : OPENAI_API_KEY 其他 cLI 指标 |
--reset | 从选中的工具中删除 9router 设置 |
见 9router connect --help 完整名单.
过平地
http://密码和 API 密钥是不加密发送的 —— 使用一个可信赖的局域网/ VPN 或将 HTTPS 放在前面 。 API密钥被存储在每个工具的配置文件中.
支持的 CLI 工具
Claude-Code • OpenClaw • Codex • OpenCode • Cursor • Antigravity • Cline • 继续 机器人 • Roo • 副驾驶 • Kilo 代码 • 双子座 CLI • Quen 代码 • iFlow • Crusher • Aider
任何支持OpenAI/Claude-compatiable API作品的工具.
数据位置
- macOS/ 在线数字 :
~/.9router/db/data.sqlite - 窗口数字 :
%APPDATA%/9router/db/data.sqlite - 夹克数字 :
/app/data/db/data.sqlite(数目)$HOME/.9router(将持续)
页:1
完整的文档、高级设置、视频教程和开发指南 :
- GitHub 图像数字 : https://github.com/decolua/9router (英语)
- 完全读取数字 : https://github.com/decolua/9router/blob/master/README.md 互联网档案馆的存檔,存档日期2013-12-11
- 网站数字 : https://9router.com (英语)
承认
- CLIProxyAPI (英语) - 原实施
许可证
麻省理工学院执照 - 看 自由主义 详细情况.