AFRouter — FREE AI 路由器和托肯保护器
永不停止编码. 以RTK + 自动倒回FREE & 廉价AI模式保存20-40%的令牌.
连接所有AI代码工具(Claude Code, Cursor, Antigravity, Copilot, Codex, 双子座, OpenCode, Cline, OpenClaw...)到40+AI提供商和100+模型.
AFRouter 软件 保持个人叉 9号路透社它运送更多供应商,并修复尚未上游的诺斯门户网站(Hermes CLI OAuth)、OrcaRouter、同时在供应商卡上进行模型测试,以及多模式的Grok Building集成——拥有自己的指挥权(
afrouter)和单独的数据目录.
上游9号路透 二. 支助 AFRouter 重播
为什么是AFRouter?
停止浪费钱,代币和打出限制:
- * 每月订阅配额到期
- QQ 利率限制停止中编码
- QQ 工具输出( git diff, grep, Is. ) 快速刻录符号
- * 昂贵的API(每个供应商每月20-50美元)
AFRouter 解决了这个问题 (所有9路特的核心,加上叉子外加):
- ✅ RTK 托肯保护程序 - 自动压缩工具 结果, 保存 20- 40% 的令牌
- ✅ 最大限度的订阅 - 曲目配额,在重置前使用每一分
- ✅ 自动倒置 免费、零停机
- ✅ 多账户 - 每家供应商账户之间的轮旋
- ✅ 通用 - 与OpenAI/Claude兼容的CLI合作
- ✅ 叉外加数 - Nous Portal, OrcaRouter,多型格罗克建筑,同时进行模型测试
QQ 快速启动
npm install -g @afg473319/afrouter
afrouter
# Or run directly with npx
npx @afg473319/afrouter
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080} http://localhost:20128
和9路透一起跑吗? 有——AFRouter将其数据保存在自己的目录中,因此它不会与股票9路特安装共享状态. 一次只在20128号端口运行其中之一,或以 --port。 。 。 .
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模型编码.
杜克吗? AFRouter 目前只使用 npm —— 使用 上游 9 Router 的 Docker 图像 如果你部署在一个容器.
QQ CLI 选项
afrouter # Start with default settings (port 20128)
afrouter --port 8080 # Custom port
afrouter --no-browser # Don't open browser
afrouter --skip-update # Skip auto-update check
afrouter --help # Show all options
盘子数字 : http://localhost:20128/dashboard
QQ 无头模式( 标语和 AI 代理)
无头模式使许多仪表板操作非互动性地暴露出来,但均等是
尚未完成。 见 ../CLI_AUDIT.md 用于已知缺口和当前修复范围.
无头命令 : 已运行 网关并绕过发射器 :
afrouter <domain> <action> [flags]
afrouter status
afrouter providers list
afrouter models list --filter claude
afrouter chat --model cc/claude-sonnet-5 --prompt "say hi"
echo "summarize: ..." | afrouter chat --model ag/gemini-3-flash
公约:
- JSON 默认退出 (方便代理人);
--human打印表格. - 错误转到 stderr 有退出代码 :
0好,你别这样,1错误,2使用错误. - 目标网关数字 :
--port/-p(默认)20128,或AFROUTER_PORT, (中文(简体) ),--host/-H(默认)127.0.0.1,或AFROUTER_HOST) (中文(简体) ). - 认证:自动通过本地的机器代号——不需要在同一台机器上登录.
- 全文参考数字 :
afrouter <domain> --help(每个领域帮助是真理的来源).
| 域名 | 实例 |
|---|---|
status | afrouter status 保健+版本 |
providers | list, (中文(简体) ), test <id>, (中文(简体) ), test-batch --mode all, (中文(简体) ), enable/disable <id>, (中文(简体) ), add --provider openai --name Main --api-key sk-... |
nodes | list, (中文(简体) ), add --name X --prefix x --base-url https://... --type openai-compatible |
keys | list, (中文(简体) ), create --name ci, (中文(简体) ), delete <id> |
combos | list, (中文(简体) ), create --name route --models cc/claude-sonnet-5,cx/gpt-5.2, (中文(简体) ), presets --source claude |
models | list --filter <q>, (中文(简体) ), ping --model <m>, (中文(简体) ), alias-set --alias a --model <m>, (中文(简体) ), pricing |
usage | stats --period 7d, (中文(简体) ), requests --provider cline --page-size 50, (中文(简体) ), connection <id> |
settings | get, (中文(简体) ), set --key rtkEnabled --value false, (中文(简体) ), db-export --file backup.json, (中文(简体) ), shutdown |
network | endpoint, (中文(简体) ), tunnel-on/tunnel-off, (中文(简体) ), pools, (中文(简体) ), pxpipe-stats, (中文(简体) ), tailscale-enable |
tools | statuses, (中文(简体) ), setup --tool kilo --model cc/claude-sonnet-5, (中文(简体) ), reset --tool cline |
media | voices --provider edge-tts --lang en |
chat | chat --model <m> --prompt <text> (或有管状铁屑; --system, (中文(简体) ), --max-tokens, (中文(简体) ), --temperature(中文(简体) ) |
| □ QQ 连接到远程 AFRouter |
已经在另一台机器上运行了9路透(比如在你的局域网上运行团队服务器)? 将这个机器的 CLI 工具对准它——没有开始本地服务器:
npx @afg473319/afrouter connect http://<server-host>:20128 # pick tools interactively
npx @afg473319/afrouter connect http://<server-host>:20128 --tools claude,codex # or choose up front
npx @afg473319/afrouter connect --reset --tools claude,codex # undo
它使用仪表板密码( 隐藏快取) 登录、 重复使用或创建命名的 API 密钥 cli-<hostname>,并写入每个工具的配置(备份一次原作) *.bak-afrouter) (中文(简体) ).
获得支持: claude, (中文(简体) ), codex, (中文(简体) ), opencode, (中文(简体) ), droid, (中文(简体) ), crush, (中文(简体) ), kilo, (中文(简体) ), cline,或 all。其他选项: --model, (中文(简体) ), --opus/--sonnet/--haiku/--fable, (中文(简体) ), --api-key, (中文(简体) ), --key-name, (中文(简体) ), --print-env。见 afrouter 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作品的工具.
数据位置
AFRouter将其状态与9路特分开:
- macOS/ 在线数字 :
~/.afrouter/db/data.sqlite - 窗口数字 :
%APPDATA%/afrouter/db/data.sqlite - 覆盖到
DATA_DIR环境变量.
页:1
- AFRouter 回波器数字 : https://github.com/AFG473319/AF鲁特
- 上游 9 Router 文件数字 : https://github.com/decolua/9router (英语)
- 网站数字 : https://9router.com (英语)
承认
- 9号路透社 - 这叉子在上游
- CLIProxyAPI (英语) - 原实施
许可证
麻省理工学院许可证——见 自由主义 详细情况.