- Updated README files to reflect the new 'Plus' variant with detailed third-party provider support information. - Adjusted Dockerfile, `docker-compose.yml`, and build configurations to align with the `CLIProxyAPIPlus` naming convention. - Added information about GitHub Copilot OAuth integration contributed by the community.
Unified · Split
| @@ -12,7 +12,7 @@ ARG VERSION=dev · 11 unmodified lines | ||
| 12 | 12 | ARG COMMIT=none |
| 13 | 13 | ARG BUILD_DATE=unknown |
| 14 | 14 | |
| 15 | −RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X 'main.Version=${VERSION}' -X 'main.Commit=${COMMIT}' -X 'main.BuildDate=${BUILD_DATE}'" -o ./CLIProxyAPI ./cmd/server/ | |
| 15 | +RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X 'main.Version=${VERSION}-plus' -X 'main.Commit=${COMMIT}' -X 'main.BuildDate=${BUILD_DATE}'" -o ./CLIProxyAPIPlus ./cmd/server/ | |
| 16 | 16 | |
| 17 | 17 | FROM alpine:3.22.0 |
| 18 | 18 | |
| @@ -20,7 +20,7 @@ RUN apk add --no-cache tzdata · 1 unmodified line | ||
| 20 | 20 | |
| 21 | 21 | RUN mkdir /CLIProxyAPI |
| 22 | 22 | |
| 23 | −COPY --from=builder ./app/CLIProxyAPI /CLIProxyAPI/CLIProxyAPI | |
| 23 | +COPY --from=builder ./app/CLIProxyAPIPlus /CLIProxyAPI/CLIProxyAPIPlus | |
| 24 | 24 | |
| 25 | 25 | COPY config.example.yaml /CLIProxyAPI/config.example.yaml |
| 26 | 26 | |
| @@ -32,4 +32,4 @@ ENV TZ=Asia/Shanghai · 5 unmodified lines | ||
| 32 | 32 | |
| 33 | 33 | RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime && echo "${TZ}" > /etc/timezone |
| 34 | 34 | |
| 35 | −CMD ["./CLIProxyAPI"] | |
| 35 | +CMD ["./CLIProxyAPIPlus"] | |
| @@ -1,97 +1,22 @@ | ||
| 1 | −# CLI Proxy API | |
| 1 | +# CLIProxyAPI Plus | |
| 2 | 2 | |
| 3 | −English | [中文](README_CN.md) | |
| 3 | +English | [Chinese](README_CN.md) | |
| 4 | 4 | |
| 5 | −A proxy server that provides OpenAI/Gemini/Claude/Codex compatible API interfaces for CLI. | |
| 5 | +This is the Plus version of [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI), adding support for third-party providers on top of the mainline project. | |
| 6 | 6 | |
| 7 | −It now also supports OpenAI Codex (GPT models) and Claude Code via OAuth. | |
| 7 | +All third-party provider support is maintained by community contributors; CLIProxyAPI does not provide technical support. Please contact the corresponding community maintainer if you need assistance. | |
| 8 | 8 | |
| 9 | −So you can use local or multi-account CLI access with OpenAI(include Responses)/Gemini/Claude-compatible clients and SDKs. | |
| 9 | +The Plus release stays in lockstep with the mainline features. | |
| 10 | 10 | |
| 11 | −## Sponsor | |
| 11 | +## Differences from the Mainline | |
| 12 | 12 | |
| 13 | −[](https://z.ai/subscribe?ic=8JVLJQFSKB) | |
| 14 | − | |
| 15 | −This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN. | |
| 16 | − | |
| 17 | −GLM CODING PLAN is a subscription service designed for AI coding, starting at just $3/month. It provides access to their flagship GLM-4.6 model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences. | |
| 18 | − | |
| 19 | −Get 10% OFF GLM CODING PLAN:https://z.ai/subscribe?ic=8JVLJQFSKB | |
| 20 | − | |
| 21 | −## Overview | |
| 22 | − | |
| 23 | −- OpenAI/Gemini/Claude compatible API endpoints for CLI models | |
| 24 | −- OpenAI Codex support (GPT models) via OAuth login | |
| 25 | −- Claude Code support via OAuth login | |
| 26 | −- Qwen Code support via OAuth login | |
| 27 | −- iFlow support via OAuth login | |
| 28 | −- Amp CLI and IDE extensions support with provider routing | |
| 29 | −- Streaming and non-streaming responses | |
| 30 | −- Function calling/tools support | |
| 31 | −- Multimodal input support (text and images) | |
| 32 | −- Multiple accounts with round-robin load balancing (Gemini, OpenAI, Claude, Qwen and iFlow) | |
| 33 | −- Simple CLI authentication flows (Gemini, OpenAI, Claude, Qwen and iFlow) | |
| 34 | −- Generative Language API Key support | |
| 35 | −- AI Studio Build multi-account load balancing | |
| 36 | −- Gemini CLI multi-account load balancing | |
| 37 | −- Claude Code multi-account load balancing | |
| 38 | −- Qwen Code multi-account load balancing | |
| 39 | −- iFlow multi-account load balancing | |
| 40 | −- OpenAI Codex multi-account load balancing | |
| 41 | −- OpenAI-compatible upstream providers via config (e.g., OpenRouter) | |
| 42 | −- Reusable Go SDK for embedding the proxy (see `docs/sdk-usage.md`) | |
| 43 | − | |
| 44 | −## Getting Started | |
| 45 | − | |
| 46 | −CLIProxyAPI Guides: [https://help.router-for.me/](https://help.router-for.me/) | |
| 47 | − | |
| 48 | −## Management API | |
| 49 | − | |
| 50 | −see [MANAGEMENT_API.md](https://help.router-for.me/management/api) | |
| 51 | − | |
| 52 | −## Amp CLI Support | |
| 53 | − | |
| 54 | −CLIProxyAPI includes integrated support for [Amp CLI](https://ampcode.com) and Amp IDE extensions, enabling you to use your Google/ChatGPT/Claude OAuth subscriptions with Amp's coding tools: | |
| 55 | − | |
| 56 | −- Provider route aliases for Amp's API patterns (`/api/provider/{provider}/v1...`) | |
| 57 | −- Management proxy for OAuth authentication and account features | |
| 58 | −- Smart model fallback with automatic routing | |
| 59 | −- Security-first design with localhost-only management endpoints | |
| 60 | − | |
| 61 | −**→ [Complete Amp CLI Integration Guide](docs/amp-cli-integration.md)** | |
| 62 | − | |
| 63 | −## SDK Docs | |
| 64 | − | |
| 65 | −- Usage: [docs/sdk-usage.md](docs/sdk-usage.md) | |
| 66 | −- Advanced (executors & translators): [docs/sdk-advanced.md](docs/sdk-advanced.md) | |
| 67 | −- Access: [docs/sdk-access.md](docs/sdk-access.md) | |
| 68 | −- Watcher: [docs/sdk-watcher.md](docs/sdk-watcher.md) | |
| 69 | −- Custom Provider Example: `examples/custom-provider` | |
| 13 | +- Added GitHub Copilot support (OAuth login), provided by [em4gp](https://github.com/em4go/CLIProxyAPI/tree/feature/github-copilot-auth) | |
| 70 | 14 | |
| 71 | 15 | ## Contributing |
| 72 | 16 | |
| 73 | −Contributions are welcome! Please feel free to submit a Pull Request. | |
| 74 | − | |
| 75 | −1. Fork the repository | |
| 76 | −2. Create your feature branch (`git checkout -b feature/amazing-feature`) | |
| 77 | −3. Commit your changes (`git commit -m 'Add some amazing feature'`) | |
| 78 | −4. Push to the branch (`git push origin feature/amazing-feature`) | |
| 79 | −5. Open a Pull Request | |
| 80 | − | |
| 81 | −## Who is with us? | |
| 82 | − | |
| 83 | −Those projects are based on CLIProxyAPI: | |
| 84 | − | |
| 85 | −### [vibeproxy](https://github.com/automazeio/vibeproxy) | |
| 86 | − | |
| 87 | −Native macOS menu bar app to use your Claude Code & ChatGPT subscriptions with AI coding tools - no API keys needed | |
| 88 | − | |
| 89 | −### [Subtitle Translator](https://github.com/VjayC/SRT-Subtitle-Translator-Validator) | |
| 90 | − | |
| 91 | −Browser-based tool to translate SRT subtitles using your Gemini subscription via CLIProxyAPI with automatic validation/error correction - no API keys needed | |
| 17 | +This project only accepts pull requests that relate to third-party provider support. Any pull requests unrelated to third-party provider support will be rejected. | |
| 92 | 18 | |
| 93 | −> [!NOTE] | |
| 94 | −> If you developed a project based on CLIProxyAPI, please open a PR to add it to this list. | |
| 19 | +If you need to submit any non-third-party provider changes, please open them against the mainline repository. | |
| 95 | 20 | |
| 96 | 21 | ## License |
| 97 | 22 | |
| @@ -1,105 +1,23 @@ | ||
| 1 | −# CLI 代理 API | |
| 1 | +# CLIProxyAPI Plus | |
| 2 | 2 | |
| 3 | 3 | [English](README.md) | 中文 |
| 4 | 4 | |
| 5 | −一个为 CLI 提供 OpenAI/Gemini/Claude/Codex 兼容 API 接口的代理服务器。 | |
| 5 | +这是 [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) 的 Plus 版本,在原有基础上增加了第三方供应商的支持。 | |
| 6 | 6 | |
| 7 | −现已支持通过 OAuth 登录接入 OpenAI Codex(GPT 系列)和 Claude Code。 | |
| 7 | +所有的第三方供应商支持都由第三方社区维护者提供,CLIProxyAPI 不提供技术支持。如需取得支持,请与对应的社区维护者联系。 | |
| 8 | 8 | |
| 9 | −您可以使用本地或多账户的CLI方式,通过任何与 OpenAI(包括Responses)/Gemini/Claude 兼容的客户端和SDK进行访问。 | |
| 9 | +该 Plus 版本的主线功能与主线功能强制同步。 | |
| 10 | 10 | |
| 11 | −## 赞助商 | |
| 11 | +## 与主线版本版本差异 | |
| 12 | 12 | |
| 13 | −[](https://www.bigmodel.cn/claude-code?ic=RRVJPB5SII) | |
| 14 | − | |
| 15 | −本项目由 Z智谱 提供赞助, 他们通过 GLM CODING PLAN 对本项目提供技术支持。 | |
| 16 | − | |
| 17 | −GLM CODING PLAN 是专为AI编码打造的订阅套餐,每月最低仅需20元,即可在十余款主流AI编码工具如 Claude Code、Cline、Roo Code 中畅享智谱旗舰模型GLM-4.6,为开发者提供顶尖的编码体验。 | |
| 18 | − | |
| 19 | −智谱AI为本软件提供了特别优惠,使用以下链接购买可以享受九折优惠:https://www.bigmodel.cn/claude-code?ic=RRVJPB5SII | |
| 20 | − | |
| 21 | −## 功能特性 | |
| 22 | − | |
| 23 | −- 为 CLI 模型提供 OpenAI/Gemini/Claude/Codex 兼容的 API 端点 | |
| 24 | −- 新增 OpenAI Codex(GPT 系列)支持(OAuth 登录) | |
| 25 | −- 新增 Claude Code 支持(OAuth 登录) | |
| 26 | −- 新增 Qwen Code 支持(OAuth 登录) | |
| 27 | −- 新增 iFlow 支持(OAuth 登录) | |
| 28 | −- 支持流式与非流式响应 | |
| 29 | −- 函数调用/工具支持 | |
| 30 | −- 多模态输入(文本、图片) | |
| 31 | −- 多账户支持与轮询负载均衡(Gemini、OpenAI、Claude、Qwen 与 iFlow) | |
| 32 | −- 简单的 CLI 身份验证流程(Gemini、OpenAI、Claude、Qwen 与 iFlow) | |
| 33 | −- 支持 Gemini AIStudio API 密钥 | |
| 34 | −- 支持 AI Studio Build 多账户轮询 | |
| 35 | −- 支持 Gemini CLI 多账户轮询 | |
| 36 | −- 支持 Claude Code 多账户轮询 | |
| 37 | −- 支持 Qwen Code 多账户轮询 | |
| 38 | −- 支持 iFlow 多账户轮询 | |
| 39 | −- 支持 OpenAI Codex 多账户轮询 | |
| 40 | −- 通过配置接入上游 OpenAI 兼容提供商(例如 OpenRouter) | |
| 41 | −- 可复用的 Go SDK(见 `docs/sdk-usage_CN.md`) | |
| 42 | − | |
| 43 | −## 新手入门 | |
| 44 | − | |
| 45 | −CLIProxyAPI 用户手册: [https://help.router-for.me/](https://help.router-for.me/cn/) | |
| 46 | − | |
| 47 | −## 管理 API 文档 | |
| 48 | − | |
| 49 | −请参见 [MANAGEMENT_API_CN.md](https://help.router-for.me/cn/management/api) | |
| 50 | − | |
| 51 | −## Amp CLI 支持 | |
| 52 | − | |
| 53 | −CLIProxyAPI 已内置对 [Amp CLI](https://ampcode.com) 和 Amp IDE 扩展的支持,可让你使用自己的 Google/ChatGPT/Claude OAuth 订阅来配合 Amp 编码工具: | |
| 54 | − | |
| 55 | −- 提供商路由别名,兼容 Amp 的 API 路径模式(`/api/provider/{provider}/v1...`) | |
| 56 | −- 管理代理,处理 OAuth 认证和账号功能 | |
| 57 | −- 智能模型回退与自动路由 | |
| 58 | −- 以安全为先的设计,管理端点仅限 localhost | |
| 59 | − | |
| 60 | −**→ [Amp CLI 完整集成指南](docs/amp-cli-integration_CN.md)** | |
| 61 | − | |
| 62 | −## SDK 文档 | |
| 63 | − | |
| 64 | −- 使用文档:[docs/sdk-usage_CN.md](docs/sdk-usage_CN.md) | |
| 65 | −- 高级(执行器与翻译器):[docs/sdk-advanced_CN.md](docs/sdk-advanced_CN.md) | |
| 66 | −- 认证: [docs/sdk-access_CN.md](docs/sdk-access_CN.md) | |
| 67 | −- 凭据加载/更新: [docs/sdk-watcher_CN.md](docs/sdk-watcher_CN.md) | |
| 68 | −- 自定义 Provider 示例:`examples/custom-provider` | |
| 13 | +- 新增 GitHub Copilot 支持(OAuth 登录),由[em4gp](https://github.com/em4go/CLIProxyAPI/tree/feature/github-copilot-auth)提供 | |
| 69 | 14 | |
| 70 | 15 | ## 贡献 |
| 71 | 16 | |
| 72 | −欢迎贡献!请随时提交 Pull Request。 | |
| 73 | − | |
| 74 | −1. Fork 仓库 | |
| 75 | −2. 创建您的功能分支(`git checkout -b feature/amazing-feature`) | |
| 76 | −3. 提交您的更改(`git commit -m 'Add some amazing feature'`) | |
| 77 | −4. 推送到分支(`git push origin feature/amazing-feature`) | |
| 78 | −5. 打开 Pull Request | |
| 79 | − | |
| 80 | −## 谁与我们在一起? | |
| 81 | − | |
| 82 | −这些项目基于 CLIProxyAPI: | |
| 83 | − | |
| 84 | −### [vibeproxy](https://github.com/automazeio/vibeproxy) | |
| 85 | − | |
| 86 | −一个原生 macOS 菜单栏应用,让您可以使用 Claude Code & ChatGPT 订阅服务和 AI 编程工具,无需 API 密钥。 | |
| 17 | +该项目仅接受第三方供应商支持的 Pull Request。任何非第三方供应商支持的 Pull Request 都将被拒绝。 | |
| 87 | 18 | |
| 88 | −### [Subtitle Translator](https://github.com/VjayC/SRT-Subtitle-Translator-Validator) | |
| 89 | − | |
| 90 | −一款基于浏览器的 SRT 字幕翻译工具,可通过 CLI 代理 API 使用您的 Gemini 订阅。内置自动验证与错误修正功能,无需 API 密钥。 | |
| 91 | − | |
| 92 | −> [!NOTE] | |
| 93 | −> 如果你开发了基于 CLIProxyAPI 的项目,请提交一个 PR(拉取请求)将其添加到此列表中。 | |
| 19 | +如果需要提交任何非第三方供应商支持的 Pull Request,请提交到主线版本。 | |
| 94 | 20 | |
| 95 | 21 | ## 许可证 |
| 96 | 22 | |
| 97 | −此项目根据 MIT 许可证授权 - 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。 | |
| 98 | − | |
| 99 | −## 写给所有中国网友的 | |
| 100 | − | |
| 101 | −QQ 群:188637136 | |
| 102 | − | |
| 103 | −或 | |
| 104 | − | |
| 105 | −Telegram 群:https://t.me/CLIProxyAPI | |
| 23 | +此项目根据 MIT 许可证授权 - 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。 | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | services: |
| 2 | 2 | cli-proxy-api: |
| 3 | − image: ${CLI_PROXY_IMAGE:-eceasy/cli-proxy-api:latest} | |
| 3 | + image: ${CLI_PROXY_IMAGE:-eceasy/cli-proxy-api-plus:latest} | |
| 4 | 4 | pull_policy: always |
| 5 | 5 | build: |
| 6 | 6 | context: . |
| @@ -9,7 +9,7 @@ services: · 2 unmodified lines | ||
| 9 | 9 | VERSION: ${VERSION:-dev} |
| 10 | 10 | COMMIT: ${COMMIT:-none} |
| 11 | 11 | BUILD_DATE: ${BUILD_DATE:-unknown} |
| 12 | − container_name: cli-proxy-api | |
| 12 | + container_name: cli-proxy-api-plus | |
| 13 | 13 | # env_file: |
| 14 | 14 | # - .env |
| 15 | 15 | environment: |