{"id":51238788,"url":"https://github.com/zzhaolei/relayai","last_synced_at":"2026-06-28T22:31:53.736Z","repository":{"id":360115703,"uuid":"1246457918","full_name":"zzhaolei/relayai","owner":"zzhaolei","description":"AI API 代理服务器，支持 Claude、Codex 请求转发。","archived":false,"fork":false,"pushed_at":"2026-06-15T07:04:48.000Z","size":3977,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-15T07:24:30.024Z","etag":null,"topics":["ai","api-proxy","claude-code","codex","wails"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zzhaolei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-22T08:00:15.000Z","updated_at":"2026-06-15T07:04:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zzhaolei/relayai","commit_stats":null,"previous_names":["zzhaolei/relayai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zzhaolei/relayai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzhaolei%2Frelayai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzhaolei%2Frelayai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzhaolei%2Frelayai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzhaolei%2Frelayai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zzhaolei","download_url":"https://codeload.github.com/zzhaolei/relayai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzhaolei%2Frelayai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34906700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","api-proxy","claude-code","codex","wails"],"created_at":"2026-06-28T22:31:53.541Z","updated_at":"2026-06-28T22:31:53.722Z","avatar_url":"https://github.com/zzhaolei.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RelayAI\n\n将多厂商 AI 模型订阅转换为 Claude / Codex 可用接口。基于 [Wails v3](https://wails.io/docs/next/guides/installation) 构建的桌面应用，支持 macOS、Windows、Linux。\n\n## 界面预览\n\n|                  主界面                   |                  添加提供商                  |\n| :-----------------------------------------------: | :--------------------------------------------: |\n| ![主界面](assets/screenshots/main.png) | ![添加提供商](assets/screenshots/add.png) |\n\n## 使用方式\n\n1. 添加提供商：填写名称、Base URL、API Key，选择 CLI 平台\n2. 点击「写入配置」将代理地址写入 `~/.claude/settings.json` 或 `~/.codex/config.toml`\n3. 启动代理服务\n4. 直接使用 Claude CLI 或 Codex CLI，请求会自动通过代理转发\n\n代理会根据请求路径自动路由：\n\n| 路径 | CLI | 说明 |\n|------|-----|------|\n| `/anthropic/*` | Claude | 直接透传 Anthropic 格式 |\n| `/openai/*` | Codex | Responses API ↔ Chat Completions（开启兼容模式时） |\n| `/health` | — | 健康检查 |\n\n## 安装\n\n### 下载预编译版本\n\n从 [Releases](../../releases) 页面下载对应平台的安装包。\n\n### macOS 安装提示\n\nmacOS 未签名的应用首次打开时可能提示 **\"RelayAI\" 已损坏**，这是 Gatekeeper 安全机制，并非文件损坏。解决方法：\n\n```bash\nsudo xattr -r -d com.apple.quarantine /Applications/RelayAI.app\n```\n\n或在 Finder 中右键 → 「打开」→ 确认「打开」。\n\n### 运行\n\n```bash\n# macOS\nopen RelayAI.app\n\n# Windows\nRelayAI.exe\n\n# Linux\n./RelayAI\n```\n\n## 构建\n\n### 前置依赖\n\n- Go 1.26+\n- Node.js 18+\n- [Wails v3](https://wails.io/docs/next/guides/installation)\n\n```bash\ngo install tool\nmake install\n```\n\n### 使用 Make（推荐）\n\n```bash\nmake build                # 构建当前平台\nmake run                  # 构建并运行\nmake build-darwin         # macOS .app\nmake build-windows        # Windows .exe\nmake build-linux          # Linux\n\n# 指定架构\nmake build-darwin-arm64\nmake build-darwin-amd64\nmake build-darwin-universal\n\n# 其他\nmake test                 # 运行测试\nmake fmt                  # 格式化 + 代码检查\nmake clean                # 清理构建产物\nmake info                 # 显示版本信息\n```\n\n### 使用 Wails3\n\n```bash\nwails3 task darwin:package              # macOS 当前架构\nwails3 task darwin:package ARCH=arm64   # Apple Silicon\nwails3 task darwin:package:universal    # Universal\nwails3 task windows:build ARCH=amd64    # Windows\nwails3 task linux:build ARCH=amd64      # Linux\n```\n\n\u003e 跨平台构建需先准备 Docker 镜像：`make setup-docker`\n\n## 开发\n\n```bash\nmake dev                  # 启动开发模式（热更新）\nmake dev-frontend         # 仅启动前端开发服务器\n```\n\n## 数据存储\n\nSQLite 数据库：`~/.relayai/relayai.db`\n\n## 许可证\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzhaolei%2Frelayai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzzhaolei%2Frelayai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzhaolei%2Frelayai/lists"}