free-antigravity-cli 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cli.js +2 -2
- package/dist/proxy.js +1 -1
- package/package.json +1 -1
- package/src/cli.ts +2 -2
- package/src/proxy.ts +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Use **OpenAI, Anthropic, Ollama, OpenRouter, Google AI Studio, and any OpenAI-co
|
|
|
31
31
|
|
|
32
32
|
```
|
|
33
33
|
antigravity
|
|
34
|
-
├── Starts local proxy (port
|
|
34
|
+
├── Starts local proxy (port 50998)
|
|
35
35
|
├── Auto-patches agy.exe to route through proxy
|
|
36
36
|
└── Delegates to agy CLI
|
|
37
37
|
├── Google models → daily-cloudcode-pa.googleapis.com (transparent)
|
|
@@ -183,7 +183,7 @@ On first run, the CLI automatically patches `agy` to replace the hardcoded Googl
|
|
|
183
183
|
|
|
184
184
|
```
|
|
185
185
|
https://daily-cloudcode-pa.googleapis.com
|
|
186
|
-
→ http://localhost:
|
|
186
|
+
→ http://localhost:50998/v1internal/xxxxxxx
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
This forces `agy` to route its `fetchAvailableModels` calls through the local proxy, where custom model definitions are injected.
|
|
@@ -195,7 +195,7 @@ On macOS, patching the binary invalidates its code signature. The CLI automatica
|
|
|
195
195
|
|
|
196
196
|
### Proxy Server
|
|
197
197
|
|
|
198
|
-
The proxy runs on `http://127.0.0.1:
|
|
198
|
+
The proxy runs on `http://127.0.0.1:50998` and:
|
|
199
199
|
|
|
200
200
|
1. **Intercepts `fetchAvailableModels`**: Merges custom model definitions into the response
|
|
201
201
|
2. **Intercepts `generateContent`/`streamGenerateContent`**: Routes custom model requests to external APIs
|
package/dist/cli.js
CHANGED
|
@@ -92,7 +92,7 @@ async function ensureProxy() {
|
|
|
92
92
|
return await (0, proxy_1.startProxy)();
|
|
93
93
|
}
|
|
94
94
|
catch {
|
|
95
|
-
return (0, proxy_1.getProxyPort)() ||
|
|
95
|
+
return (0, proxy_1.getProxyPort)() || 50998;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
function getVersion() {
|
|
@@ -112,7 +112,7 @@ function ensureAgyPatched(binPath) {
|
|
|
112
112
|
try {
|
|
113
113
|
const buf = fs.readFileSync(binPath);
|
|
114
114
|
const original = Buffer.from('https://daily-cloudcode-pa.googleapis.com');
|
|
115
|
-
const replacement = Buffer.from('http://localhost:
|
|
115
|
+
const replacement = Buffer.from('http://localhost:50998/v1internal/xxxxxxx');
|
|
116
116
|
if (buf.includes(replacement))
|
|
117
117
|
return;
|
|
118
118
|
const idx = buf.indexOf(original);
|
package/dist/proxy.js
CHANGED
|
@@ -539,7 +539,7 @@ function handleRequest(req, res) {
|
|
|
539
539
|
});
|
|
540
540
|
}
|
|
541
541
|
// --- Server Start/Stop ---
|
|
542
|
-
function startProxy(port =
|
|
542
|
+
function startProxy(port = 50998) {
|
|
543
543
|
return new Promise((resolve, reject) => {
|
|
544
544
|
server = http.createServer(handleRequest);
|
|
545
545
|
server.listen(port, '127.0.0.1', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "free-antigravity-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Open-source community CLI for Antigravity - supports custom AI models (OpenAI, Anthropic, Ollama, OpenRouter, Google AI Studio) alongside Gemini",
|
|
5
5
|
"homepage": "https://github.com/vahapogut/free-antigravity-cli",
|
|
6
6
|
"author": {
|
package/src/cli.ts
CHANGED
|
@@ -57,7 +57,7 @@ function getAgyBin(): string {
|
|
|
57
57
|
|
|
58
58
|
async function ensureProxy(): Promise<number> {
|
|
59
59
|
try { return await startProxy(); }
|
|
60
|
-
catch { return getProxyPort() ||
|
|
60
|
+
catch { return getProxyPort() || 50998; }
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function getVersion(): string {
|
|
@@ -76,7 +76,7 @@ function ensureAgyPatched(binPath: string): void {
|
|
|
76
76
|
try {
|
|
77
77
|
const buf = fs.readFileSync(binPath);
|
|
78
78
|
const original = Buffer.from('https://daily-cloudcode-pa.googleapis.com');
|
|
79
|
-
const replacement = Buffer.from('http://localhost:
|
|
79
|
+
const replacement = Buffer.from('http://localhost:50998/v1internal/xxxxxxx');
|
|
80
80
|
if (buf.includes(replacement)) return;
|
|
81
81
|
const idx = buf.indexOf(original);
|
|
82
82
|
if (idx === -1) return;
|
package/src/proxy.ts
CHANGED
|
@@ -542,7 +542,7 @@ function handleRequest(req: http.IncomingMessage, res: http.ServerResponse): voi
|
|
|
542
542
|
|
|
543
543
|
// --- Server Start/Stop ---
|
|
544
544
|
|
|
545
|
-
export function startProxy(port =
|
|
545
|
+
export function startProxy(port = 50998): Promise<number> {
|
|
546
546
|
return new Promise((resolve, reject) => {
|
|
547
547
|
server = http.createServer(handleRequest);
|
|
548
548
|
server.listen(port, '127.0.0.1', () => {
|