为自建 newapi 中转站打造的桌面伴侣 —— 一眼看清密钥额度,一键把 Claude Code、Codex 指向你自己的中转。
DeployAPI Tool 是一个跨平台桌面托盘工具(Windows / macOS),基于 Tauri 2 + React 构建。它对接你自建的 newapi(及二次开发版)实例,把分组、密钥、额度、探测延迟收进托盘随时可见,并能把本地的 AI 编程客户端一键切换到你自己的中转线路。
English: A cross-platform desktop tray companion (Windows / macOS) for your self-hosted newapi relay. Watch your groups, keys, quota and probe latency at a glance, and point local AI coding clients (Claude Code, Codex) at your own relay with one click. Built with Tauri 2 + React.
- 分组中心视图 —— 以分组为中心组织密钥与额度,关注即探测,实时连通性与延迟一目了然。
- 额度 / 余额监控 —— 按 newapi 单位(
remain_quota / quota_per_unit)换算真实可用美元与累计已用。 - 托盘速览面板 —— 无边框 webview 弹窗:状态、关注密钥、快速切换、刷新 / 测试 / 暂停 / 打开面板。
- 客户端一键接入 —— 把 Claude Code(
settings.json的ANTHROPIC_BASE_URL/ANTHROPIC_AUTH_TOKEN)和 Codex(config.toml的model_providers/profiles)指向你的中转,自动备份、只合并相关字段。 - 事件日志系统 —— 独立日志页记录探测、切换、应用配置等事件。
- 密钥安全存储 —— 明文 token 只进操作系统凭据库(Windows Credential Manager / macOS Keychain),应用状态只存
secretRef指针,绝不落明文。
从 Releases 下载对应平台安装包:
- Windows ——
.msi/.exe - macOS ——
.dmg
应用内置自动更新检查;有新版本时会提示下载,并在校验签名后安装。
前置:Node.js ≥ 20、Rust 工具链、各平台 Tauri 系统依赖(见 Tauri 前置条件)。
npm install
npm run tauri:build # 产出当前平台的桌面安装包开发模式:
npm run dev # 仅前端,http://localhost:5173
npm run tauri:dev # 桌面壳 + 前端热更新
npm test # Vitest 单元测试(全程 mock,不触达真实服务)| 层 | 技术 |
|---|---|
| 桌面壳 | Tauri 2(Rust) |
| 前端 | React 19 + Vite + TypeScript |
| 凭据存储 | keyring(OS 原生后端) |
| 持久化 | tauri-plugin-store(非密配置切片) |
| 测试 | Vitest |
欢迎 issue 与 PR。提交前请运行 npm test 并确保类型检查通过(npm run build)。本项目对接 newapi 的字段映射以 newapi 上游 / 二开源码的 JSON tag 为准。
本项目以 GNU Affero General Public License v3.0 (AGPL-3.0) 发布 —— 一份强 Copyleft(“病毒性”)开源许可证。任何分发或通过网络提供本软件衍生版本者,必须在相同许可证下公开其完整对应源码。详见 LICENSE。
Copyright (C) 2026 EveStudio
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your
option) any later version. See the LICENSE file for the full text.