@kamel-ahmed/proxy-claude 1.0.5 → 1.0.6
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 +207 -44
- package/package.json +12 -7
- package/src/cli/accounts.js +1 -1
package/README.md
CHANGED
|
@@ -4,12 +4,9 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@kamel-ahmed/proxy-claude)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
<a href="https://buymeacoffee.com/badrinarayanans" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="50"></a>
|
|
8
7
|
|
|
9
8
|
A proxy server that exposes an **Anthropic-compatible API** backed by **Antigravity's Cloud Code**, letting you use Claude and Gemini models with **Claude Code CLI**.
|
|
10
9
|
|
|
11
|
-

|
|
12
|
-
|
|
13
10
|
## How It Works
|
|
14
11
|
|
|
15
12
|
```
|
|
@@ -28,65 +25,234 @@ A proxy server that exposes an **Anthropic-compatible API** backed by **Antigrav
|
|
|
28
25
|
|
|
29
26
|
## Prerequisites
|
|
30
27
|
|
|
31
|
-
- **Node.js** 18 or later
|
|
32
|
-
- **
|
|
28
|
+
- **Node.js** 18 or later (download from [nodejs.org](https://nodejs.org))
|
|
29
|
+
- **Claude Code CLI** (installed automatically by setup wizard)
|
|
30
|
+
- Google account(s) for authentication
|
|
33
31
|
|
|
34
32
|
---
|
|
35
33
|
|
|
36
34
|
## Installation
|
|
37
35
|
|
|
38
|
-
###
|
|
36
|
+
### Windows Installation
|
|
37
|
+
|
|
38
|
+
**Step 1: Install Node.js**
|
|
39
|
+
|
|
40
|
+
1. Download Node.js 18+ from [nodejs.org](https://nodejs.org)
|
|
41
|
+
2. Run the installer and follow the setup wizard
|
|
42
|
+
3. Restart your computer (or just close & reopen PowerShell)
|
|
43
|
+
4. Verify installation in PowerShell:
|
|
44
|
+
```powershell
|
|
45
|
+
node --version
|
|
46
|
+
npm --version
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Step 2: Install proxy-claude**
|
|
50
|
+
|
|
51
|
+
Open PowerShell or Command Prompt and run:
|
|
52
|
+
|
|
53
|
+
```powershell
|
|
54
|
+
npm install -g @kamel-ahmed/proxy-claude
|
|
55
|
+
proxy-claude init
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Step 3: Complete Setup Wizard**
|
|
59
|
+
|
|
60
|
+
The wizard will:
|
|
61
|
+
- ✅ Check Node.js and Claude Code CLI
|
|
62
|
+
- ✅ Add your Google account(s)
|
|
63
|
+
- ✅ Pick models for each tier
|
|
64
|
+
- ✅ Auto-configure settings
|
|
39
65
|
|
|
40
|
-
|
|
66
|
+
**Step 4: Start Using**
|
|
67
|
+
|
|
68
|
+
```powershell
|
|
69
|
+
proxy-claude
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
That's it! Claude Code will launch connected to the proxy.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### macOS/Linux Installation
|
|
77
|
+
|
|
78
|
+
**Step 1: Install Node.js** (if not already installed)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# macOS with Homebrew
|
|
82
|
+
brew install node
|
|
83
|
+
|
|
84
|
+
# Or download from https://nodejs.org
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Step 2: Install proxy-claude**
|
|
41
88
|
|
|
42
89
|
```bash
|
|
43
|
-
# Install globally (recommended)
|
|
44
90
|
npm install -g @kamel-ahmed/proxy-claude
|
|
45
|
-
proxy-claude
|
|
91
|
+
proxy-claude init
|
|
92
|
+
```
|
|
46
93
|
|
|
47
|
-
|
|
48
|
-
npx @kamel-ahmed/proxy-claude setup
|
|
94
|
+
**Step 3: Start Using**
|
|
49
95
|
|
|
50
|
-
|
|
51
|
-
|
|
96
|
+
```bash
|
|
97
|
+
proxy-claude
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### Quick Install (Recommended)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Install globally
|
|
106
|
+
npm install -g @kamel-ahmed/proxy-claude
|
|
107
|
+
|
|
108
|
+
# Run setup wizard
|
|
109
|
+
proxy-claude init
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The setup wizard will:
|
|
113
|
+
1. ✅ Check prerequisites (Node.js, Claude Code CLI)
|
|
114
|
+
2. ✅ Help you add Google account(s)
|
|
115
|
+
3. ✅ Let you pick models for each tier (Opus, Sonnet, Haiku)
|
|
116
|
+
4. ✅ Auto-configure `~/.claude/settings.json`
|
|
117
|
+
|
|
118
|
+
After setup, just run:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
proxy-claude
|
|
52
122
|
```
|
|
53
123
|
|
|
54
|
-
|
|
124
|
+
This will:
|
|
125
|
+
1. Start the proxy server in the background
|
|
126
|
+
2. Wait for the server to be ready
|
|
127
|
+
3. Launch Claude Code CLI connected to the proxy
|
|
128
|
+
4. Automatically shut down the proxy when you exit
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### Quick Install (All Platforms)
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Install globally
|
|
136
|
+
npm install -g @kamel-ahmed/proxy-claude
|
|
137
|
+
|
|
138
|
+
# Run setup wizard
|
|
139
|
+
proxy-claude init
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The setup wizard will:
|
|
143
|
+
1. ✅ Check prerequisites (Node.js, Claude Code CLI)
|
|
144
|
+
2. ✅ Help you add Google account(s)
|
|
145
|
+
3. ✅ Let you pick models for each tier (Opus, Sonnet, Haiku)
|
|
146
|
+
4. ✅ Auto-configure `~/.claude/settings.json`
|
|
147
|
+
|
|
148
|
+
After setup, just run:
|
|
55
149
|
|
|
56
150
|
```bash
|
|
57
151
|
proxy-claude
|
|
58
152
|
```
|
|
59
153
|
|
|
60
|
-
|
|
61
|
-
1. Start the proxy server in the background
|
|
62
|
-
2. Wait for the server to be ready
|
|
63
|
-
3. Launch
|
|
64
|
-
4. Automatically shut down the proxy when you exit
|
|
154
|
+
This will:
|
|
155
|
+
1. Start the proxy server in the background
|
|
156
|
+
2. Wait for the server to be ready
|
|
157
|
+
3. Launch Claude Code CLI connected to the proxy
|
|
158
|
+
4. Automatically shut down the proxy when you exit
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Troubleshooting
|
|
163
|
+
|
|
164
|
+
### Windows: "npm: The term 'npm' is not recognized"
|
|
165
|
+
|
|
166
|
+
**Solution:** Node.js wasn't installed correctly or PowerShell needs to be restarted.
|
|
167
|
+
|
|
168
|
+
1. Download and reinstall Node.js from [nodejs.org](https://nodejs.org)
|
|
169
|
+
2. Close PowerShell/Command Prompt completely
|
|
170
|
+
3. Reopen PowerShell as Administrator
|
|
171
|
+
4. Try again: `npm --version`
|
|
172
|
+
|
|
173
|
+
### Windows: "proxy-claude: The term 'proxy-claude' is not recognized"
|
|
174
|
+
|
|
175
|
+
**Solution:** npm install path isn't in your PATH environment variable.
|
|
176
|
+
|
|
177
|
+
```powershell
|
|
178
|
+
# Find where npm installed it
|
|
179
|
+
npm config get prefix
|
|
180
|
+
|
|
181
|
+
# Add to PATH (replace C:\Users\YourUsername\AppData\Roaming\npm if different):
|
|
182
|
+
$env:Path += ";C:\Users\$env:USERNAME\AppData\Roaming\npm"
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Then close and reopen PowerShell.
|
|
186
|
+
|
|
187
|
+
### Port Already in Use
|
|
65
188
|
|
|
66
|
-
|
|
189
|
+
If port 8080 is already in use, specify a different port:
|
|
67
190
|
|
|
68
191
|
```bash
|
|
69
|
-
# Use a custom port
|
|
70
192
|
PORT=3000 proxy-claude
|
|
193
|
+
# or
|
|
194
|
+
proxy-claude --port 3000
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### "Claude Code CLI not found" Error
|
|
71
198
|
|
|
72
|
-
|
|
73
|
-
|
|
199
|
+
The setup wizard will automatically install Claude Code CLI for you. If it fails:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
npm install -g @anthropic-ai/claude-code
|
|
74
203
|
```
|
|
75
204
|
|
|
76
|
-
|
|
205
|
+
### Settings Not Persisting
|
|
77
206
|
|
|
78
|
-
|
|
207
|
+
The wizard auto-configures `~/.claude/settings.json`. You can verify it was created:
|
|
208
|
+
|
|
209
|
+
**Windows:**
|
|
210
|
+
```powershell
|
|
211
|
+
notepad "$env:USERPROFILE\.claude\settings.json"
|
|
212
|
+
```
|
|
79
213
|
|
|
214
|
+
**macOS/Linux:**
|
|
80
215
|
```bash
|
|
81
|
-
|
|
82
|
-
|
|
216
|
+
cat ~/.claude/settings.json
|
|
217
|
+
```
|
|
83
218
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
### CLI Commands
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
proxy-claude # Start proxy + Claude Code (default)
|
|
225
|
+
proxy-claude init # Run setup wizard
|
|
226
|
+
proxy-claude start # Start proxy server only
|
|
227
|
+
proxy-claude stop # Stop proxy server
|
|
228
|
+
proxy-claude status # Check if proxy is running
|
|
229
|
+
proxy-claude accounts # Manage Google accounts
|
|
230
|
+
proxy-claude refresh # Refresh account tokens
|
|
231
|
+
proxy-claude --help # Show all commands
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Custom port:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
PORT=3000 proxy-claude
|
|
238
|
+
proxy-claude --port 3000
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Cross-Platform Support
|
|
242
|
+
|
|
243
|
+
Works on **Windows**, **macOS**, and **Linux** with full feature parity.
|
|
244
|
+
|
|
245
|
+
### Alternative: npx (No Install)
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
# Run directly without installing
|
|
249
|
+
npx @kamel-ahmed/proxy-claude
|
|
250
|
+
|
|
251
|
+
# Or just start the server
|
|
252
|
+
npx @kamel-ahmed/proxy-claude start
|
|
87
253
|
```
|
|
88
254
|
|
|
89
|
-
###
|
|
255
|
+
### Development: Clone Repository
|
|
90
256
|
|
|
91
257
|
```bash
|
|
92
258
|
git clone https://github.com/badri-s2001/antigravity-claude-proxy.git
|
|
@@ -99,22 +265,23 @@ npm start
|
|
|
99
265
|
|
|
100
266
|
## Quick Start
|
|
101
267
|
|
|
102
|
-
|
|
268
|
+
If you used `proxy-claude init`, you're already set up! Just run:
|
|
103
269
|
|
|
104
270
|
```bash
|
|
105
|
-
|
|
106
|
-
|
|
271
|
+
proxy-claude
|
|
272
|
+
```
|
|
107
273
|
|
|
108
|
-
|
|
109
|
-
npx @kamel-ahmed/proxy-claude start
|
|
274
|
+
### Manual Setup (Alternative)
|
|
110
275
|
|
|
111
|
-
|
|
112
|
-
|
|
276
|
+
#### 1. Start the Proxy Server
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
proxy-claude start
|
|
113
280
|
```
|
|
114
281
|
|
|
115
282
|
The server runs on `http://localhost:8080` by default.
|
|
116
283
|
|
|
117
|
-
|
|
284
|
+
#### 2. Link Account(s)
|
|
118
285
|
|
|
119
286
|
Choose one of the following methods to authorize the proxy:
|
|
120
287
|
|
|
@@ -616,8 +783,4 @@ This project is based on insights and code from:
|
|
|
616
783
|
|
|
617
784
|
MIT
|
|
618
785
|
|
|
619
|
-
---
|
|
620
|
-
|
|
621
|
-
## Star History
|
|
622
|
-
|
|
623
|
-
[](https://www.star-history.com/#badrisnarayanan/antigravity-claude-proxy&type=date&legend=top-left)
|
|
786
|
+
---
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kamel-ahmed/proxy-claude",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "Cross-platform CLI proxy for Antigravity Cloud Code. Use Claude & Gemini models with Claude Code CLI on Windows, macOS, and Linux.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -45,17 +45,22 @@
|
|
|
45
45
|
"anthropic",
|
|
46
46
|
"antigravity",
|
|
47
47
|
"proxy",
|
|
48
|
-
"
|
|
48
|
+
"gemini",
|
|
49
|
+
"claude-code",
|
|
50
|
+
"cross-platform",
|
|
51
|
+
"windows",
|
|
52
|
+
"macos",
|
|
53
|
+
"linux"
|
|
49
54
|
],
|
|
50
|
-
"author": "Kamel Ahmed",
|
|
55
|
+
"author": "Kamel Ahmed <kamel.ahmed.mostafa.kamel@gmail.com>",
|
|
51
56
|
"license": "MIT",
|
|
52
57
|
"repository": {
|
|
53
58
|
"type": "git",
|
|
54
|
-
"url": "git+https://github.com/
|
|
59
|
+
"url": "git+https://github.com/KamelAhmed01/antigravity-claude-proxy.git"
|
|
55
60
|
},
|
|
56
|
-
"homepage": "https://github.com/
|
|
61
|
+
"homepage": "https://github.com/KamelAhmed01/antigravity-claude-proxy#readme",
|
|
57
62
|
"bugs": {
|
|
58
|
-
"url": "https://github.com/
|
|
63
|
+
"url": "https://github.com/KamelAhmed01/antigravity-claude-proxy/issues"
|
|
59
64
|
},
|
|
60
65
|
"publishConfig": {
|
|
61
66
|
"access": "public"
|
package/src/cli/accounts.js
CHANGED