實際影片長度:8:36.000。原文、繁中、雙語可點擊句子跳轉影片。
0:00.000–0:04.185
Hi, welcome to another video. So
0:04.185–0:09.920
by now you probably know about Antigravity,
0:10.220–0:13.957
which is Google's agentic IDE. It's actually pretty good,
0:13.957–0:15.940
but the best part about it is not
0:15.940–0:20.168
really the IDE itself. The best part is the models that come with it.
0:20.168–0:21.300
With just a normal
0:21.300–0:25.377
Google account, Antigravity gives you access to Gemini 3.
0:25.377–0:28.040
1 Pro, Gemini 3.5 Flash, and believe it
0:28.040–0:31.469
or not, even Claude models like Opus 4.6, Thinking,
0:31.469–0:34.500
and Sonnet 4.6 all for free with pretty decent
0:34.500–0:38.033
rate limits. Now that's amazing, but there's one big problem.
0:38.033–0:39.800
All of this is locked inside the
0:39.800–0:41.685
Antigravity IDE, and if you ask me,
0:41.685–0:44.740
the harness matters just as much as the model these days.
0:45.020–0:48.426
You might want to use Opus 4.6 inside Claude Code,
0:48.426–0:51.500
or Gemini 3.1 Pro inside OpenCode, or Klein,
0:51.760–0:54.281
or Rucode, or even in your own apps through an API.
0:54.281–0:56.740
But Google obviously doesn't give you an API for
0:56.740–0:59.298
these models. The Gemini API costs money, and
0:59.298–1:02.260
the Claude API is literally one of the most expensive
1:02.260–1:05.603
ones out there. Well, this is where CLIProxy API comes in.
1:05.603–1:08.180
It's an open-source project that basically
1:08.180–1:09.473
takes your Antigravity and
1:09.473–1:12.620
wraps it up as a local API server that's compatible with the OpenAI,
1:13.040–1:15.251
Gemini, and Claude API formats. So,
1:15.251–1:18.640
any tool that can talk to any of these APIs can now use the
1:18.640–1:21.880
Antigravity models. And it doesn't stop at Antigravity either.
1:21.880–1:22.900
It can also wrap your
1:22.900–1:26.747
ChatGPT Codex account, your Claude Code subscription,
1:26.747–1:29.120
Grok, Kimi, Gemini, CLI, and more,
1:29.300–1:32.418
all behind one single endpoint with multi-account load balancing.
1:32.418–1:33.840
But in this video, we'll mainly
1:33.840–1:35.744
focus on the Antigravity part because
1:35.744–1:38.600
that's the free lunch here. So, let's get right into it and
1:38.600–1:41.200
set this thing up. First, we need to install it.
1:41.200–1:43.800
If you're on a Mac, it's super simple. Just open
1:43.800–1:47.154
your terminal and run brew install CLIProxy API.
1:47.154–1:50.180
Once that's done, you can run brew services,
1:50.180–1:51.703
start CLIProxy API, and
1:51.703–1:54.900
it'll keep running in the background as a service.
1:54.900–1:58.088
If you're on Linux, they have a one-line installer script.
1:58.088–2:00.300
You just copy the curl command from their
2:00.300–2:03.416
docs, which are linked below, and pipe it into Bash.
2:03.416–2:06.460
It downloads the binary and sets everything up for
2:06.460–2:09.628
you. If you're on Arch, it's also on the AUR, so
2:09.628–2:12.880
you can just install it with Ye. And if you're on
2:12.880–2:16.232
Windows, you can grab the latest release from their GitHub repo,
2:16.232–2:17.660
extract it, and run the EXE.
2:17.660–2:20.450
They also have a desktop GUI app called Easy CLI.
2:20.450–2:23.100
If you don't want to touch the terminal at all,
2:23.260–2:26.385
there's a Docker image as well if you want to run it on a server.
2:26.385–2:28.100
So, basically, every platform is
2:28.100–2:30.575
covered, which is pretty good for sure. Once it's installed,
2:30.575–2:31.740
there's a config file called
2:31.740–2:35.534
config.yaml on Mac and Linux. It generally lives in the .
2:35.534–2:38.440
clyproxy API folder in your home directory
2:38.440–2:41.573
or in the Homebrew, etc. folder if you installed it via brew.
2:41.573–2:43.140
The defaults are mostly fine.
2:43.140–2:45.233
The server runs on port 8317.
2:45.233–2:49.680
The one thing you should do is look at the API key section in the
2:49.680–2:51.282
config and set your own key there.
2:51.282–2:54.200
This is the key that your clients will use to talk to the proxy.
2:54.580–2:57.774
You can set it to anything, like sk-my-key or whatever you want.
2:57.774–2:59.040
If you're only running it
2:59.040–3:00.779
locally, this doesn't matter that much. But
3:00.779–3:02.940
if you ever expose this on a server, you definitely want
3:02.940–3:06.100
a proper key here. Now, let's connect antigravity.
3:06.100–3:09.040
This is the main part, and it's honestly just one
3:09.040–3:11.513
command. In your terminal, run the .
3:11.513–3:14.480
clyproxy API binary with the .clyproxy API
3:14.480–3:17.547
flag. When you run it, it'll open a browser.
3:17.547–3:21.040
You just log in, and that's it. The OAuth callback
3:21.040–3:22.498
comes back on a local port.
3:22.498–3:23.956
The token gets saved into y
3:23.956–3:26.540
our auth directory, and it will automatically
3:26.540–3:29.475
refresh it in the background from then on. Okay, so
3:29.475–3:32.200
now the proxy is running. With our antigravity
3:32.200–3:35.347
connected, let's see what models we actually get.
3:35.347–3:38.120
If you hit the model's endpoint on localhost
3:38.120–3:40.483
port 8317, you'll see the whole list.
3:40.483–3:43.760
As I'm making this video, the antigravity provider
3:43.760–3:47.820
gives you Claude Opus 4.6, thinking Claude Sané 4.
3:47.820–3:51.300
6, Gemini 3.1, Pro in high and low reasoning
3:51.300–3:54.555
variants, Gemini 3.5 Flash in a few effort levels,
3:54.555–3:56.880
Gemini 3 Flash, a flash image model,
3:56.880–4:00.917
and even GPT-OSS 120B. That's three different Frontier Labs models,
4:00.917–4:02.240
which is just amazing.
4:02.580–4:05.303
Now, let's actually use these in some harnesses.
4:05.303–4:07.760
And this is where the compatible API formats
4:07.760–4:10.899
matter, because every tool speaks one of these protocols.
4:10.899–4:12.500
Let's start with Claude Code,
4:13.060–4:14.270
because using Opus 4.
4:14.270–4:15.413
6 in Claude Code with
4:15.413–4:18.640
out paying Anthropic anything is obviously the headline
4:18.640–4:23.194
here. Ever since Claude Code basically started rug-pulling people on limits,
4:23.194–4:24.160
everyone's been
4:24.160–4:26.104
looking for ways around it. So for this,
4:26.104–4:28.520
you just need to set a few environment variables.
4:29.160–4:33.625
First, set the Anthropic-based URL variable to your local proxy,
4:33.625–4:35.980
which is HTTP localhost port 8317.
4:36.540–4:41.285
Then set the Anthropic auth token variable to the API key you put in your config,
4:41.285–4:42.220
and then you map
4:42.220–4:45.983
the models. There is an environment variable for the default Opus model,
4:45.983–4:47.340
one for the default Sonnet
4:47.340–4:49.875
model, and one for the default Haiku model.
4:49.875–4:52.340
You can point the Opus 1 at Claude Opus 4.6,
4:52.340–4:55.236
thinking the Sonnet one at Claude Sonnet 4.6. And
4:55.236–4:57.920
for the Haiku one, you can actually point it at
4:57.920–5:00.587
something like Gemini 3.5 Flash, which is a fun little trick,
5:00.587–5:02.260
because the proxy translates between
5:02.260–5:04.565
the Claude format and the other providers on the fly.
5:04.565–5:06.660
You can put these exports in your shell profile,
5:06.980–5:09.870
or create a small script that launches Claude Code with them.
5:09.870–5:11.400
Now, when you start Claude Code,
5:11.480–5:14.619
it's talking to your local proxy, which is talking to Antigravity,
5:14.619–5:16.020
and you're running Opus 4.6 on
5:16.020–5:18.608
Google's Dime. Next, OpenCode. This one is also
5:18.608–5:21.520
super simple. You just open the OpenCode.jsonconfig
5:21.520–5:24.362
file in your .config folder, and under the Provider section,
5:24.362–5:25.700
you add the base URL pointing
5:25.700–5:29.460
to localhost port 8317 slash v1, along with your API key.
5:29.460–5:31.540
Then you can just pick any of the
5:31.540–5:34.797
Antigravity models from the model list inside OpenCode.
5:34.797–5:36.900
Gemini 3.1 Procode in OpenCode works
5:36.900–5:40.646
really well, to be honest. Then there's the Codex CLI.
5:40.646–5:43.560
For that one, you edit the config.2ml file
5:43.560–5:45.264
in your .codex folder, and
5:45.264–5:49.600
add a custom model provider block with the base URL set to localhost
5:49.600–5:53.809
port 8317 slash v1, and the wire API set to responses.
5:53.809–5:56.200
Then set the model to whatever
5:56.200–5:58.757
you want to use. The docs have the exact snippet for this,
5:58.757–5:59.900
and I'll link them below.
5:59.900–6:01.854
And for tools like Klein and Rucode,
6:01.854–6:04.980
you just select the OpenAI-compatible provider in their
6:04.980–6:10.262
settings, put in localhost port 8317 slash v1 as the base URL,
6:10.262–6:12.540
paste your key, and select
6:12.540–6:17.480
the model. The same thing works for basically anything that supports a custom OpenAI-compatible
6:17.480–6:20.603
endpoint, which is literally every AI tool at this point.
6:20.603–6:22.100
You can even hit it from your
6:22.100–6:28.520
own code with the normal OpenAI or Anthropic SDKs by just changing the base URL. So let me
6:28.520–6:31.413
show you this quickly. I have the proxy running here,
6:31.413–6:33.320
and I've set up Claude Code with the
6:33.320–6:35.880
environment variables. Let's ask it to build a small app.
6:35.880–6:37.320
I'll type something like create
6:37.320–6:39.767
a simple expense tracker web app with charts.
6:39.767–6:42.020
Let's send it and see. And you can see, it's
6:42.020–6:44.718
working through the task like normal. It's creating the files,
6:44.718–6:45.940
running commands, doing its
6:45.940–6:48.513
thing. The responses are streaming in nicely,
6:48.513–6:51.020
tool calls work, and if I check the proxy logs,
6:51.020–6:53.991
you can see the requests going out to the anti-gravity backend.
6:53.991–6:55.560
From Claude Code's perspective,
6:55.760–6:58.795
nothing has changed at all. It just thinks it's talking to Anthropic,
6:58.795–6:59.580
and the quality is
6:59.580–7:02.905
exactly what you'd expect, because this is the actual Opus 4.
7:02.905–7:04.340
6 thinking model, not some
7:04.340–7:08.393
quantized knockoff. If we wait a bit. And it's now done.
7:08.393–7:10.860
The app works on the first try, and
7:10.860–7:13.614
this whole session cost me exactly zero dollars. So
7:13.614–7:15.600
this is kind of great. Now a few things
7:15.600–7:18.772
you should know. The anti-gravity quotas are per five-hour window,
7:18.772–7:19.940
and they reset over time.
7:20.320–7:22.460
Gemini models have pretty generous limits, while
7:22.460–7:24.040
the Claude models have tighter ones,
7:24.160–7:26.869
which makes sense, because Google is paying Anthropic for those.
7:26.869–7:28.100
There's also a web management
7:28.100–7:31.301
UI that comes with it, where you can see your accounts,
7:31.301–7:33.720
usage, and manage keys from the browser.
7:33.720–7:36.630
And there's a bunch of community apps built around it,
7:36.630–7:38.440
like menu bar apps that track your
7:38.440–7:40.152
quotas across all the accounts.
7:40.152–7:43.640
The ecosystem around this project is surprisingly big. Overall,
7:43.980–7:47.235
this is one of the best setups you can run right now,
7:47.235–7:50.180
if you ask me. You get Opus 4.6, Gemini 3.1 Pro,
7:50.620–7:53.069
and Gemini 3.5 Flash in any harness you like.
7:53.069–7:55.320
I've tried a lot of these proxy projects,
7:55.620–7:57.348
and this one is easily the most polished and
7:57.348–7:58.740
actively maintained of the bunch.
7:58.740–8:00.615
This is a really good option for sure,
8:00.615–8:03.700
especially for students and anyone who can't justify paying
8:03.700–8:06.521
$200 a month for a coding subscription. Overall,
8:06.521–8:09.480
it's pretty cool. Anyway, let me know your thoughts
8:09.480–8:11.342
in the comments. If you liked this video,
8:11.342–8:14.300
consider donating through the Super Thanks option, or becoming
8:14.300–8:16.416
a member by clicking the Join button. Also,
8:16.416–8:19.120
give this video a thumbs up and subscribe to my channel.
8:19.120–8:21.580
I'll see you in the next one. Until then, bye.
8:28.740–8:30.740
Bye.
0:00.000–0:04.185
嗨,歡迎收看另一個影片。所以
0:04.185–0:09.920
到目前為止,你可能已經知道 Antigravity,
0:10.220–0:13.957
它是 Google 的代理式 IDE。它其實相當不錯,
0:13.957–0:15.940
但關於它最棒的部分並不在於
0:15.940–0:20.168
IDE 本身。最棒的部分是隨附的模型。
0:20.168–0:21.300
只需一個普通的
0:21.300–0:25.377
Google 帳戶,Antigravity 就能讓你使用 Gemini 3.
0:25.377–0:28.040
1 Pro、Gemini 3.5 Flash,而且信不信由你,甚至包括 Claude 模型如 Opus 4.6、Thinking,
0:28.040–0:31.469
以及 Sonnet 4.6,全部免費且速率限制相當合理。現在這很驚人,但有一個大問題。
0:31.469–0:34.500
所有這些都鎖定在
0:34.500–0:38.033
Antigravity IDE 內部,而依我之見,
0:38.033–0:39.800
框架(harness)與模型本身同樣重要。
0:39.800–0:41.685
你可能想在 Claude Code 中使用 Opus 4.6,
0:41.685–0:44.740
或在 OpenCode、Klein、
0:45.020–0:48.426
或 Rucode 中使用 Gemini 3.1 Pro,甚至透過 API 在你的自有應用程式中使用。
0:48.426–0:51.500
但 Google 顯然不為這些模型提供 API。
0:51.760–0:54.281
Gemini API 需要付費,而
0:54.281–0:56.740
Claude API 簡直是市面上最昂貴
0:56.740–0:59.298
的 API 之一。這就是 CLIProxy API 登場的地方。
0:59.298–1:02.260
這是一個開源專案,基本上
1:02.260–1:05.603
它將你的 Antigravity
1:05.603–1:08.180
包裝成一個與 OpenAI、
1:08.180–1:09.473
Gemini 和 Claude API 格式相容的本機 API 伺服器。所以,
1:09.473–1:12.620
任何能與這些 API 通訊的工具現在都可以使用
1:13.040–1:15.251
Antigravity 的模型。而且它不僅限於 Antigravity。
1:15.251–1:18.640
它還能包裝你的
1:18.640–1:21.880
ChatGPT Codex 帳戶、Claude Code 訂閱、
1:21.880–1:22.900
Grok、Kimi、Gemini CLI,以及更多,
1:22.900–1:26.747
全部透過單一端點並具備多帳戶負載平衡。
1:26.747–1:29.120
但在本影片中,我們將主要
1:29.300–1:32.418
專注於 Antigravity 部分,因為
1:32.418–1:33.840
這是這裡的免費午餐。所以,讓我們直接開始並
1:33.840–1:35.744
設定這個東西。首先,我們需要安裝它。
1:35.744–1:38.600
如果你使用的是 Mac,這非常簡單。只需開啟
1:38.600–1:41.200
你的終端機並執行 brew install CLIProxy API。
1:41.200–1:43.800
完成後,你可以執行 brew services,
1:43.800–1:47.154
啟動 CLIProxy API,並
1:47.154–1:50.180
它將作為服務在背景持續運行。
1:50.180–1:51.703
啟動 CLIProxy API,並
1:51.703–1:54.900
它會作為背景服務持續運行。
1:54.900–1:58.088
如果你使用的是 Linux,他們提供了一個一行指令的安裝腳本。
1:58.088–2:00.300
你只需要從他們的
2:00.300–2:03.416
文件中複製 curl 指令(連結在下方),然後將其輸入到 Bash 中。
2:03.416–2:06.460
它會下載二進制檔案並為你設定好一切。如果你使用的是 Arch,它也在 AUR 上,所以
2:06.460–2:09.628
你可以直接用 Ye 安裝它。如果你使用的是
2:09.628–2:12.880
Windows,你可以從他們的 GitHub 儲存庫中獲取最新版本,
2:12.880–2:16.232
解壓縮它,然後執行 EXE 檔案。
2:16.232–2:17.660
他們還有一個名為 Easy CLI 的桌面圖形介面應用程式。
2:17.660–2:20.450
如果你完全不想碰終端機,
2:20.450–2:23.100
如果你想在伺服器上運行它,也提供了一個 Docker 映像檔。
2:23.260–2:26.385
所以,基本上,每個平台都
2:26.385–2:28.100
涵蓋了,這絕對相當不錯。一旦安裝完成,
2:28.100–2:30.575
會有一個名為
2:30.575–2:31.740
config.yaml 的設定檔,適用於 Mac 和 Linux。它通常位於
2:31.740–2:35.534
主目錄中的 .
2:35.534–2:38.440
clyproxy API 資料夾,或者如果你透過 brew 安裝,則位於 Homebrew 等資料夾中。
2:38.440–2:41.573
預設值大多沒問題。
2:41.573–2:43.140
伺服器運行在 8317 端口。
2:43.140–2:45.233
你應該做的一件事是查看設定檔中的 API 金鑰部分,
2:45.233–2:49.680
並在那裡設定你自己的金鑰。
2:49.680–2:51.282
這是你的客戶端用來與代理伺服器通訊的金鑰。
2:51.282–2:54.200
你可以將其設定為任何內容,例如 sk-my-key 或你想要的任何內容。
2:54.580–2:57.774
如果你只在本地運行它,
2:57.774–2:59.040
這關係不大。但是
2:59.040–3:00.779
如果你曾經在伺服器上公開它,你絕對需要
3:00.779–3:02.940
這裡有一個適當的金鑰。現在,讓我們連接 antigravity。
3:02.940–3:06.100
這是主要部分,實際上只有一個
3:06.100–3:09.040
指令。在你的終端機中,運行 .
3:09.040–3:11.513
clyproxy API 二進制檔案,並加上 .clyproxy API
3:11.513–3:14.480
標誌。當你運行它時,它會開啟瀏覽器。
3:14.480–3:17.547
你只需要登入,就這樣。OAuth 回調
3:17.547–3:21.040
會在本地端口返回。
3:21.040–3:22.498
權杖會被儲存到 y
3:22.498–3:23.956
你的 auth 目錄中,然後它會在背景中自動
3:23.956–3:26.540
刷新它。好的,所以
3:26.540–3:29.475
現在代理伺服器正在運行。有了我們的 antigravity
3:29.475–3:32.200
連接,讓我們看看我們實際上獲得了哪些模型。
3:32.200–3:35.347
如果你訪問 localhost
3:35.347–3:38.120
端口 8317 的模型端點,你會看到整個列表。
3:38.120–3:40.483
連接埠 8317,你會看到完整的列表。
3:40.483–3:43.760
我正在製作這部影片時,Antigravity 提供者
3:43.760–3:47.820
提供 Claude Opus 4.6、思考型 Claude Sonnet 4.6、Gemini 3.1 Pro 的高推理與低推理
3:47.820–3:51.300
變體、Gemini 3.5 Flash 的多個努力等級、
3:51.300–3:54.555
Gemini 3 Flash、一個閃電影像模型,
3:54.555–3:56.880
甚至還有 GPT-OSS 120B。這是三個不同的 Frontier Labs 模型,
3:56.880–4:00.917
這簡直太驚人了。
4:00.917–4:02.240
現在,讓我們實際在這些工具中使用這些模型。
4:02.580–4:05.303
這正是相容的 API 格式
4:05.303–4:07.760
重要的地方,因為每個工具都使用這些協定之一。
4:07.760–4:10.899
讓我們從 Claude Code 開始,
4:10.899–4:12.500
因為在 Claude Code 中使用 Opus 4.6
4:13.060–4:14.270
而不需要向 Anthropic 支付任何費用,
4:14.270–4:15.413
顯然是這裡的重點。自從 Claude Code 基本上開始對限制進行「地毯式搶劫」以來,
4:15.413–4:18.640
每個人都在
4:18.640–4:23.194
尋找繞過它的方法。所以,對於這個,
4:23.194–4:24.160
你只需要設定幾個環境變數。
4:24.160–4:26.104
首先,將基於 Anthropic 的 URL 變數設定為你的本地代理,
4:26.104–4:28.520
即 HTTP localhost 的 8317 端口。
4:29.160–4:33.625
然後將 Anthropic 授權權杖變數設定為你放入設定檔中的 API 金鑰,
4:33.625–4:35.980
接著映射
4:36.540–4:41.285
模型。有一個環境變數用於預設的 Opus 模型,
4:41.285–4:42.220
一個用於預設的 Sonnet
4:42.220–4:45.983
模型,以及一個用於預設的 Haiku 模型。
4:45.983–4:47.340
你可以將 Opus 指向 Claude Opus 4.6,
4:47.340–4:49.875
將 Sonnet 指向 Claude Sonnet 4.6。而
4:49.875–4:52.340
對於 Haiku,你實際上可以將其指向
4:52.340–4:55.236
像是 Gemini 3.5 Flash 這樣的東西,這是一個有趣的小技巧,
4:55.236–4:57.920
因為代理會即時在
4:57.920–5:00.587
Claude 格式和其他提供者之間進行轉換。
5:00.587–5:02.260
你可以將這些匯出指令放在你的 shell 設定檔中,
5:02.260–5:04.565
或者建立一個小腳本來啟動 Claude Code 並使用這些設定。
5:04.565–5:06.660
現在,當你啟動 Claude Code 時,
5:06.980–5:09.870
它正在與你的本地代理通訊,而該代理正在與 Antigravity 通訊,
5:09.870–5:11.400
並且你正在使用
5:11.480–5:14.619
Google 的 Dime 運行 Opus 4.6。接下來是 OpenCode。這個也非常
5:14.619–5:16.020
簡單。你只需打開 .config 資料夾中的 OpenCode.jsonconfig
5:16.020–5:18.608
檔案,並在 Provider 區段下,
5:18.608–5:21.520
新增指向
5:21.520–5:24.362
在你的 .config 資料夾中的檔案,並在 Provider 區段下,
5:24.362–5:25.700
新增指向
5:25.700–5:29.460
指向本機端口的 8317/v1,並附上你的 API 金鑰。
5:29.460–5:31.540
接著,你只需從 OpenCode 內的模型清單中
5:31.540–5:34.797
選擇任何一個 Antigravity 模型。
5:34.797–5:36.900
老實說,OpenCode 裡的 Gemini 3.1 Procode 運作效果
5:36.900–5:40.646
非常好。接下來是 Codex CLI。
5:40.646–5:43.560
對於這個工具,你需要編輯 .codex 資料夾中的 config.yaml 檔案,
5:43.560–5:45.264
5:45.264–5:49.600
新增一個自訂模型提供者區塊,將基礎 URL 設定為本機
5:49.600–5:53.809
端口 8317/v1,並將 wire API 設定為 responses。
5:53.809–5:56.200
接著將模型設定為你
5:56.200–5:58.757
想要使用的任何模型。文件中有此設定的精確程式碼片段,
5:58.757–5:59.900
我會在下方提供連結。
5:59.900–6:01.854
對於 Klein 和 Rucode 等工具,
6:01.854–6:04.980
你只需在它們的
6:04.980–6:10.262
設定中選擇 OpenAI 相容的提供者,將基礎 URL 設為本機端口 8317/v1,
6:10.262–6:12.540
貼上你的金鑰,然後選擇
6:12.540–6:17.480
模型。基本上,任何支援自訂 OpenAI 相容
6:17.480–6:20.603
端點的 AI 工具都可以這樣做,而現在幾乎所有 AI 工具都支援。
6:20.603–6:22.100
你甚至可以直接從
6:22.100–6:28.520
你自己的程式碼中,透過變更基礎 URL,使用一般的 OpenAI 或 Anthropic SDK 來呼叫它。讓我
6:28.520–6:31.413
快速展示一下。這裡正在執行代理伺服器,
6:31.413–6:33.320
我已經使用環境變數
6:33.320–6:35.880
設定好了 Claude Code。讓我們請它建構一個小型應用程式。
6:35.880–6:37.320
我會輸入類似「建立
6:37.320–6:39.767
一個帶有圖表的簡單費用追蹤網頁應用程式」的指令。
6:39.767–6:42.020
讓我們發送並看看結果。你可以看到,它
6:42.020–6:44.718
像平常一樣處理任務。它正在建立檔案,
6:44.718–6:45.940
執行指令,並進行其
6:45.940–6:48.513
操作。回應流暢地串流進來,
6:48.513–6:51.020
工具呼叫運作正常,如果我檢查代理伺服器記錄,
6:51.020–6:53.991
你可以看到請求發送到反重力後端。
6:53.991–6:55.560
從 Claude Code 的角度來看,
6:55.760–6:58.795
完全沒有任何改變。它只是以為自己正在與 Anthropic 對話,
6:58.795–6:59.580
而品質
6:59.580–7:02.905
完全符合你的預期,因為這實際上是真正的 Opus 4.
7:02.905–7:04.340
6 思考模型,並非某些
7:04.340–7:08.393
量化版的仿製品。如果我們稍等片刻。現在已經完成了。
7:08.393–7:10.860
應用程式一次就成功運作,
7:10.860–7:13.614
而整個過程花費了我整整零美元。所以
7:13.614–7:15.600
這真的很棒。現在有幾件事
7:15.600–7:18.772
你應該要知道的事。反重力配額是每五小時一個視窗,
7:18.772–7:19.940
並且會隨時間重置。
7:20.320–7:22.460
Gemini 模型的限制相當寬鬆,而
7:22.460–7:24.040
Claude 模型的限制則較嚴格,
7:24.160–7:26.869
這很合理,因為 Google 需要為這些服務向 Anthropic 付費。
7:26.869–7:28.100
此外,還附帶一個網頁管理
7:28.100–7:31.301
介面,你可以在瀏覽器中查看帳戶、
7:31.301–7:33.720
使用情況以及管理金鑰。
7:33.720–7:36.630
並且圍繞此專案還有許多社群應用程式,
7:36.630–7:38.440
例如追蹤所有帳戶
7:38.440–7:40.152
配額的選單列應用程式。
7:40.152–7:43.640
這個專案周圍的生態系出乎意料地龐大。總體來說,
7:43.980–7:47.235
如果問我,這是目前你能運行的最佳設定之一,
7:47.235–7:50.180
你可以使用任何你喜歡的介面來運行 Opus 4.6、Gemini 3.1 Pro
7:50.620–7:53.069
和 Gemini 3.5 Flash。
7:53.069–7:55.320
我嘗試過許多這類代理專案,
7:55.620–7:57.348
而這個專案無疑是其中最完善且
7:57.348–7:58.740
維護最積極的一個。
7:58.740–8:00.615
這絕對是一個非常好的選擇,
8:00.615–8:03.700
特別是對於學生和無法合理化每月支付
8:03.700–8:06.521
200 美元編程訂閱費用的人來說。總體來說,
8:06.521–8:09.480
這相當酷。無論如何,請在評論中告訴我你的想法。
8:09.480–8:11.342
如果你喜歡這個影片,
8:11.342–8:14.300
考慮透過「超級感謝」選項進行捐贈,或透過點擊「加入」按鈕成為
8:14.300–8:16.416
會員。此外,
8:16.416–8:19.120
給這個影片按讚並訂閱我的頻道。
8:19.120–8:21.580
我們下一個影片見。在此之前,再見。
8:28.740–8:30.740
再見。
0:00.000–0:04.185
Hi, welcome to another video. So
嗨,歡迎收看另一個影片。所以
0:04.185–0:09.920
by now you probably know about Antigravity,
到目前為止,你可能已經知道 Antigravity,
0:10.220–0:13.957
which is Google's agentic IDE. It's actually pretty good,
它是 Google 的代理式 IDE。它其實相當不錯,
0:13.957–0:15.940
but the best part about it is not
但關於它最棒的部分並不在於
0:15.940–0:20.168
really the IDE itself. The best part is the models that come with it.
IDE 本身。最棒的部分是隨附的模型。
0:20.168–0:21.300
With just a normal
只需一個普通的
0:21.300–0:25.377
Google account, Antigravity gives you access to Gemini 3.
Google 帳戶,Antigravity 就能讓你使用 Gemini 3.
0:25.377–0:28.040
1 Pro, Gemini 3.5 Flash, and believe it
1 Pro、Gemini 3.5 Flash,而且信不信由你,甚至包括 Claude 模型如 Opus 4.6、Thinking,
0:28.040–0:31.469
or not, even Claude models like Opus 4.6, Thinking,
以及 Sonnet 4.6,全部免費且速率限制相當合理。現在這很驚人,但有一個大問題。
0:31.469–0:34.500
and Sonnet 4.6 all for free with pretty decent
所有這些都鎖定在
0:34.500–0:38.033
rate limits. Now that's amazing, but there's one big problem.
Antigravity IDE 內部,而依我之見,
0:38.033–0:39.800
All of this is locked inside the
框架(harness)與模型本身同樣重要。
0:39.800–0:41.685
Antigravity IDE, and if you ask me,
你可能想在 Claude Code 中使用 Opus 4.6,
0:41.685–0:44.740
the harness matters just as much as the model these days.
或在 OpenCode、Klein、
0:45.020–0:48.426
You might want to use Opus 4.6 inside Claude Code,
或 Rucode 中使用 Gemini 3.1 Pro,甚至透過 API 在你的自有應用程式中使用。
0:48.426–0:51.500
or Gemini 3.1 Pro inside OpenCode, or Klein,
但 Google 顯然不為這些模型提供 API。
0:51.760–0:54.281
or Rucode, or even in your own apps through an API.
Gemini API 需要付費,而
0:54.281–0:56.740
But Google obviously doesn't give you an API for
Claude API 簡直是市面上最昂貴
0:56.740–0:59.298
these models. The Gemini API costs money, and
的 API 之一。這就是 CLIProxy API 登場的地方。
0:59.298–1:02.260
the Claude API is literally one of the most expensive
這是一個開源專案,基本上
1:02.260–1:05.603
ones out there. Well, this is where CLIProxy API comes in.
它將你的 Antigravity
1:05.603–1:08.180
It's an open-source project that basically
包裝成一個與 OpenAI、
1:08.180–1:09.473
takes your Antigravity and
Gemini 和 Claude API 格式相容的本機 API 伺服器。所以,
1:09.473–1:12.620
wraps it up as a local API server that's compatible with the OpenAI,
任何能與這些 API 通訊的工具現在都可以使用
1:13.040–1:15.251
Gemini, and Claude API formats. So,
Antigravity 的模型。而且它不僅限於 Antigravity。
1:15.251–1:18.640
any tool that can talk to any of these APIs can now use the
它還能包裝你的
1:18.640–1:21.880
Antigravity models. And it doesn't stop at Antigravity either.
ChatGPT Codex 帳戶、Claude Code 訂閱、
1:21.880–1:22.900
It can also wrap your
Grok、Kimi、Gemini CLI,以及更多,
1:22.900–1:26.747
ChatGPT Codex account, your Claude Code subscription,
全部透過單一端點並具備多帳戶負載平衡。
1:26.747–1:29.120
Grok, Kimi, Gemini, CLI, and more,
但在本影片中,我們將主要
1:29.300–1:32.418
all behind one single endpoint with multi-account load balancing.
專注於 Antigravity 部分,因為
1:32.418–1:33.840
But in this video, we'll mainly
這是這裡的免費午餐。所以,讓我們直接開始並
1:33.840–1:35.744
focus on the Antigravity part because
設定這個東西。首先,我們需要安裝它。
1:35.744–1:38.600
that's the free lunch here. So, let's get right into it and
如果你使用的是 Mac,這非常簡單。只需開啟
1:38.600–1:41.200
set this thing up. First, we need to install it.
你的終端機並執行 brew install CLIProxy API。
1:41.200–1:43.800
If you're on a Mac, it's super simple. Just open
完成後,你可以執行 brew services,
1:43.800–1:47.154
your terminal and run brew install CLIProxy API.
啟動 CLIProxy API,並
1:47.154–1:50.180
Once that's done, you can run brew services,
它將作為服務在背景持續運行。
1:50.180–1:51.703
start CLIProxy API, and
啟動 CLIProxy API,並
1:51.703–1:54.900
it'll keep running in the background as a service.
它會作為背景服務持續運行。
1:54.900–1:58.088
If you're on Linux, they have a one-line installer script.
如果你使用的是 Linux,他們提供了一個一行指令的安裝腳本。
1:58.088–2:00.300
You just copy the curl command from their
你只需要從他們的
2:00.300–2:03.416
docs, which are linked below, and pipe it into Bash.
文件中複製 curl 指令(連結在下方),然後將其輸入到 Bash 中。
2:03.416–2:06.460
It downloads the binary and sets everything up for
它會下載二進制檔案並為你設定好一切。如果你使用的是 Arch,它也在 AUR 上,所以
2:06.460–2:09.628
you. If you're on Arch, it's also on the AUR, so
你可以直接用 Ye 安裝它。如果你使用的是
2:09.628–2:12.880
you can just install it with Ye. And if you're on
Windows,你可以從他們的 GitHub 儲存庫中獲取最新版本,
2:12.880–2:16.232
Windows, you can grab the latest release from their GitHub repo,
解壓縮它,然後執行 EXE 檔案。
2:16.232–2:17.660
extract it, and run the EXE.
他們還有一個名為 Easy CLI 的桌面圖形介面應用程式。
2:17.660–2:20.450
They also have a desktop GUI app called Easy CLI.
如果你完全不想碰終端機,
2:20.450–2:23.100
If you don't want to touch the terminal at all,
如果你想在伺服器上運行它,也提供了一個 Docker 映像檔。
2:23.260–2:26.385
there's a Docker image as well if you want to run it on a server.
所以,基本上,每個平台都
2:26.385–2:28.100
So, basically, every platform is
涵蓋了,這絕對相當不錯。一旦安裝完成,
2:28.100–2:30.575
covered, which is pretty good for sure. Once it's installed,
會有一個名為
2:30.575–2:31.740
there's a config file called
config.yaml 的設定檔,適用於 Mac 和 Linux。它通常位於
2:31.740–2:35.534
config.yaml on Mac and Linux. It generally lives in the .
主目錄中的 .
2:35.534–2:38.440
clyproxy API folder in your home directory
clyproxy API 資料夾,或者如果你透過 brew 安裝,則位於 Homebrew 等資料夾中。
2:38.440–2:41.573
or in the Homebrew, etc. folder if you installed it via brew.
預設值大多沒問題。
2:41.573–2:43.140
The defaults are mostly fine.
伺服器運行在 8317 端口。
2:43.140–2:45.233
The server runs on port 8317.
你應該做的一件事是查看設定檔中的 API 金鑰部分,
2:45.233–2:49.680
The one thing you should do is look at the API key section in the
並在那裡設定你自己的金鑰。
2:49.680–2:51.282
config and set your own key there.
這是你的客戶端用來與代理伺服器通訊的金鑰。
2:51.282–2:54.200
This is the key that your clients will use to talk to the proxy.
你可以將其設定為任何內容,例如 sk-my-key 或你想要的任何內容。
2:54.580–2:57.774
You can set it to anything, like sk-my-key or whatever you want.
如果你只在本地運行它,
2:57.774–2:59.040
If you're only running it
這關係不大。但是
2:59.040–3:00.779
locally, this doesn't matter that much. But
如果你曾經在伺服器上公開它,你絕對需要
3:00.779–3:02.940
if you ever expose this on a server, you definitely want
這裡有一個適當的金鑰。現在,讓我們連接 antigravity。
3:02.940–3:06.100
a proper key here. Now, let's connect antigravity.
這是主要部分,實際上只有一個
3:06.100–3:09.040
This is the main part, and it's honestly just one
指令。在你的終端機中,運行 .
3:09.040–3:11.513
command. In your terminal, run the .
clyproxy API 二進制檔案,並加上 .clyproxy API
3:11.513–3:14.480
clyproxy API binary with the .clyproxy API
標誌。當你運行它時,它會開啟瀏覽器。
3:14.480–3:17.547
flag. When you run it, it'll open a browser.
你只需要登入,就這樣。OAuth 回調
3:17.547–3:21.040
You just log in, and that's it. The OAuth callback
會在本地端口返回。
3:21.040–3:22.498
comes back on a local port.
權杖會被儲存到 y
3:22.498–3:23.956
The token gets saved into y
你的 auth 目錄中,然後它會在背景中自動
3:23.956–3:26.540
our auth directory, and it will automatically
刷新它。好的,所以
3:26.540–3:29.475
refresh it in the background from then on. Okay, so
現在代理伺服器正在運行。有了我們的 antigravity
3:29.475–3:32.200
now the proxy is running. With our antigravity
連接,讓我們看看我們實際上獲得了哪些模型。
3:32.200–3:35.347
connected, let's see what models we actually get.
如果你訪問 localhost
3:35.347–3:38.120
If you hit the model's endpoint on localhost
端口 8317 的模型端點,你會看到整個列表。
3:38.120–3:40.483
port 8317, you'll see the whole list.
連接埠 8317,你會看到完整的列表。
3:40.483–3:43.760
As I'm making this video, the antigravity provider
我正在製作這部影片時,Antigravity 提供者
3:43.760–3:47.820
gives you Claude Opus 4.6, thinking Claude Sané 4.
提供 Claude Opus 4.6、思考型 Claude Sonnet 4.6、Gemini 3.1 Pro 的高推理與低推理
3:47.820–3:51.300
6, Gemini 3.1, Pro in high and low reasoning
變體、Gemini 3.5 Flash 的多個努力等級、
3:51.300–3:54.555
variants, Gemini 3.5 Flash in a few effort levels,
Gemini 3 Flash、一個閃電影像模型,
3:54.555–3:56.880
Gemini 3 Flash, a flash image model,
甚至還有 GPT-OSS 120B。這是三個不同的 Frontier Labs 模型,
3:56.880–4:00.917
and even GPT-OSS 120B. That's three different Frontier Labs models,
這簡直太驚人了。
4:00.917–4:02.240
which is just amazing.
現在,讓我們實際在這些工具中使用這些模型。
4:02.580–4:05.303
Now, let's actually use these in some harnesses.
這正是相容的 API 格式
4:05.303–4:07.760
And this is where the compatible API formats
重要的地方,因為每個工具都使用這些協定之一。
4:07.760–4:10.899
matter, because every tool speaks one of these protocols.
讓我們從 Claude Code 開始,
4:10.899–4:12.500
Let's start with Claude Code,
因為在 Claude Code 中使用 Opus 4.6
4:13.060–4:14.270
because using Opus 4.
而不需要向 Anthropic 支付任何費用,
4:14.270–4:15.413
6 in Claude Code with
顯然是這裡的重點。自從 Claude Code 基本上開始對限制進行「地毯式搶劫」以來,
4:15.413–4:18.640
out paying Anthropic anything is obviously the headline
每個人都在
4:18.640–4:23.194
here. Ever since Claude Code basically started rug-pulling people on limits,
尋找繞過它的方法。所以,對於這個,
4:23.194–4:24.160
everyone's been
你只需要設定幾個環境變數。
4:24.160–4:26.104
looking for ways around it. So for this,
首先,將基於 Anthropic 的 URL 變數設定為你的本地代理,
4:26.104–4:28.520
you just need to set a few environment variables.
即 HTTP localhost 的 8317 端口。
4:29.160–4:33.625
First, set the Anthropic-based URL variable to your local proxy,
然後將 Anthropic 授權權杖變數設定為你放入設定檔中的 API 金鑰,
4:33.625–4:35.980
which is HTTP localhost port 8317.
接著映射
4:36.540–4:41.285
Then set the Anthropic auth token variable to the API key you put in your config,
模型。有一個環境變數用於預設的 Opus 模型,
4:41.285–4:42.220
and then you map
一個用於預設的 Sonnet
4:42.220–4:45.983
the models. There is an environment variable for the default Opus model,
模型,以及一個用於預設的 Haiku 模型。
4:45.983–4:47.340
one for the default Sonnet
你可以將 Opus 指向 Claude Opus 4.6,
4:47.340–4:49.875
model, and one for the default Haiku model.
將 Sonnet 指向 Claude Sonnet 4.6。而
4:49.875–4:52.340
You can point the Opus 1 at Claude Opus 4.6,
對於 Haiku,你實際上可以將其指向
4:52.340–4:55.236
thinking the Sonnet one at Claude Sonnet 4.6. And
像是 Gemini 3.5 Flash 這樣的東西,這是一個有趣的小技巧,
4:55.236–4:57.920
for the Haiku one, you can actually point it at
因為代理會即時在
4:57.920–5:00.587
something like Gemini 3.5 Flash, which is a fun little trick,
Claude 格式和其他提供者之間進行轉換。
5:00.587–5:02.260
because the proxy translates between
你可以將這些匯出指令放在你的 shell 設定檔中,
5:02.260–5:04.565
the Claude format and the other providers on the fly.
或者建立一個小腳本來啟動 Claude Code 並使用這些設定。
5:04.565–5:06.660
You can put these exports in your shell profile,
現在,當你啟動 Claude Code 時,
5:06.980–5:09.870
or create a small script that launches Claude Code with them.
它正在與你的本地代理通訊,而該代理正在與 Antigravity 通訊,
5:09.870–5:11.400
Now, when you start Claude Code,
並且你正在使用
5:11.480–5:14.619
it's talking to your local proxy, which is talking to Antigravity,
Google 的 Dime 運行 Opus 4.6。接下來是 OpenCode。這個也非常
5:14.619–5:16.020
and you're running Opus 4.6 on
簡單。你只需打開 .config 資料夾中的 OpenCode.jsonconfig
5:16.020–5:18.608
Google's Dime. Next, OpenCode. This one is also
檔案,並在 Provider 區段下,
5:18.608–5:21.520
super simple. You just open the OpenCode.jsonconfig
新增指向
5:21.520–5:24.362
file in your .config folder, and under the Provider section,
在你的 .config 資料夾中的檔案,並在 Provider 區段下,
5:24.362–5:25.700
you add the base URL pointing
新增指向
5:25.700–5:29.460
to localhost port 8317 slash v1, along with your API key.
指向本機端口的 8317/v1,並附上你的 API 金鑰。
5:29.460–5:31.540
Then you can just pick any of the
接著,你只需從 OpenCode 內的模型清單中
5:31.540–5:34.797
Antigravity models from the model list inside OpenCode.
選擇任何一個 Antigravity 模型。
5:34.797–5:36.900
Gemini 3.1 Procode in OpenCode works
老實說,OpenCode 裡的 Gemini 3.1 Procode 運作效果
5:36.900–5:40.646
really well, to be honest. Then there's the Codex CLI.
非常好。接下來是 Codex CLI。
5:40.646–5:43.560
For that one, you edit the config.2ml file
對於這個工具,你需要編輯 .codex 資料夾中的 config.yaml 檔案,
5:43.560–5:45.264
in your .codex folder, and
5:45.264–5:49.600
add a custom model provider block with the base URL set to localhost
新增一個自訂模型提供者區塊,將基礎 URL 設定為本機
5:49.600–5:53.809
port 8317 slash v1, and the wire API set to responses.
端口 8317/v1,並將 wire API 設定為 responses。
5:53.809–5:56.200
Then set the model to whatever
接著將模型設定為你
5:56.200–5:58.757
you want to use. The docs have the exact snippet for this,
想要使用的任何模型。文件中有此設定的精確程式碼片段,
5:58.757–5:59.900
and I'll link them below.
我會在下方提供連結。
5:59.900–6:01.854
And for tools like Klein and Rucode,
對於 Klein 和 Rucode 等工具,
6:01.854–6:04.980
you just select the OpenAI-compatible provider in their
你只需在它們的
6:04.980–6:10.262
settings, put in localhost port 8317 slash v1 as the base URL,
設定中選擇 OpenAI 相容的提供者,將基礎 URL 設為本機端口 8317/v1,
6:10.262–6:12.540
paste your key, and select
貼上你的金鑰,然後選擇
6:12.540–6:17.480
the model. The same thing works for basically anything that supports a custom OpenAI-compatible
模型。基本上,任何支援自訂 OpenAI 相容
6:17.480–6:20.603
endpoint, which is literally every AI tool at this point.
端點的 AI 工具都可以這樣做,而現在幾乎所有 AI 工具都支援。
6:20.603–6:22.100
You can even hit it from your
你甚至可以直接從
6:22.100–6:28.520
own code with the normal OpenAI or Anthropic SDKs by just changing the base URL. So let me
你自己的程式碼中,透過變更基礎 URL,使用一般的 OpenAI 或 Anthropic SDK 來呼叫它。讓我
6:28.520–6:31.413
show you this quickly. I have the proxy running here,
快速展示一下。這裡正在執行代理伺服器,
6:31.413–6:33.320
and I've set up Claude Code with the
我已經使用環境變數
6:33.320–6:35.880
environment variables. Let's ask it to build a small app.
設定好了 Claude Code。讓我們請它建構一個小型應用程式。
6:35.880–6:37.320
I'll type something like create
我會輸入類似「建立
6:37.320–6:39.767
a simple expense tracker web app with charts.
一個帶有圖表的簡單費用追蹤網頁應用程式」的指令。
6:39.767–6:42.020
Let's send it and see. And you can see, it's
讓我們發送並看看結果。你可以看到,它
6:42.020–6:44.718
working through the task like normal. It's creating the files,
像平常一樣處理任務。它正在建立檔案,
6:44.718–6:45.940
running commands, doing its
執行指令,並進行其
6:45.940–6:48.513
thing. The responses are streaming in nicely,
操作。回應流暢地串流進來,
6:48.513–6:51.020
tool calls work, and if I check the proxy logs,
工具呼叫運作正常,如果我檢查代理伺服器記錄,
6:51.020–6:53.991
you can see the requests going out to the anti-gravity backend.
你可以看到請求發送到反重力後端。
6:53.991–6:55.560
From Claude Code's perspective,
從 Claude Code 的角度來看,
6:55.760–6:58.795
nothing has changed at all. It just thinks it's talking to Anthropic,
完全沒有任何改變。它只是以為自己正在與 Anthropic 對話,
6:58.795–6:59.580
and the quality is
而品質
6:59.580–7:02.905
exactly what you'd expect, because this is the actual Opus 4.
完全符合你的預期,因為這實際上是真正的 Opus 4.
7:02.905–7:04.340
6 thinking model, not some
6 思考模型,並非某些
7:04.340–7:08.393
quantized knockoff. If we wait a bit. And it's now done.
量化版的仿製品。如果我們稍等片刻。現在已經完成了。
7:08.393–7:10.860
The app works on the first try, and
應用程式一次就成功運作,
7:10.860–7:13.614
this whole session cost me exactly zero dollars. So
而整個過程花費了我整整零美元。所以
7:13.614–7:15.600
this is kind of great. Now a few things
這真的很棒。現在有幾件事
7:15.600–7:18.772
you should know. The anti-gravity quotas are per five-hour window,
你應該要知道的事。反重力配額是每五小時一個視窗,
7:18.772–7:19.940
and they reset over time.
並且會隨時間重置。
7:20.320–7:22.460
Gemini models have pretty generous limits, while
Gemini 模型的限制相當寬鬆,而
7:22.460–7:24.040
the Claude models have tighter ones,
Claude 模型的限制則較嚴格,
7:24.160–7:26.869
which makes sense, because Google is paying Anthropic for those.
這很合理,因為 Google 需要為這些服務向 Anthropic 付費。
7:26.869–7:28.100
There's also a web management
此外,還附帶一個網頁管理
7:28.100–7:31.301
UI that comes with it, where you can see your accounts,
介面,你可以在瀏覽器中查看帳戶、
7:31.301–7:33.720
usage, and manage keys from the browser.
使用情況以及管理金鑰。
7:33.720–7:36.630
And there's a bunch of community apps built around it,
並且圍繞此專案還有許多社群應用程式,
7:36.630–7:38.440
like menu bar apps that track your
例如追蹤所有帳戶
7:38.440–7:40.152
quotas across all the accounts.
配額的選單列應用程式。
7:40.152–7:43.640
The ecosystem around this project is surprisingly big. Overall,
這個專案周圍的生態系出乎意料地龐大。總體來說,
7:43.980–7:47.235
this is one of the best setups you can run right now,
如果問我,這是目前你能運行的最佳設定之一,
7:47.235–7:50.180
if you ask me. You get Opus 4.6, Gemini 3.1 Pro,
你可以使用任何你喜歡的介面來運行 Opus 4.6、Gemini 3.1 Pro
7:50.620–7:53.069
and Gemini 3.5 Flash in any harness you like.
和 Gemini 3.5 Flash。
7:53.069–7:55.320
I've tried a lot of these proxy projects,
我嘗試過許多這類代理專案,
7:55.620–7:57.348
and this one is easily the most polished and
而這個專案無疑是其中最完善且
7:57.348–7:58.740
actively maintained of the bunch.
維護最積極的一個。
7:58.740–8:00.615
This is a really good option for sure,
這絕對是一個非常好的選擇,
8:00.615–8:03.700
especially for students and anyone who can't justify paying
特別是對於學生和無法合理化每月支付
8:03.700–8:06.521
$200 a month for a coding subscription. Overall,
200 美元編程訂閱費用的人來說。總體來說,
8:06.521–8:09.480
it's pretty cool. Anyway, let me know your thoughts
這相當酷。無論如何,請在評論中告訴我你的想法。
8:09.480–8:11.342
in the comments. If you liked this video,
如果你喜歡這個影片,
8:11.342–8:14.300
consider donating through the Super Thanks option, or becoming
考慮透過「超級感謝」選項進行捐贈,或透過點擊「加入」按鈕成為
8:14.300–8:16.416
a member by clicking the Join button. Also,
會員。此外,
8:16.416–8:19.120
give this video a thumbs up and subscribe to my channel.
給這個影片按讚並訂閱我的頻道。
8:19.120–8:21.580
I'll see you in the next one. Until then, bye.
我們下一個影片見。在此之前,再見。
8:28.740–8:30.740
Bye.
再見。

影片筆記:Claude Code,Codex + FREE Opus, Gemini API: FULLY FREE AI Coder is CRAZY!

一句話總結

影片介紹了開源專案 CLIProxy API,該專案能將 Google 的 Agentic IDE Antigravity 中的免費高階模型(如 Gemini 3.1 Pro、Claude Opus 4.6 等)包裝成本地 API 伺服器,讓開發者可以在 Claude Code、Codex CLI 等各種支援 OpenAI/Gemini/Claude API 格式的開發工具中,免費使用這些模型進行程式開發。

核心重點

  1. Antigravity 的免費模型資源:Google 推出的 Agentic IDE Antigravity 內建提供免費的 Gemini 3.1 Pro、Gemini 3.5 Flash 以及 Claude 系列模型(Opus 4.6, Thinking, Sonnet 4.6)。
  2. CLIProxy API 的核心功能:這是一個開源專案,主要功能是將 Antigravity 包裝成一個本地 API 伺服器(Local API Server)。
  3. 相容性與應用範圍:該代理伺服器相容於 OpenAI、Gemini 及 Claude API 格式。這意味著任何支援這些 API 格式的開發工具(Harnesses)都可以透過設定本地代理位址來使用 Antigravity 的模型。
  4. 安裝與設定:支援 Mac (Homebrew)、Linux (一鍵腳本/AUR)、Windows (EXE) 及 Docker。需配置 config.yaml 並透過 OAuth 登入 Antigravity 以獲取 Token。
  5. 實測成果:在 Claude Code 中配置本地代理後,成功建立應用程式(如費用追蹤器),全程成本為零美元。模型品質為實際的 Opus 4.6 Thinking 模型,非量化版本。
  6. 限制與配額:Antigravity 的配額以五小時視窗計算並隨時間重置。Claude 模型的配額限制較緊(因為 Google 需向 Anthropic 付費),而 Gemini 模型限制較寬鬆。

詳細大綱

一、 背景與問題

  • Antigravity 介紹:Google 推出的 Agentic IDE,內建免費提供 Gemini 3.1 Pro、Gemini 3.5 Flash 及 Claude 系列模型(Opus 4.6, Thinking, Sonnet 4.6)。
  • 現有痛點
  • 模型僅鎖定在 Antigravity IDE 內部。
  • 直接透過官方 API(Gemini API 或 Claude API)使用成本高昂。
  • 開發者希望將模型用於其他開發環境(Harnesses)。

二、 CLIProxy API 解決方案

  • 核心功能:開源專案,將 Antigravity 包裝為本地 API 伺服器。
  • 相容性:相容於 OpenAI、Gemini 及 Claude API 格式。
  • 額外支援:除 Antigravity 外,還支援包裝 ChatGPT Codex、Claude Code 訂閱、Grok、Kimi、Gemini CLI 等,並具備多帳戶負載平衡功能。
  • 本影片焦點:專注於 Antigravity 部分的免費使用(Free lunch)。

三、 安裝與設定步驟

  • 安裝方式
  • Mac:使用 Homebrew (brew install CLIProxy API),並透過 brew services start 在背景運行。
  • Linux:使用一鍵安裝腳本(curl 命令管道至 Bash),Arch Linux 使用者可透過 AUR 安裝。
  • Windows:從 GitHub 下載最新 Release,解壓並執行 EXE。
  • 其他選項:提供桌面 GUI 應用程式(Easy CLI)及 Docker 映像檔。
  • 設定檔配置
  • 設定檔名稱為 config.yaml,位於 Mac/Linux 的 .clyproxy API 資料夾或 Homebrew 資料夾中。
  • 伺服器預設運行於 port 8317
  • API Key 設定:建議在設定檔中設定自訂 API Key,供客戶端連線使用(若僅本地使用影響不大,但伺服器暴露時建議設定)。

四、 連線 Antigravity

  • 執行指令:在終端機執行 CLIProxy API 二進位檔並加上特定旗標(flag)。
  • 驗證流程
  • 開啟瀏覽器進行登入。
  • OAuth 回調(Callback)傳回本地端口。
  • Token 儲存於 auth 目錄,並自動在背景刷新。

五、 可用模型清單

  • 透過 localhost port 8317 的 model 端點可查看完整清單。
  • 支援模型
  • Claude Opus 4.6
  • Thinking Claude Sonnet 4.6
  • Gemini 3.1 Pro(高/低推理變體)
  • Gemini 3.5 Flash(多種效率等級)
  • Gemini 3 Flash
  • Flash 影像模型
  • GPT-OSS 120B
  • 註:包含三個不同的 Frontier Labs 模型。

六、 在各種開發工具(Harnesses)中的應用

  • Claude Code
  • 目的:免費在 Claude Code 中使用 Opus 4.6。
  • 設定
  • 設定環境變數 ANTHROPIC_BASE_URL 指向本地代理(http://localhost:8317)。
  • 設定 ANTHROPIC_AUTH_TOKEN 為設定檔中的 API Key。
  • 映射模型:將 Opus 1 指向 Claude Opus 4.6,Sonnet 指向 Sonnet 4.6,Haiku 可指向 Gemini 3.5 Flash(利用代理進行格式轉換)。
  • 效果:Claude Code 認為正在與 Anthropic 通訊,實際請求由 Antigravity 處理,成本為零。
  • OpenCode
  • 編輯 .config 資料夾中的 OpenCode.jsonconfig
  • 在 Provider 區塊設定 Base URL 為 localhost:8317/v1 及 API Key。
  • 可直接選擇 Antigravity 模型(如 Gemini 3.1 Pro 效果良好)。
  • Codex CLI
  • 編輯 .codex 資料夾中的 config.yaml
  • 新增自訂模型提供者區塊,設定 Base URL 為 localhost:8317/v1,Wire API 設為 responses
  • 設定欲使用的模型。
  • Klein 與 Rucode
  • 在設定中選擇 OpenAI 相容提供者。
  • 輸入 Base URL (localhost:8317/v1) 與 API Key。
  • 選擇對應模型。
  • 通用應用
  • 任何支援自訂 OpenAI 相容端點的 AI 工具皆可使用。
  • 可透過標準 OpenAI 或 Anthropic SDK 在自己的程式碼中呼叫,僅需更改 Base URL。

七、 實測演示與注意事項

  • 實測結果
  • 透過 Claude Code 建立簡單應用程式(如費用追蹤器網頁應用)。
  • 檔案建立、指令執行、串流回應、工具呼叫均正常運作。
  • 代理伺服器日誌顯示請求發送至 Antigravity 後端。
  • 模型品質為實際的 Opus 4.6 Thinking 模型,非量化版本。
  • 應用程式一次運行成功,全程成本為零美元。
  • 配額與限制
  • Antigravity 配額以五小時視窗計算,會隨時間重置。
  • Gemini 模型限制較寬鬆,Claude 模型限制較緊(因 Google 需向 Anthropic 付費)。
  • 生態系統
  • 提供 Web 管理 UI,可查看帳戶、用量及管理金鑰。
  • 存在社區開發的應用程式(如選單列應用程式追蹤配額)。
  • 該專案被評價為最精緻且活躍維護的代理專案之一。
  • 適用對象:適合學生或無法負擔每月 $200 程式碼訂閱費的使用者。

工具 / 模型 / 名詞整理

  • IDE / 平台
  • Antigravity (Google's agentic IDE)
  • Claude Code
  • OpenCode
  • Klein
  • Rucode
  • Codex CLI
  • ChatGPT Codex
  • Grok
  • Kimi
  • Gemini CLI
  • 代理/開源專案
  • CLIProxy API
  • Easy CLI (Desktop GUI app)
  • 模型名稱
  • Gemini 3.1 Pro
  • Gemini 3.5 Flash
  • Gemini 3 Flash
  • Claude Opus 4.6
  • Thinking Claude Sonnet 4.6
  • GPT-OSS 120B
  • 技術/協議
  • OpenAI API format
  • Gemini API format
  • Claude API format
  • OAuth
  • Docker
  • Homebrew (brew)
  • AUR (Arch User Repository)
  • SDK (OpenAI, Anthropic)

操作流程整理

  1. 安裝 CLIProxy API
  • 根據作業系統選擇安裝方式(Mac: Homebrew, Linux: 腳本, Windows: EXE)。
  1. 配置設定檔
  • 找到 config.yaml 檔案(通常在 .clyproxy API 資料夾)。
  • 設定自訂 API Key(可選,但建議設定)。
  • 確認伺服器運行於 port 8317。
  1. 啟動代理並登入 Antigravity
  • 執行 CLIProxy API 二進位檔。
  • 透過瀏覽器進行 OAuth 登入 Antigravity。
  • 確認 Token 已儲存並自動刷新。
  1. 在目標開發工具中配置本地代理
  • Claude Code:設定環境變數 ANTHROPIC_BASE_URL=http://localhost:8317ANTHROPIC_AUTH_TOKEN=<你的API Key>
  • OpenCode:編輯 OpenCode.jsonconfig,設定 Base URL 為 localhost:8317/v1
  • Codex CLI:編輯 config.yaml,新增自訂提供者,設定 Base URL 為 localhost:8317/v1
  • 其他工具:選擇 OpenAI 相容提供者,輸入 Base URL 和 API Key。
  1. 開始開發
  • 在開發工具中選擇對應的模型(如 Opus 4.6 或 Gemini 3.1 Pro)。
  • 進行程式碼生成、編輯或應用程式建立。

值得注意的限制或風險

  1. 配額限制:Antigravity 的配額以五小時視窗計算,並隨時間重置。Claude 模型的配額限制較緊,因為 Google 需向 Anthropic 付費。
  2. 模型可用性:部分模型(特別是 Claude 系列)可能因配額用盡而暫時無法使用。
  3. 技術維護:CLIProxy API 為開源專案,其持續性與維護狀態取決於開發者。
  4. 安全性:雖然主要用於本地,但若將伺服器暴露給外部,建議設定 API Key 以限制存取。
  5. 版本相容性:模型名稱(如 Opus 4.6)與常見公開版本編號可能不符,需確認實際運作情況。

逐字稿辨識疑點

  • CLIProxy API:逐字稿中多次出現此名稱,但在安裝指令 brew install CLIProxy API 及設定檔路徑 .clyproxy API 中,大小寫與空格用法不一致(如 CLIProxy API vs clyproxy API)。
  • Opus 4.6 / Sonnet 4.6:逐字稿中提及的模型版本號碼(4.6)與目前常見公開版本編號可能不符,但根據規則保留原樣。
  • GPT-OSS 120B:逐字稿中提及此模型名稱,需查證是否為正確模型名稱或口誤。
  • Frontier Labs:逐字稿提及 "three different Frontier Labs models",需查證該模型是否屬於 Frontier Labs 或為口誤。
  • config.yaml / config.2ml:在 Codex CLI 設定部分,逐字稿提到 config.2ml 檔案,疑似為 config.yaml 的聽寫錯誤,但依規則標記為疑點。
  • wire API:在 Codex CLI 設定中提及 wire API set to responses,需查證是否為正確參數名稱(疑為 wirewrite 或其他參數)。
  • Dime:逐字稿提到 "running Opus 4.6 on Google's Dime","Dime" 疑似為 "Compute" 或其他詞彙的口誤或聽寫錯誤。
  • Rug-pulling:逐字稿使用 "rug-pulling" 形容 Claude Code 的限制政策,此為非標準用法,保留原樣。
  • Easy CLI:桌面 GUI 應用程式名稱,需查證是否為正確產品名稱。
  • Menu bar apps:提及社區應用程式為 "menu bar apps",需查證具體名稱。

可延伸追問

  1. CLIProxy API 專案的 GitHub 倉庫連結為何?
  2. Antigravity 的配額具體計算方式與重置時間點為何?
  3. 如何監控 CLIProxy API 的用量與配額剩餘情況?
  4. 除了 Claude Code 和 Codex CLI,還有哪些主流開發工具支援透過設定 Base URL 來使用本地代理?
  5. GPT-OSS 120B 模型在 CLIProxy API 中的具體表現與適用場景為何?
  6. 若 Antigravity 官方改變免費政策或配額限制,CLIProxy API 是否會隨之調整?

尚未產生學習筆記

請在 Telegram 指令最後加上「學習」,例如:videonote 網址 英文 雙語 學習