claudegate 1.0.0 → 1.0.1
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 +206 -50
- package/package.json +24 -15
package/README.md
CHANGED
|
@@ -1,38 +1,65 @@
|
|
|
1
1
|
# ClaudeGate
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>A gateway for Claude CLI that enables seamless switching between AI providers</strong>
|
|
5
|
+
</p>
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/claudegate"><img src="https://img.shields.io/npm/v/claudegate?style=flat-square&color=cb3837" alt="npm version"></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/claudegate"><img src="https://img.shields.io/npm/dt/claudegate?style=flat-square&color=cb3837" alt="npm downloads"></a>
|
|
10
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg?style=flat-square" alt="Node.js"></a>
|
|
11
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="License"></a>
|
|
12
|
+
<a href="https://github.com/Naresh084/claudegate/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Naresh084/claudegate/ci.yml?branch=main&style=flat-square" alt="CI"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://github.com/Naresh084/claudegate/stargazers"><img src="https://img.shields.io/github/stars/Naresh084/claudegate?style=social" alt="GitHub stars"></a>
|
|
17
|
+
<a href="https://github.com/Naresh084/claudegate/network/members"><img src="https://img.shields.io/github/forks/Naresh084/claudegate?style=social" alt="GitHub forks"></a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
**ClaudeGate** is a terminal utility that wraps Claude CLI, enabling you to switch between multiple AI providers (Anthropic, OpenRouter, DeepSeek, Z.AI, MiniMax, Kimi K2, and more) without modifying your Claude configuration. Select your provider, choose your models, and start coding.
|
|
8
23
|
|
|
9
24
|
## Why ClaudeGate?
|
|
10
25
|
|
|
11
|
-
Claude CLI is powerful, but switching between different AI providers
|
|
26
|
+
Claude CLI is powerful, but switching between different AI providers requires manually setting environment variables or editing config files. ClaudeGate solves this by providing:
|
|
12
27
|
|
|
13
|
-
- **One-click provider switching**
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
28
|
+
- **One-click provider switching** — Interactive menu to select your AI backend
|
|
29
|
+
- **Dynamic model selection** — Fetch and select models directly from provider APIs
|
|
30
|
+
- **Three-tier model mapping** — Configure Haiku, Sonnet, and Opus alternatives
|
|
31
|
+
- **Profile management** — Save multiple configurations for different use cases
|
|
32
|
+
- **Zero config pollution** — Never modifies your `~/.claude/settings.json`
|
|
33
|
+
- **Full CLI passthrough** — All Claude arguments work exactly as expected
|
|
17
34
|
|
|
18
35
|
## Supported Providers
|
|
19
36
|
|
|
20
|
-
| Provider | Description |
|
|
21
|
-
|
|
22
|
-
| **Anthropic
|
|
23
|
-
| **Z.AI
|
|
24
|
-
| **OpenRouter** | Access 320+ models through
|
|
25
|
-
| **Kimi K2
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
37
|
+
| Provider | Description | Live Model Fetching |
|
|
38
|
+
|----------|-------------|:-------------------:|
|
|
39
|
+
| **Anthropic** | Native Claude CLI configuration | — |
|
|
40
|
+
| **Z.AI** | Cost-effective GLM-4.6/4.7 models | ✓ |
|
|
41
|
+
| **OpenRouter** | Access 320+ models through single API | ✓ |
|
|
42
|
+
| **Kimi K2** | Up to 90% cost savings with Moonshot AI | ✓ |
|
|
43
|
+
| **MiniMax** | Agent-native M2/M2.1 models for coding | ✓ |
|
|
44
|
+
| **DeepSeek** | 128K context models with reasoning | ✓ |
|
|
45
|
+
| **Novita AI** | Novita AI provider support | ✓ |
|
|
46
|
+
| **Custom** | LiteLLM, HuggingFace TGI, any compatible endpoint | — |
|
|
28
47
|
|
|
29
|
-
##
|
|
48
|
+
## Get Started
|
|
49
|
+
|
|
50
|
+
### Prerequisites
|
|
51
|
+
|
|
52
|
+
- **Node.js** >= 18.0.0
|
|
53
|
+
- **[Claude CLI](https://docs.anthropic.com/en/docs/claude-code)** installed and configured
|
|
54
|
+
- API keys for your desired providers
|
|
55
|
+
|
|
56
|
+
### Installation
|
|
30
57
|
|
|
31
58
|
```bash
|
|
32
59
|
npm install -g claudegate
|
|
33
60
|
```
|
|
34
61
|
|
|
35
|
-
|
|
62
|
+
### Quick Start
|
|
36
63
|
|
|
37
64
|
```bash
|
|
38
65
|
# Launch ClaudeGate - shows profile selector, then starts Claude
|
|
@@ -58,34 +85,123 @@ cc -p "help me debug this"
|
|
|
58
85
|
❯ ● work-anthropic (Anthropic) [current]
|
|
59
86
|
zai-dev (Z.AI - GLM Models)
|
|
60
87
|
openrouter-gpt4 (OpenRouter)
|
|
61
|
-
|
|
88
|
+
deepseek-v3 (DeepSeek)
|
|
89
|
+
minimax-m2 (MiniMax)
|
|
62
90
|
─────────────────────────────────────
|
|
63
91
|
+ Add new profile
|
|
64
92
|
⚙ Manage profiles
|
|
65
93
|
```
|
|
66
94
|
|
|
67
|
-
1. **Select Profile**
|
|
68
|
-
2. **Launch Claude**
|
|
69
|
-
3. **Work normally**
|
|
95
|
+
1. **Select Profile** — Choose which AI provider to use
|
|
96
|
+
2. **Launch Claude** — Claude CLI starts with the correct environment
|
|
97
|
+
3. **Work normally** — All your usual Claude workflows just work
|
|
70
98
|
|
|
71
|
-
##
|
|
99
|
+
## Features
|
|
72
100
|
|
|
73
|
-
###
|
|
101
|
+
### Dynamic Model Selection
|
|
102
|
+
|
|
103
|
+
ClaudeGate fetches available models **live from provider APIs**. When creating or editing a profile, you can select models for each tier:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
? Select model for HAIKU (fast/cheap tasks):
|
|
107
|
+
○ Skip (use provider default)
|
|
108
|
+
○ deepseek-chat (Recommended)
|
|
109
|
+
○ deepseek-reasoner
|
|
110
|
+
○ Enter custom model ID...
|
|
111
|
+
|
|
112
|
+
? Select model for SONNET (balanced tasks):
|
|
113
|
+
○ Skip (use provider default)
|
|
114
|
+
○ deepseek-chat (Recommended)
|
|
115
|
+
○ deepseek-reasoner
|
|
116
|
+
○ Enter custom model ID...
|
|
117
|
+
|
|
118
|
+
? Select model for OPUS (complex reasoning):
|
|
119
|
+
○ Skip (use provider default)
|
|
120
|
+
○ deepseek-reasoner (Recommended)
|
|
121
|
+
○ deepseek-chat
|
|
122
|
+
○ Enter custom model ID...
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Three-tier model mapping:**
|
|
126
|
+
| Tier | Use Case |
|
|
127
|
+
|------|----------|
|
|
128
|
+
| **Haiku** | Fast/cheap tasks (quick edits, simple queries) |
|
|
129
|
+
| **Sonnet** | Balanced tasks (most common usage) |
|
|
130
|
+
| **Opus** | Complex reasoning (architecture, debugging) |
|
|
131
|
+
|
|
132
|
+
Models are saved with your profile—no need to reselect every time.
|
|
133
|
+
|
|
134
|
+
### Profile Management
|
|
135
|
+
|
|
136
|
+
#### Adding a Profile
|
|
74
137
|
|
|
75
138
|
Select **"+ Add new profile"** from the menu:
|
|
76
139
|
|
|
77
|
-
1. Choose a provider (
|
|
78
|
-
2. Enter a profile name (e.g.,
|
|
140
|
+
1. Choose a provider (Z.AI, OpenRouter, DeepSeek, MiniMax, etc.)
|
|
141
|
+
2. Enter a profile name (e.g., `work-deepseek`)
|
|
79
142
|
3. Enter required credentials (API keys, endpoints)
|
|
80
|
-
4.
|
|
143
|
+
4. Select models for Haiku, Sonnet, and Opus tiers
|
|
144
|
+
5. Profile is saved and ready to use
|
|
81
145
|
|
|
82
|
-
|
|
146
|
+
#### Managing Profiles
|
|
83
147
|
|
|
84
148
|
Select **"⚙ Manage profiles"** to:
|
|
85
149
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
150
|
+
| Action | Description |
|
|
151
|
+
|--------|-------------|
|
|
152
|
+
| **Edit** | Update profile name or credentials |
|
|
153
|
+
| **Change Models** | Select different models for each tier |
|
|
154
|
+
| **Delete** | Remove a profile |
|
|
155
|
+
| **Test** | Verify configuration and view current models |
|
|
156
|
+
|
|
157
|
+
## Provider Setup
|
|
158
|
+
|
|
159
|
+
<details>
|
|
160
|
+
<summary><strong>Z.AI (GLM Models)</strong></summary>
|
|
161
|
+
|
|
162
|
+
- **Models:** GLM-4.7, GLM-4.6, GLM-4.5-air
|
|
163
|
+
- **Endpoint:** `https://api.z.ai/api/anthropic`
|
|
164
|
+
- **Get API key:** [z.ai/manage-apikey](https://z.ai/manage-apikey)
|
|
165
|
+
|
|
166
|
+
</details>
|
|
167
|
+
|
|
168
|
+
<details>
|
|
169
|
+
<summary><strong>DeepSeek</strong></summary>
|
|
170
|
+
|
|
171
|
+
- **Models:** deepseek-chat (V3), deepseek-reasoner (thinking mode)
|
|
172
|
+
- **Endpoint:** `https://api.deepseek.com`
|
|
173
|
+
- **Get API key:** [platform.deepseek.com](https://platform.deepseek.com)
|
|
174
|
+
- 128K context window, extremely cost-effective
|
|
175
|
+
|
|
176
|
+
</details>
|
|
177
|
+
|
|
178
|
+
<details>
|
|
179
|
+
<summary><strong>MiniMax (M2 Models)</strong></summary>
|
|
180
|
+
|
|
181
|
+
- **Models:** MiniMax-M2.1 (230B), MiniMax-M2
|
|
182
|
+
- **Endpoint:** `https://api.minimax.io/anthropic`
|
|
183
|
+
- **Get API key:** [platform.minimax.io](https://platform.minimax.io)
|
|
184
|
+
- Optimized for coding and agentic workflows
|
|
185
|
+
|
|
186
|
+
</details>
|
|
187
|
+
|
|
188
|
+
<details>
|
|
189
|
+
<summary><strong>OpenRouter</strong></summary>
|
|
190
|
+
|
|
191
|
+
- Access 320+ models from multiple providers
|
|
192
|
+
- **Endpoint:** `https://openrouter.ai/api`
|
|
193
|
+
- **Get API key:** [openrouter.ai/keys](https://openrouter.ai/keys)
|
|
194
|
+
|
|
195
|
+
</details>
|
|
196
|
+
|
|
197
|
+
<details>
|
|
198
|
+
<summary><strong>Moonshot (Kimi K2)</strong></summary>
|
|
199
|
+
|
|
200
|
+
- **Models:** kimi-k2-0711-preview
|
|
201
|
+
- **Endpoint:** `https://api.moonshot.ai/anthropic`
|
|
202
|
+
- **Get API key:** [platform.moonshot.ai](https://platform.moonshot.ai)
|
|
203
|
+
|
|
204
|
+
</details>
|
|
89
205
|
|
|
90
206
|
## Configuration
|
|
91
207
|
|
|
@@ -98,28 +214,33 @@ Profiles are stored in `~/.claudegate/config.json`:
|
|
|
98
214
|
"profiles": [
|
|
99
215
|
{
|
|
100
216
|
"id": "abc-123",
|
|
101
|
-
"name": "
|
|
102
|
-
"providerId": "
|
|
103
|
-
"envVars": {}
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"id": "def-456",
|
|
107
|
-
"name": "zai-dev",
|
|
108
|
-
"providerId": "zai",
|
|
217
|
+
"name": "deepseek-dev",
|
|
218
|
+
"providerId": "deepseek",
|
|
109
219
|
"envVars": {
|
|
110
|
-
"ANTHROPIC_AUTH_TOKEN": "
|
|
111
|
-
"ANTHROPIC_BASE_URL": "https://api.
|
|
220
|
+
"ANTHROPIC_AUTH_TOKEN": "sk-xxx",
|
|
221
|
+
"ANTHROPIC_BASE_URL": "https://api.deepseek.com"
|
|
222
|
+
},
|
|
223
|
+
"selectedModels": {
|
|
224
|
+
"haiku": { "id": "deepseek-chat", "name": "DeepSeek Chat V3" },
|
|
225
|
+
"sonnet": { "id": "deepseek-chat", "name": "DeepSeek Chat V3" },
|
|
226
|
+
"opus": { "id": "deepseek-reasoner", "name": "DeepSeek Reasoner" }
|
|
112
227
|
}
|
|
113
228
|
}
|
|
114
229
|
]
|
|
115
230
|
}
|
|
116
231
|
```
|
|
117
232
|
|
|
118
|
-
|
|
233
|
+
### Environment Variables
|
|
119
234
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
235
|
+
ClaudeGate sets these environment variables based on your profile:
|
|
236
|
+
|
|
237
|
+
| Variable | Description |
|
|
238
|
+
|----------|-------------|
|
|
239
|
+
| `ANTHROPIC_BASE_URL` | Provider API endpoint |
|
|
240
|
+
| `ANTHROPIC_AUTH_TOKEN` | API authentication token |
|
|
241
|
+
| `ANTHROPIC_DEFAULT_HAIKU_MODEL` | Model for Haiku-tier requests |
|
|
242
|
+
| `ANTHROPIC_DEFAULT_SONNET_MODEL` | Model for Sonnet-tier requests |
|
|
243
|
+
| `ANTHROPIC_DEFAULT_OPUS_MODEL` | Model for Opus-tier requests |
|
|
123
244
|
|
|
124
245
|
## Security
|
|
125
246
|
|
|
@@ -129,25 +250,44 @@ Profiles are stored in `~/.claudegate/config.json`:
|
|
|
129
250
|
|
|
130
251
|
## Troubleshooting
|
|
131
252
|
|
|
132
|
-
|
|
253
|
+
<details>
|
|
254
|
+
<summary><strong>Claude CLI not found</strong></summary>
|
|
133
255
|
|
|
134
256
|
```bash
|
|
135
257
|
which claude # Should show Claude CLI path
|
|
136
258
|
```
|
|
137
259
|
|
|
138
|
-
If not found, install Claude CLI first.
|
|
260
|
+
If not found, install Claude CLI first: [docs.anthropic.com/en/docs/claude-code](https://docs.anthropic.com/en/docs/claude-code)
|
|
261
|
+
|
|
262
|
+
</details>
|
|
139
263
|
|
|
140
|
-
|
|
264
|
+
<details>
|
|
265
|
+
<summary><strong>Permission denied</strong></summary>
|
|
141
266
|
|
|
142
267
|
```bash
|
|
143
268
|
chmod 700 ~/.claudegate
|
|
144
269
|
chmod 600 ~/.claudegate/config.json
|
|
145
270
|
```
|
|
146
271
|
|
|
147
|
-
|
|
272
|
+
</details>
|
|
273
|
+
|
|
274
|
+
<details>
|
|
275
|
+
<summary><strong>Provider connection issues</strong></summary>
|
|
148
276
|
|
|
149
277
|
Use the **"Test"** option in profile management to verify credentials.
|
|
150
278
|
|
|
279
|
+
</details>
|
|
280
|
+
|
|
281
|
+
<details>
|
|
282
|
+
<summary><strong>Model fetch failed</strong></summary>
|
|
283
|
+
|
|
284
|
+
If live model fetching fails:
|
|
285
|
+
1. Check your API key is valid
|
|
286
|
+
2. Fallback models will be shown
|
|
287
|
+
3. You can always enter a custom model ID
|
|
288
|
+
|
|
289
|
+
</details>
|
|
290
|
+
|
|
151
291
|
## Uninstall
|
|
152
292
|
|
|
153
293
|
```bash
|
|
@@ -161,6 +301,22 @@ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for gui
|
|
|
161
301
|
|
|
162
302
|
This project uses [Conventional Commits](https://www.conventionalcommits.org/) for automatic versioning.
|
|
163
303
|
|
|
304
|
+
## Star History
|
|
305
|
+
|
|
306
|
+
<a href="https://star-history.com/#Naresh084/claudegate&Date">
|
|
307
|
+
<picture>
|
|
308
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Naresh084/claudegate&type=Date&theme=dark" />
|
|
309
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Naresh084/claudegate&type=Date" />
|
|
310
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Naresh084/claudegate&type=Date" />
|
|
311
|
+
</picture>
|
|
312
|
+
</a>
|
|
313
|
+
|
|
164
314
|
## License
|
|
165
315
|
|
|
166
316
|
[MIT](LICENSE)
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
<p align="center">
|
|
321
|
+
Made with Claude Code
|
|
322
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudegate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Terminal utility to switch between AI provider configurations for Claude CLI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
9
|
-
"claudegate": "
|
|
10
|
-
"cc": "
|
|
9
|
+
"claudegate": "bin/claudegate.js",
|
|
10
|
+
"cc": "bin/cc.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"configuration",
|
|
42
42
|
"multi-provider"
|
|
43
43
|
],
|
|
44
|
-
"author": "
|
|
44
|
+
"author": "Naresh Prajapati <prajapatinaresh084.pn@gmail.com>",
|
|
45
45
|
"repository": {
|
|
46
46
|
"type": "git",
|
|
47
47
|
"url": "git+https://github.com/Naresh084/claudegate.git"
|
|
@@ -88,22 +88,31 @@
|
|
|
88
88
|
"provenance": true
|
|
89
89
|
},
|
|
90
90
|
"release": {
|
|
91
|
-
"branches": [
|
|
91
|
+
"branches": [
|
|
92
|
+
"main",
|
|
93
|
+
"master"
|
|
94
|
+
],
|
|
92
95
|
"plugins": [
|
|
93
96
|
"@semantic-release/commit-analyzer",
|
|
94
97
|
"@semantic-release/release-notes-generator",
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
[
|
|
99
|
+
"@semantic-release/npm",
|
|
100
|
+
{
|
|
101
|
+
"provenance": true
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
[
|
|
105
|
+
"@semantic-release/github",
|
|
106
|
+
{
|
|
107
|
+
"assets": [],
|
|
108
|
+
"successComment": false
|
|
109
|
+
}
|
|
110
|
+
]
|
|
104
111
|
]
|
|
105
112
|
},
|
|
106
113
|
"commitlint": {
|
|
107
|
-
"extends": [
|
|
114
|
+
"extends": [
|
|
115
|
+
"@commitlint/config-conventional"
|
|
116
|
+
]
|
|
108
117
|
}
|
|
109
118
|
}
|