@yesdgq/claude-buddy 1.1.1005 → 1.1.1007

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 CHANGED
@@ -1,35 +1,54 @@
1
1
  # Claude Buddy
2
2
 
3
- > Claude Buddy 是一款简单易用的 CLI 工具,通过可视化方式快速配置 Claude Code、Codex 和 Gemini 等CLI的API密钥、模型映射等信息,可极大的方便和简化您对Claude Code等CLI的使用。
4
- >
3
+ [English](README.md) | [中文](README_zh.md)
5
4
 
6
- - **API 密钥管理**:轻松存储、切换和管理多组API 密钥
7
- - **模型映射**:便捷地自定义和管理模型配置
8
- - **一次安装永久使用**:本地部署,安装后可长久使用
9
- - **快速配置**:可视化界面,几秒钟即可完成设置
10
- - **开发者友好**:专为专注于编码的开发者打造
5
+
6
+
7
+ ## Overview
8
+
9
+ Claude Buddy is a simple and easy-to-use CLI tool that provides a visual way to quickly configure API keys, model mappings, and other settings for CLI tools like Claude Code, Codex, and Gemini. It greatly facilitates and simplifies your use of Claude Code and other CLIs.
10
+
11
+
12
+
13
+ ## Features
14
+
15
+ - **API Key Management**: Easily store, switch, and manage multiple API keys
16
+ - **Model Mapping**: Conveniently customize and manage model configurations
17
+ - **Install Once, Use Forever**: Local deployment, long-term use after installation
18
+ - **Quick Configuration**: Visual interface, complete setup in seconds
19
+ - **Developer-Friendly**: Built for developers focused on coding
20
+
21
+
22
+
23
+ ## Screenshot
11
24
 
12
25
 
13
26
  <center>
14
- <img src="https://i.postimg.cc/9FhKSBXh/Screen-Shot-2026-01-05-094110-369.png" alt="MIT License">
27
+ <img src="https://i.postimg.cc/kXV5DcLt/Screen-Shot-2026-01-22-094423-493.png" alt="Claude Buddy Interface">
15
28
  </center>
16
29
 
17
30
 
18
- ## 通过 npm 安装
31
+ ## Prerequisites
32
+
33
+ - Node.js >= 18.0.0
34
+
19
35
 
20
- ### 安装包
36
+
37
+ ## Installation
38
+
39
+ ### Install Package
21
40
  ```bash
22
41
  npm install -g @yesdgq/claude-buddy -f
23
42
  ```
24
43
 
25
- ### 更新包
44
+ ### Update Package
26
45
 
27
46
  ```bash
28
- npm update -g @yesdgq/claude-buddy
47
+ npm update -g @yesdgq/claude-buddy
29
48
  npm install -g @yesdgq/claude-buddy@latest
30
49
  ```
31
50
 
32
- ### 删除包
51
+ ### Uninstall Package
33
52
 
34
53
  ```bash
35
54
  npm uninstall -g @yesdgq/claude-buddy
@@ -37,12 +56,12 @@ npm uninstall -g @yesdgq/claude-buddy
37
56
 
38
57
 
39
58
 
40
- ## 配置
59
+ ## Configuration
41
60
 
42
61
 
43
- ### 可视化配置界面
62
+ ### Visual Configuration Interface
44
63
 
45
- 使用以下命令启动可视化配置管理界面:
64
+ Use the following command to launch the visual configuration management interface:
46
65
 
47
66
  ```bash
48
67
  ccby config
@@ -50,64 +69,65 @@ ccby config
50
69
 
51
70
 
52
71
 
53
- ## 使用方法
72
+ ## Available Commands
54
73
 
55
74
 
56
75
  ```bash
57
- # 打开配置页面,配置您的 API 地址和访问令牌(TOKEN)
76
+ # Open the configuration page to configure your API endpoint and access token
58
77
  ccby config
59
78
 
60
- # 启动claude code
61
- ccby claude
79
+ # Start claude code
80
+ ccby or claude
62
81
 
63
- # 查看历史会话
82
+ # View history sessions
64
83
  ccby -r
65
84
 
66
- # 继续上次会话
67
- ccby -c
85
+ # Resume last session
86
+ ccby -c
68
87
 
69
- # 查看Claude-Buddy版本
88
+ # View Claude-Buddy version
70
89
  ccby --version
71
90
 
72
- # 查看Claude版本
91
+ # View Claude version
73
92
  claude --version
74
93
 
75
94
  ```
76
- 其它更多方法,可参考 [claude code 使用文档](https://code.claude.com/docs/zh-CN/slash-commands)
77
-
95
+ For more usage methods, please refer to: [Claude Code Documentation](https://code.claude.com/docs/zh-CN/slash-commands)
78
96
 
97
+ > [!IMPORTANT]
98
+ > **Configuration Notice**: After switching or updating configurations, you need to restart Claude Code (CLI tool) for changes to take effect.
79
99
 
80
100
 
81
101
 
82
- ## 使用问题
102
+ ## Troubleshooting
83
103
 
84
- ### Claude Code首次使用问题
85
- 首次配置后使用claude code若仍提示登录,或有如下异常提示等:
104
+ ### First-time Claude Code Issues
105
+ If you are still prompted to log in when using Claude Code for the first time after configuration, or if you see the following error message:
86
106
  ```ruby
87
107
  Unable to connect to Anthropic services
88
108
  Failed to connect to api.anthropic.com: ERR_BAD_REQUEST
89
109
  Please check your internet connection and network settings.
90
110
  ```
91
111
 
92
- 可临时在终端设置环境变量运行一次:
112
+ You can temporarily set environment variables in the terminal and run once:
93
113
  ```bash
94
- # Mac OS使用如下命令:
114
+ # For Mac OS, use the following commands:
95
115
  export ANTHROPIC_BASE_URL=https://your-custom-api-endpoint.com
96
116
  export ANTHROPIC_AUTH_TOKEN=your_api_token
97
117
  claude
98
118
 
99
- #Windows使用如下命令:
119
+ # For Windows, use the following commands:
100
120
  set ANTHROPIC_BASE_URL=https://your-custom-api-endpoint.com
101
121
  set ANTHROPIC_AUTH_TOKEN=your_api_token
102
122
  claude
103
123
 
104
- 之后即可使用ccby config管理你的配置了。
124
+ After that, you can use ccby config to manage your configuration.
105
125
 
106
126
  ```
107
127
 
108
128
 
109
129
 
110
- ## 许可证
130
+ ## License
111
131
 
112
132
  MIT
113
133
 
package/README_zh.md ADDED
@@ -0,0 +1,132 @@
1
+
2
+ # Claude Buddy
3
+
4
+ [English](README.md) | [中文](README_zh.md)
5
+
6
+ ## 概述
7
+
8
+ Claude Buddy 是一款简单易用的 CLI 工具,通过可视化方式快速配置 Claude Code、Codex 和 Gemini 等CLI的API密钥、模型映射等信息,可极大的方便和简化您对Claude Code等CLI的使用。
9
+
10
+
11
+
12
+ ## 功能特性
13
+
14
+ - **API 密钥管理**:轻松存储、切换和管理多组API 密钥
15
+ - **模型映射**:便捷地自定义和管理模型配置
16
+ - **一次安装永久使用**:本地部署,安装后可长久使用
17
+ - **快速配置**:可视化界面,几秒钟即可完成设置
18
+ - **开发者友好**:专为专注于编码的开发者打造
19
+
20
+
21
+
22
+ ## 截图
23
+
24
+ <center>
25
+ <img src="https://i.postimg.cc/Xv6qRCHc/Screen-Shot-2026-01-22-094205-987.png" alt="MIT License">
26
+ </center>
27
+
28
+
29
+ ## 前提条件
30
+
31
+ - Node.js >= 18.0.0
32
+
33
+
34
+ ## 安装
35
+
36
+ ### 安装包
37
+ ```bash
38
+ npm install -g @yesdgq/claude-buddy -f
39
+ ```
40
+
41
+ ### 更新包
42
+
43
+ ```bash
44
+ npm update -g @yesdgq/claude-buddy
45
+ npm install -g @yesdgq/claude-buddy@latest
46
+ ```
47
+
48
+ ### 删除包
49
+
50
+ ```bash
51
+ npm uninstall -g @yesdgq/claude-buddy
52
+ ```
53
+
54
+
55
+
56
+ ## 配置
57
+
58
+
59
+ ### 可视化配置界面
60
+
61
+ 使用以下命令启动可视化配置管理界面:
62
+
63
+ ```bash
64
+ ccby config
65
+ ```
66
+
67
+
68
+
69
+ ## 可用命令
70
+
71
+
72
+ ```bash
73
+ # 打开配置页面,配置您的 API 地址和访问令牌(TOKEN)
74
+ ccby config
75
+
76
+ # 启动claude code
77
+ ccby 或 claude
78
+
79
+ # 查看历史会话
80
+ ccby -r
81
+
82
+ # 继续上次会话
83
+ ccby -c
84
+
85
+ # 查看Claude-Buddy版本
86
+ ccby --version
87
+
88
+ # 查看Claude版本
89
+ claude --version
90
+
91
+ ```
92
+ 其它更多方法,可参考 :[claude code 使用文档](https://code.claude.com/docs/zh-CN/slash-commands)
93
+
94
+ > [!IMPORTANT]
95
+ > **配置生效提示**:切换或更新配置后,需重启 Claude Code(CLI工具)方可生效。
96
+
97
+
98
+
99
+ ## 使用问题
100
+
101
+ ### Claude Code首次使用问题
102
+ 首次配置后使用claude code若仍提示登录,或有如下异常提示等:
103
+ ```ruby
104
+ Unable to connect to Anthropic services
105
+ Failed to connect to api.anthropic.com: ERR_BAD_REQUEST
106
+ Please check your internet connection and network settings.
107
+ ```
108
+
109
+ 可临时在终端设置环境变量运行一次:
110
+ ```bash
111
+ # Mac OS使用如下命令:
112
+ export ANTHROPIC_BASE_URL=https://your-custom-api-endpoint.com
113
+ export ANTHROPIC_AUTH_TOKEN=your_api_token
114
+ claude
115
+
116
+ #Windows使用如下命令:
117
+ set ANTHROPIC_BASE_URL=https://your-custom-api-endpoint.com
118
+ set ANTHROPIC_AUTH_TOKEN=your_api_token
119
+ claude
120
+
121
+ 之后即可使用ccby config管理你的配置了。
122
+
123
+ ```
124
+
125
+
126
+
127
+ ## 许可证
128
+
129
+ MIT
130
+
131
+
132
+
@@ -19,7 +19,19 @@
19
19
  <div id="app" v-cloak class="app-container">
20
20
  <div class="container">
21
21
  <div class="header-row">
22
- <h1 class="page-title">Claude Buddy</h1>
22
+ <div class="title-group">
23
+ <h1 class="page-title">Claude Buddy</h1>
24
+ <div class="lang-selector">
25
+ <button
26
+ v-for="lang in languages"
27
+ :key="lang.code"
28
+ :class="['lang-btn', { 'lang-btn-active': currentLang === lang.code }]"
29
+ @click="setLanguage(lang.code)"
30
+ >
31
+ {{ lang.label }}
32
+ </button>
33
+ </div>
34
+ </div>
23
35
  <div class="cli-selector">
24
36
  <button
25
37
  v-for="cli in cliList"
@@ -36,8 +48,8 @@
36
48
  <div class="card">
37
49
  <div class="card-header" @click="toggleHelp">
38
50
  <p class="title">
39
- <img src="images/shuoming.png" class="help-icon" alt="使用说明">
40
- 使用说明
51
+ <img src="images/shuoming.png" class="help-icon" :alt="t.helpTitle">
52
+ {{ t.helpTitle }}
41
53
  </p>
42
54
  <i :class="showHelp ? 'fa fa-chevron-up' : 'fa fa-chevron-down'" class="chevron"></i>
43
55
  </div>
@@ -45,61 +57,61 @@
45
57
  <transition name="fade">
46
58
  <div v-if="showHelp" class="help-content">
47
59
  <div>
48
- <p style="line-height: 1.5; margin-bottom: 0.5rem;">Claude Buddy 是一款简单易用的 CLI 工具,通过可视化方式快速配置 Claude Code、Codex 和 Gemini 等CLI的API密钥、模型映射等信息,可极大的方便和简化您对Claude Code等CLI的使用。</p>
60
+ <p style="line-height: 1.5; margin-bottom: 0.5rem;">{{ t.helpDescription }}</p>
49
61
  </div>
50
62
  <div class="info-section">
51
63
  <ul style="padding-left: 0; list-style: none; margin-bottom: 1rem; margin-top: 1.5rem;">
52
64
  <li style="margin-bottom: 0.5rem;">
53
- <strong>API 密钥管理</strong>:轻松存储、切换和管理多组API 密钥
65
+ <strong>{{ t.feature1Title }}</strong>:{{ t.feature1Desc }}
54
66
  </li>
55
67
  <li style="margin-bottom: 0.5rem;">
56
- <strong>模型映射</strong>:便捷地自定义和管理模型配置
68
+ <strong>{{ t.feature2Title }}</strong>:{{ t.feature2Desc }}
57
69
  </li>
58
70
  <li style="margin-bottom: 0.5rem;">
59
- <strong>一次安装永久使用</strong>:本地部署,安装后可长久使用
71
+ <strong>{{ t.feature3Title }}</strong>:{{ t.feature3Desc }}
60
72
  </li>
61
73
  <li style="margin-bottom: 0.5rem;">
62
- <strong>快速配置</strong>:可视化界面,几秒钟即可完成设置
74
+ <strong>{{ t.feature4Title }}</strong>:{{ t.feature4Desc }}
63
75
  </li>
64
76
  <li style="margin-bottom: 0.5rem;">
65
- <strong>开发者友好</strong>:专为专注于编码的开发者打造
77
+ <strong>{{ t.feature5Title }}</strong>:{{ t.feature5Desc }}
66
78
  </li>
67
79
  </ul>
68
80
 
69
81
  <h3 style="margin-top: 1.5rem;">
70
82
  <i class="fa fa-book text-blue-500"></i>
71
- 命令使用
83
+ {{ t.commandUsageTitle }}
72
84
  </h3>
73
85
  <ul style="padding-left: 1rem;">
74
86
  <li>
75
87
  <i class="fa fa-chevron-right"></i>
76
- <code>ccby config</code> 打开配置页面,配置您的 API 地址和访问令牌(TOKEN)
88
+ <code>ccby config</code> {{ t.command1 }}
77
89
  </li>
78
90
  <li>
79
91
  <i class="fa fa-chevron-right"></i>
80
- <code>ccby</code> 或 <code>claude</code> 启动claude code
92
+ <code>ccby</code> 或 <code>claude</code> {{ t.command2 }}
81
93
  </li>
82
94
  <li>
83
95
  <i class="fa fa-chevron-right"></i>
84
- <code>ccby -r</code> 查看历史会话
96
+ <code>ccby -r</code> {{ t.command3 }}
85
97
  </li>
86
98
  <li>
87
99
  <i class="fa fa-chevron-right"></i>
88
- <code>ccby -c</code> 继续上次会话
100
+ <code>ccby -c</code> {{ t.command4 }}
89
101
  </li>
90
102
  <li>
91
103
  <i class="fa fa-chevron-right"></i>
92
- <code>ccby --version</code> 查看Claude-Buddy版本
104
+ <code>ccby --version</code> {{ t.command5 }}
93
105
  </li>
94
106
  <li>
95
107
  <i class="fa fa-chevron-right"></i>
96
- <code>claude --version</code> 查看Claude版本
108
+ <code>claude --version</code> {{ t.command6 }}
97
109
  </li>
98
110
  </ul>
99
111
 
100
112
  <div style="margin-top: 1.5rem; padding: 0.75rem; background-color: #e5e7eb; border-radius: 5px; color: #ef4444;">
101
113
  <i class="fa fa-exclamation-triangle"></i>
102
- 切换或更新配置后,需重启 Claude Code(CLI工具)方可生效。
114
+ {{ t.restartNotice }}
103
115
  </div>
104
116
  </div>
105
117
  </div>
@@ -109,7 +121,7 @@
109
121
  <!-- 加载状态 -->
110
122
  <div v-if="loading" class="loading-container">
111
123
  <i class="fa fa-spinner fa-spin"></i>
112
- <p>加载中...</p>
124
+ <p>{{ t.loading }}</p>
113
125
  </div>
114
126
 
115
127
 
@@ -137,7 +149,7 @@
137
149
  @input="adjustInputWidth($event, index)"
138
150
  :ref="'nameInput' + index"
139
151
  >
140
- <span v-if="index === config.activeIndex" class="current-use-label">当前使用</span>
152
+ <span v-if="index === config.activeIndex" class="current-use-label">{{ t.currentUse }}</span>
141
153
  </div>
142
154
  <div class="actions">
143
155
  <!-- 启用按钮 (非当前使用的配置显示) -->
@@ -146,17 +158,17 @@
146
158
  @click="setAsActive(index)"
147
159
  :disabled="config.AUTH.length === 1 && isEmptyConfig(auth)"
148
160
  class="btn-activate"
149
- :title="(config.AUTH.length === 1 && isEmptyConfig(auth)) ? '空配置不能启用' : '启用此配置'"
161
+ :title="(config.AUTH.length === 1 && isEmptyConfig(auth)) ? t.emptyConfigCannotActivate : t.activateThisConfig"
150
162
  >
151
163
  <img src="images/play.png" class="btn-icon" alt="">
152
- <span>启用</span>
164
+ <span>{{ t.activate }}</span>
153
165
  </button>
154
166
  <!-- 删除按钮 -->
155
167
  <button
156
168
  @click="deleteAuth(index)"
157
169
  :disabled="config.AUTH.length === 1 && isEmptyConfig(auth)"
158
170
  class="btn-delete"
159
- :title="(config.AUTH.length === 1 && isEmptyConfig(auth)) ? '空配置不能删除' : '删除此配置'"
171
+ :title="(config.AUTH.length === 1 && isEmptyConfig(auth)) ? t.emptyConfigCannotDelete : t.deleteThisConfig"
160
172
  >
161
173
  <i class="fa fa-trash"></i>
162
174
  </button>
@@ -206,14 +218,14 @@
206
218
  <div class="models-header">
207
219
  <label>
208
220
  <i class="fa fa-cogs"></i>
209
- 模型管理
221
+ {{ t.modelManagement }}
210
222
  </label>
211
223
  <button
212
224
  @click="toggleModelSection(index)"
213
225
  type="button"
214
226
  >
215
227
  <i :class="showModelSections[index] ? 'fa fa-chevron-up' : 'fa fa-chevron-down'"></i>
216
- {{ showModelSections[index] ? '收起' : '展开' }}
228
+ {{ showModelSections[index] ? t.collapse : t.expand }}
217
229
  </button>
218
230
  </div>
219
231
 
@@ -222,17 +234,17 @@
222
234
  <input
223
235
  v-model="model.key"
224
236
  type="text"
225
- placeholder="模型名称"
237
+ :placeholder="t.modelNamePlaceholder"
226
238
  >
227
239
  <span class="separator">=</span>
228
240
  <input
229
241
  v-model="model.value"
230
242
  type="text"
231
- placeholder="模型值"
243
+ :placeholder="t.modelValuePlaceholder"
232
244
  >
233
245
  <button
234
246
  @click="deleteModel(index, modelIndex)"
235
- title="删除此模型"
247
+ :title="t.deleteThisModel"
236
248
  >
237
249
  <i class="fa fa-times"></i>
238
250
  </button>
@@ -243,7 +255,7 @@
243
255
  class="btn-add-model"
244
256
  >
245
257
  <i class="fa fa-plus"></i>
246
- 添加模型
258
+ {{ t.addModel }}
247
259
  </button>
248
260
  </div>
249
261
  </div>
@@ -253,14 +265,14 @@
253
265
  <div class="env-header">
254
266
  <label>
255
267
  <i class="fa fa-cogs"></i>
256
- 环境变量
268
+ {{ t.envVariables }}
257
269
  </label>
258
270
  <button
259
271
  @click="toggleEnvSection(index)"
260
272
  type="button"
261
273
  >
262
274
  <i :class="showEnvSections[index] ? 'fa fa-chevron-up' : 'fa fa-chevron-down'"></i>
263
- {{ showEnvSections[index] ? '收起' : '展开' }}
275
+ {{ showEnvSections[index] ? t.collapse : t.expand }}
264
276
  </button>
265
277
  </div>
266
278
 
@@ -269,17 +281,17 @@
269
281
  <input
270
282
  v-model="env.key"
271
283
  type="text"
272
- placeholder="变量名"
284
+ :placeholder="t.variableNamePlaceholder"
273
285
  >
274
286
  <span class="separator">=</span>
275
287
  <input
276
288
  v-model="env.value"
277
289
  type="text"
278
- placeholder="变量值"
290
+ :placeholder="t.variableValuePlaceholder"
279
291
  >
280
292
  <button
281
293
  @click="deleteEnv(index, envIndex)"
282
- title="删除此环境变量"
294
+ :title="t.deleteThisEnvVar"
283
295
  >
284
296
  <i class="fa fa-times"></i>
285
297
  </button>
@@ -290,7 +302,7 @@
290
302
  class="btn-add-env"
291
303
  >
292
304
  <i class="fa fa-plus"></i>
293
- 添加环境变量
305
+ {{ t.addEnvVariable }}
294
306
  </button>
295
307
  </div>
296
308
  </div>
@@ -303,7 +315,7 @@
303
315
  class="btn btn-primary"
304
316
  >
305
317
  <i class="fa fa-plus-circle"></i>
306
- 添加新配置
318
+ {{ t.addNewConfig }}
307
319
  </button>
308
320
 
309
321
  <!-- 保存按钮 -->
@@ -314,7 +326,7 @@
314
326
  class="btn btn-success"
315
327
  >
316
328
  <i :class="saving ? 'fa fa-spinner fa-spin' : 'fa fa-save'"></i>
317
- {{ saving ? '保存中...' : '保存配置' }}
329
+ {{ saving ? t.saving : t.saveConfig }}
318
330
  </button>
319
331
 
320
332
  <button
@@ -322,7 +334,7 @@
322
334
  class="btn btn-gray"
323
335
  >
324
336
  <i class="fa fa-refresh"></i>
325
- 重新加载
337
+ {{ t.reload }}
326
338
  </button>
327
339
  </div>
328
340
  </div>
@@ -330,6 +342,19 @@
330
342
 
331
343
  <!-- Toast 容器 -->
332
344
  <div id="toast-container"></div>
345
+
346
+ <!-- 自定义确认对话框 -->
347
+ <div v-if="confirmDialog.show" class="confirm-dialog-overlay" @click="confirmDialog.onCancel">
348
+ <div class="confirm-dialog" @click.stop>
349
+ <div class="confirm-dialog-content">
350
+ <p>{{ confirmDialog.message }}</p>
351
+ </div>
352
+ <div class="confirm-dialog-actions">
353
+ <button @click="confirmDialog.onCancel" class="btn-cancel">{{ t.cancel }}</button>
354
+ <button @click="confirmDialog.onConfirm" class="btn-confirm">{{ t.confirm }}</button>
355
+ </div>
356
+ </div>
357
+ </div>
333
358
  </div>
334
359
 
335
360
  <script src="config.js"></script>