Skip to content

Commit 0a72e37

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feat/copilot
2 parents 00294c4 + 8d2c00c commit 0a72e37

246 files changed

Lines changed: 24783 additions & 9817 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Git and GitHub folders
2-
.git/*
3-
.github/*
2+
.git
3+
.github
44

55
# Docker and CI/CD related files
66
docker-compose.yml
@@ -10,28 +10,32 @@ docker-compose.yml
1010
Dockerfile
1111

1212
# Documentation and license
13-
docs/*
13+
docs
1414
README.md
1515
README_CN.md
1616
LICENSE
1717

1818
# Runtime data folders (should be mounted as volumes)
19-
auths/*
20-
logs/*
21-
conv/*
19+
auths
20+
logs
21+
conv
2222
config.yaml
2323

2424
# Development/editor
25-
bin/*
26-
.vscode/*
27-
.claude/*
28-
.codex/*
29-
.gemini/*
30-
.serena/*
31-
.agent/*
32-
.agents/*
33-
.opencode/*
34-
.idea/*
35-
.bmad/*
36-
_bmad/*
37-
_bmad-output/*
25+
bin
26+
.vscode
27+
.claude
28+
.codex
29+
.codex-worktrees
30+
.gemini
31+
.serena
32+
.agent
33+
.agents
34+
.antigravitycli
35+
.opencode
36+
.idea
37+
.junie
38+
.worktrees
39+
.bmad
40+
_bmad
41+
_bmad-output

.github/workflows/release.yaml

Lines changed: 79 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,21 @@ jobs:
1717
prepare-release:
1818
runs-on: ubuntu-latest
1919
steps:
20+
- uses: actions/checkout@v6
21+
with:
22+
fetch-depth: 0
23+
fetch-tags: true
2024
- name: Create release
2125
env:
2226
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2327
run: |
2428
set -euo pipefail
2529
release_notes_file="$(mktemp)"
26-
current_notes_file="$(mktemp)"
30+
generated_notes_file="$(mktemp)"
31+
changelog_entries_file="$(mktemp)"
32+
changelog_notes_file="$(mktemp)"
2733
updated_notes_file="$(mktemp)"
28-
trap 'rm -f "$release_notes_file" "$current_notes_file" "$updated_notes_file"' EXIT
34+
trap 'rm -f "$release_notes_file" "$generated_notes_file" "$changelog_entries_file" "$changelog_notes_file" "$updated_notes_file"' EXIT
2935
3036
cat > "$release_notes_file" <<'EOF'
3137
<!-- cliproxyapi-linux-release-assets:start -->
@@ -34,25 +40,56 @@ jobs:
3440
- `CLIProxyAPI_<version>_linux_<arch>.tar.gz` is the default Linux build. It supports dynamic library plugins and is built against a GLIBC 2.17 baseline.
3541
- `CLIProxyAPI_<version>_linux_<arch>_no-plugin.tar.gz` is the portable Linux build for musl-based or older systems such as OpenWrt. It does not support dynamic library plugins.
3642
43+
## FreeBSD release assets
44+
45+
- `CLIProxyAPI_<version>_freebsd_aarch64_no-plugin.tar.gz` is the FreeBSD arm64 build. It is built without CGO and does not support dynamic library plugins.
46+
3747
<!-- cliproxyapi-linux-release-assets:end -->
3848
EOF
3949
40-
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
41-
gh release edit "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME"
50+
git fetch --force --tags
51+
previous_tag=""
52+
if previous_tag_value="$(git describe --tags --abbrev=0 "${GITHUB_REF_NAME}^" 2>/dev/null)"; then
53+
previous_tag="$previous_tag_value"
54+
changelog_range="${previous_tag}..${GITHUB_REF_NAME}"
4255
else
43-
gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --generate-notes
56+
changelog_range="$GITHUB_REF_NAME"
57+
fi
58+
59+
git log --reverse --pretty=format:'- %s (%h)' "$changelog_range" |
60+
grep -Ev '^- (docs:|test:)' > "$changelog_entries_file" || true
61+
62+
gh api "repos/${GH_REPO}/releases/generate-notes" \
63+
-f tag_name="$GITHUB_REF_NAME" \
64+
--jq .body > "$generated_notes_file"
65+
if [[ ! -s "$generated_notes_file" ]]; then
66+
if [[ -n "$previous_tag" ]]; then
67+
printf '**Full Changelog**: https://github.com/%s/compare/%s...%s\n' "$GH_REPO" "$previous_tag" "$GITHUB_REF_NAME" > "$generated_notes_file"
68+
else
69+
printf '**Full Changelog**: https://github.com/%s/commits/%s\n' "$GH_REPO" "$GITHUB_REF_NAME" > "$generated_notes_file"
70+
fi
4471
fi
45-
gh release view "$GITHUB_REF_NAME" --json body -q .body > "$current_notes_file"
72+
73+
{
74+
if [[ -s "$changelog_entries_file" ]]; then
75+
printf '## Changelog\n\n'
76+
cat "$changelog_entries_file"
77+
printf '\n\n'
78+
fi
79+
cat "$generated_notes_file"
80+
} > "$changelog_notes_file"
81+
4682
{
4783
cat "$release_notes_file"
4884
printf '\n'
49-
awk '
50-
/^<!-- cliproxyapi-linux-release-assets:start -->$/ { skip = 1; next }
51-
/^<!-- cliproxyapi-linux-release-assets:end -->$/ { skip = 0; next }
52-
!skip { print }
53-
' "$current_notes_file"
85+
cat "$changelog_notes_file"
5486
} > "$updated_notes_file"
55-
gh release edit "$GITHUB_REF_NAME" --notes-file "$updated_notes_file"
87+
88+
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
89+
gh release edit "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file "$updated_notes_file"
90+
else
91+
gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file "$updated_notes_file"
92+
fi
5693
5794
build-hosted:
5895
name: build ${{ matrix.target }}
@@ -456,21 +493,28 @@ jobs:
456493
gh release upload "$GITHUB_REF_NAME" "$tmp_dir/checksums.txt" --clobber
457494
458495
build-freebsd:
459-
name: build freebsd-${{ matrix.goarch }}
496+
name: build ${{ matrix.target }}
460497
needs: prepare-release
461498
runs-on: ubuntu-latest
462499
env:
463-
TARGET: freebsd-${{ matrix.goarch }}
500+
TARGET: ${{ matrix.target }}
464501
GOARCH: ${{ matrix.goarch }}
465502
ASSET_ARCH: ${{ matrix.asset_arch }}
503+
ASSET_SUFFIX: ${{ matrix.asset_suffix }}
466504
strategy:
467505
fail-fast: false
468506
matrix:
469507
include:
470-
- goarch: amd64
508+
- target: freebsd-amd64
509+
goarch: amd64
471510
asset_arch: amd64
472-
- goarch: arm64
511+
asset_suffix: ''
512+
cgo_enabled: true
513+
- target: freebsd-arm64-no-plugin
514+
goarch: arm64
473515
asset_arch: aarch64
516+
asset_suffix: _no-plugin
517+
cgo_enabled: false
474518
steps:
475519
- uses: actions/checkout@v6
476520
with:
@@ -507,13 +551,19 @@ jobs:
507551
echo "release_version=$release_version" >> "$GITHUB_OUTPUT"
508552
echo "commit=$commit" >> "$GITHUB_OUTPUT"
509553
echo "build_date=$build_date" >> "$GITHUB_OUTPUT"
510-
- name: Install FreeBSD cross-build dependencies
554+
- name: Prepare FreeBSD output
555+
shell: bash
511556
run: |
512557
set -euo pipefail
513558
rm -rf "dist/${TARGET}"
559+
- name: Install FreeBSD cross-build dependencies
560+
if: ${{ matrix.cgo_enabled }}
561+
run: |
562+
set -euo pipefail
514563
sudo apt-get update
515564
sudo apt-get install -y clang lld wget
516-
- name: Build FreeBSD binary
565+
- name: Build FreeBSD binary with CGO
566+
if: ${{ matrix.cgo_enabled }}
517567
timeout-minutes: 45
518568
uses: go-cross/cgo-actions@v1
519569
with:
@@ -527,13 +577,22 @@ jobs:
527577
-X main.Version=${{ steps.metadata.outputs.release_version }}
528578
-X main.Commit=${{ steps.metadata.outputs.commit }}
529579
-X main.BuildDate=${{ steps.metadata.outputs.build_date }}
580+
- name: Build FreeBSD no-plugin binary
581+
if: ${{ !matrix.cgo_enabled }}
582+
shell: bash
583+
run: |
584+
set -euo pipefail
585+
mkdir -p "dist/${TARGET}/bin"
586+
CGO_ENABLED=0 GOOS=freebsd GOARCH="$GOARCH" go build -buildvcs=false \
587+
-ldflags="-s -w -X main.Version=${RELEASE_VERSION} -X main.Commit=${COMMIT} -X main.BuildDate=${BUILD_DATE}" \
588+
-o "dist/${TARGET}/bin/cli-proxy-api" ./cmd/server/
530589
- name: Package FreeBSD archive
531590
shell: bash
532591
run: |
533592
set -euo pipefail
534593
535594
archive_dir="dist/${TARGET}/archive"
536-
archive_name="CLIProxyAPI_${RELEASE_VERSION}_freebsd_${ASSET_ARCH}.tar.gz"
595+
archive_name="CLIProxyAPI_${RELEASE_VERSION}_freebsd_${ASSET_ARCH}${ASSET_SUFFIX}.tar.gz"
537596
mkdir -p "$archive_dir"
538597
539598
echo "Packaging ${archive_name}"
@@ -542,7 +601,7 @@ jobs:
542601
tar -C "$archive_dir" -czf "dist/$archive_name" cli-proxy-api LICENSE README.md README_CN.md config.example.yaml
543602
- uses: actions/upload-artifact@v4
544603
with:
545-
name: freebsd-${{ matrix.goarch }}
604+
name: ${{ matrix.target }}
546605
path: dist/CLIProxyAPI_*
547606
if-no-files-found: error
548607
- name: Upload release assets

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ GEMINI.md
4141
.gemini/*
4242
.serena/*
4343
.agent/*
44+
.agents
4445
.agents/*
4546
.opencode/*
4647
.idea/*

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ PackyCode provides special discounts for our software users: register using <a h
3232
</tr>
3333
<tr>
3434
<td width="180"><a href="https://coder.visioncoder.cn"><img src="./assets/visioncoder.png" alt="VisionCoder" width="150"></a></td>
35-
<td>Thanks to <b>VisionCoder</b> for supporting this project. <a href="https://coder.visioncoder.cn" target="_blank">VisionCoder Developer Platform</a> is a reliable and efficient API relay service provider, offering access to mainstream AI models such as Claude Code, Codex, and Gemini. It helps developers and teams integrate AI capabilities more easily and improve productivity.
36-
<p></p>
37-
VisionCoder is also offering our users a limited-time <a href="https://coder.visioncoder.cn" target="_blank">Token Plan</a> promotion: <b>buy 1 month and get 1 month free</b>.</td>
35+
<td>Thanks to VisionCoder for supporting this project. <a href="https://coder.visioncoder.cn">VisionCoder Developer Platform</a> is a reliable and efficient API relay service provider, offering access to mainstream AI models such as Claude Code, Codex, and Gemini. It helps developers and teams integrate AI capabilities more easily and improve productivity. Additionally, VisionCoder now offers retail channels for <b>Claude Max 200 and GPT Pro 200 premium accounts</b>, providing users with instant access to top-tier AI computing power and features.</td>
3836
</tr>
3937
<tr>
4038
<td width="180"><a href="https://apikey.fun/register?aff=CLIProxyAPI"><img src="./assets/apikey.png" alt="APIKEY.FUN" width="150"></a></td>
@@ -48,6 +46,10 @@ VisionCoder is also offering our users a limited-time <a href="https://coder.vis
4846
<td width="180"><a href="https://unity2.ai/register?source=cliproxyapi"><img src="./assets/unity2.jpg" alt="Unity2" width="150"></a></td>
4947
<td>Thanks to Unity2.ai for sponsoring this project! Unity2.ai is a high-performance AI model API relay platform for individual developers, teams, and enterprises. It has long served leading domestic enterprises, handles more than 30 billion token calls per day, and supports high concurrency at the 5000 RPM level. It supports balance billing, first top-up bonuses, bundled subscriptions, enterprise invoicing, and dedicated integration support. Register through <a href="https://unity2.ai/register?source=cliproxyapi">this link</a> to receive a $2 balance, then join the official group to get another $10 balance, for up to $12 in free credit.</td>
5048
</tr>
49+
<tr>
50+
<td width="180"><a href="https://catapi.ai/sign-up"><img src="./assets/catapi.png" alt="CatAPI" width="150"></a></td>
51+
<td>Cat API is an AI model aggregation platform built for individual developers and teams, integrating leading large language models into a single simple, stable, and easy-to-use entry point. It provides an API fully compatible with OpenAI, Claude, and Gemini that plugs seamlessly into mainstream AI IDEs and coding tools such as Claude Code, Cursor, Windsurf, Cline, Roo Code, Continue, Codex, and Trae, and features dedicated CN2 high-speed routing for low-latency, highly reliable access. <a href="https://catapi.ai/sign-up">Sign up</a> to claim 1$ in free credits.</td>
52+
</tr>
5153
</tbody>
5254
</table>
5355

@@ -57,7 +59,6 @@ VisionCoder is also offering our users a limited-time <a href="https://coder.vis
5759
- OpenAI Codex support (GPT models) via OAuth login
5860
- Claude Code support via OAuth login
5961
- Grok Build support via OAuth login
60-
- Amp CLI and IDE extensions support with provider routing
6162
- Streaming, non-streaming, and WebSocket responses where supported
6263
- Function calling/tools support
6364
- Multimodal input support (text and images)
@@ -189,6 +190,10 @@ Multi-agent orchestration for AI coding assistants. Runs CLIProxyAPI as a local
189190

190191
Windows desktop UI that manages CLIProxyAPI and Perplexity WebUI Scraper from a single interface, inspired by Quotio and VibeProxy. Connect OAuth providers (Claude, Gemini CLI, Codex, Kimi, Antigravity), custom API keys, and Perplexity session accounts, then point any coding agent at the local endpoint.
191192

193+
### [Quotio Desktop](https://github.com/xiaocoss/quotio-desktop)
194+
195+
Cross-platform (Tauri) port of Quotio for Windows, macOS and Linux. Manages a pool of AI accounts (Codex, Claude Code, GitHub Copilot, Gemini CLI, Antigravity, Kiro, Cursor, Trae, GLM) through CLIProxyAPI, with per-account 5-hour/weekly quota bars, Codex rate-limit reset credits with one-click reset, smart scheduling, usage statistics, and multi-instance Codex — no API keys needed.
196+
192197
> [!NOTE]
193198
> If you developed a project based on CLIProxyAPI, please open a PR to add it to this list.
194199

README_CN.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ PackyCode 为本软件用户提供了特别优惠:使用<a href="https://www.p
3232
</tr>
3333
<tr>
3434
<td width="180"><a href="https://coder.visioncoder.cn"><img src="./assets/visioncoder.png" alt="VisionCoder" width="150"></a></td>
35-
<td>感谢 <b>VisionCoder</b> 对本项目的支持。<a href="https://coder.visioncoder.cn" target="_blank">VisionCoder 开发平台</a> 是一个可靠高效的 API 中继服务提供商,提供 Claude Code、Codex、Gemini 等主流 AI 模型,帮助开发者和团队更轻松地集成 AI 功能,提升工作效率。
36-
<p></p>
37-
VisionCoder 还为我们的用户提供 <a href="https://coder.visioncoder.cn" target="_blank">Token Plan</a> 限时活动:<b>购买 1 个月,赠送 1 个月</b>。</td>
35+
<td>感谢 VisionCoder 对本项目的支持。<a href="https://coder.visioncoder.cn">VisionCoder 开发平台</a> 是一个可靠高效的 API 中继服务提供商,提供 Claude Code、Codex、Gemini 等主流 AI 模型,帮助开发者和团队更轻松地集成 AI 功能,提升工作效率。此外,VisionCoder 还提供 <b>Claude Max 200 与 GPT Pro 200 高级成品号</b>的独家售卖渠道,助力体验全网顶配 AI 的算力与体验。</td>
3836
</tr>
3937
<tr>
4038
<td width="180"><a href="https://apikey.fun/register?aff=CLIProxyAPI"><img src="./assets/apikey.png" alt="APIKEY.FUN" width="150"></a></td>
@@ -48,6 +46,10 @@ VisionCoder 还为我们的用户提供 <a href="https://coder.visioncoder.cn" t
4846
<td width="180"><a href="https://unity2.ai/register?source=cliproxyapi"><img src="./assets/unity2.jpg" alt="Unity2" width="150"></a></td>
4947
<td>感谢 Unity2.ai 赞助了本项目!Unity2.ai 是面向个人开发者、团队和企业的高性能 AI 模型 API 中转平台,长期服务国内头部企业,日均承载超 300 亿 token 调用,支持 5000 RPM 级高并发。支持余额计费、首充赠额、组合订阅、企业开票和专属对接。通过<a href="https://unity2.ai/register?source=cliproxyapi">此链接</a>注册可领取 $2 余额,加入官方群再送 $10 余额,最高可领 $12 免费额度。</td>
5048
</tr>
49+
<tr>
50+
<td width="180"><a href="https://catapi.ai/sign-up"><img src="./assets/catapi.png" alt="CatAPI" width="150"></a></td>
51+
<td>Cat API 是一家面向个人开发者与团队的 AI 大模型聚合平台,致力于将主流大模型能力整合到一个简单、稳定、易用的入口中。平台提供完全兼容 OpenAI、Claude、Gemini 的 API,可无缝接入 Claude Code、Cursor、Windsurf、Cline、Roo Code、Continue、Codex、Trae 等主流 AI IDE 与编程工具,并主打 CN2 高速线路,为用户带来低延迟、高稳定的访问体验。<a href="https://catapi.ai/sign-up">注册</a>即可领取 1$ 的免费额度。</td>
52+
</tr>
5153
</tbody>
5254
</table>
5355

@@ -186,6 +188,10 @@ Shadow AI 是一款专为受限环境设计的 AI 辅助工具。提供无窗口
186188

187189
Windows 桌面 UI,通过单一界面管理 CLIProxyAPI 和 Perplexity WebUI Scraper,灵感来自 Quotio 和 VibeProxy。连接 OAuth 提供商(Claude、Gemini CLI、Codex、Kimi、Antigravity)、自定义 API 密钥和 Perplexity 会话账号,然后将任意编程智能体指向本地端点。
188190

191+
### [Quotio Desktop](https://github.com/xiaocoss/quotio-desktop)
192+
193+
Quotio 的跨平台(Tauri)移植版,支持 Windows / macOS / Linux。通过 CLIProxyAPI 管理多账号代理池(Codex、Claude Code、GitHub Copilot、Gemini CLI、Antigravity、Kiro、Cursor、Trae、GLM),提供每账号 5 小时 / 每周额度进度条、Codex 主动重置次数与一键重置、智能调度、用量统计及 Codex 多开实例,无需 API 密钥。
194+
189195
> [!NOTE]
190196
> 如果你开发了基于 CLIProxyAPI 的项目,请提交一个 PR(拉取请求)将其添加到此列表中。
191197

0 commit comments

Comments
 (0)