ai-account-switch 1.7.0 → 1.8.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 CHANGED
@@ -1,227 +1,281 @@
1
1
  # AI Account Switch (ais)
2
2
 
3
- [简体中文](README_ZH.md) | English
4
-
5
- A cross-platform CLI tool to manage and switch between Claude/Codex/Droids account configurations for different projects.
6
-
7
- ## Features
8
-
9
- - **Cross-Platform**: Works seamlessly on macOS, Linux, and Windows
10
- - **Multiple Accounts**: Store and manage multiple AI service accounts
11
- - **Project-Specific**: Each project can use a different account
12
- - **Smart Directory Detection**: Works in any subdirectory of your project (like git)
13
- - **Claude Code Integration**: Automatically generates `.claude/settings.local.json` for Claude Code CLI
14
- - **Secure Storage**: Account credentials stored locally in your home directory
15
- - **Interactive CLI**: Easy-to-use interactive prompts for all operations
16
- - **Account Types**: Support for Claude, Codex, CCR (Claude Code Router), Droids, and other AI services
17
- - **Web UI**: Modern web interface with account status checking and management
18
- - **MCP Web UI Management**: Complete MCP (Model Context Protocol) server management through Web UI
19
- - Add, edit, delete MCP servers with intuitive interface
20
- - Support for stdio, sse, and http server types
21
- - Test MCP server connections
22
- - Enable/disable servers per project
23
- - Search and filter functionality
24
- - Full internationalization (Chinese/English)
25
-
26
- ## Installation
27
-
28
- ### npm Installation (Recommended)
3
+ 简体中文 | [English](README_EN.md)
4
+
5
+ 一个跨平台的命令行工具,用于管理和切换不同项目的 Claude/Codex/Droids 账户配置。
6
+
7
+ ## 特性
8
+
9
+ - **跨平台支持**:在 macOSLinux Windows 上无缝运行
10
+ - **多账户管理**:存储和管理多个 AI 服务账户
11
+ - **项目级配置**:每个项目可以使用不同的账户
12
+ - **智能目录检测**:在项目的任何子目录中都能工作(类似 git
13
+ - **Claude Code 集成**:自动生成 `.claude/settings.local.json` 配置文件
14
+ - **Web UI 管理界面**:
15
+ - 🎨 现代化单页面应用,支持深色/浅色主题
16
+ - 🌍 中英文双语支持,一键切换
17
+ - ⚙️ 可视化管理账号:增删改查一目了然
18
+ - 📤 导入/导出功能:批量管理账号配置
19
+ - 🔍 实时搜索过滤账号
20
+ - 💾 自定义环境变量配置
21
+ - 🎯 主题自动跟随系统设置
22
+ - **MCP Web UI 管理**:完整的 MCP (Model Context Protocol) 服务器管理
23
+ - 🖥️ 直观的界面添加、编辑、删除 MCP 服务器
24
+ - 🔌 支持 stdio、sse、http 三种服务器类型
25
+ - 🧪 测试 MCP 服务器连接
26
+ - ⚡ 一键启用/禁用项目级服务器
27
+ - 🔍 搜索和筛选功能
28
+ - 🌐 完整的中英文支持
29
+ - **安全存储**:账户凭证仅存储在本地
30
+ - **交互式命令行**:所有操作都有易用的交互式提示
31
+ - **多种账户类型**:支持 Claude、Codex、CCR (Claude Code Router)、Droids 和其他 AI 服务
32
+
33
+ ## 安装
34
+
35
+ ### npm 安装(推荐)
29
36
 
30
37
  ```bash
31
38
  npm install -g ai-account-switch
32
39
  ```
33
40
 
34
- After installation, the `ais` command will be available globally.
41
+ 安装后,`ais` 命令将在全局可用。
35
42
 
36
- **Troubleshooting**: If you encounter "command not found" after installation:
43
+ **故障排除**:如果安装后提示"命令未找到"
37
44
 
38
45
  ```bash
39
- # Check npm global bin path
46
+ # 查看 npm 全局 bin 路径
40
47
  npm config get prefix
41
48
 
42
- # Add to PATH (Linux/macOS)
49
+ # 添加到 PATH (Linux/macOS)
43
50
  export PATH="$PATH:$(npm config get prefix)/bin"
44
51
 
45
- # On Windows, add to system PATH: %APPDATA%\npm
52
+ # Windows 上,添加到系统 PATH:%APPDATA%\npm
46
53
  ```
47
54
 
48
- ### Install from Source
55
+ ### 从源码安装
49
56
 
50
57
  ```bash
51
- # Clone the repository
58
+ # 克隆仓库
52
59
  git clone https://github.com/yourusername/ai-agent-user-swith.git
53
60
  cd ai-agent-user-swith
54
61
 
55
- # Install dependencies
62
+ # 安装依赖
56
63
  npm install
57
64
 
58
- # Link the CLI tool globally
65
+ # 全局链接 CLI 工具
59
66
  npm link
60
67
  ```
61
68
 
62
- ## Usage
63
-
64
- ### Commands Overview
65
-
66
- | Command | Alias | Description |
67
- |---------|-------|-------------|
68
- | `ais add [name]` | - | Add a new account configuration |
69
- | `ais list` | `ls` | List all available accounts |
70
- | `ais use [name]` | - | Set account for current project |
71
- | `ais info` | - | Show current project's account info |
72
- | `ais current` | - | Show current account name |
73
- | `ais remove [name]` | `rm` | Remove an account |
74
- | `ais model list` | `ls` | List all model groups for current account |
75
- | `ais model add [name]` | - | Add a new model group |
76
- | `ais model use <name>` | - | Switch to a different model group |
77
- | `ais model remove [name]` | `rm` | Remove a model group |
78
- | `ais model show [name]` | - | Show model group configuration |
79
- | `ais mcp add [name]` | - | Add a new MCP server |
80
- | `ais mcp list` | `ls` | List all MCP servers |
81
- | `ais mcp show [name]` | - | Show MCP server details |
82
- | `ais mcp update [name]` | - | Update MCP server configuration |
83
- | `ais mcp remove [name]` | `rm` | Remove an MCP server |
84
- | `ais mcp enable [name]` | - | Enable MCP server for current project |
85
- | `ais mcp disable [name]` | - | Disable MCP server for current project |
86
- | `ais mcp enabled` | - | Show enabled MCP servers |
87
- | `ais mcp sync` | - | Sync MCP configuration to Claude Code |
88
- | `ais ui` | - | Start web-based UI manager |
89
- | `ais paths` | - | Show configuration file paths |
90
- | `ais doctor` | - | Diagnose configuration issues |
91
- | `ais export <name>` | - | Export account as JSON |
92
- | `ais help` | - | Display help information |
93
- | `ais --version` | - | Show version number |
94
-
95
- ### Quick Start
96
-
97
- #### 1. Add an Account
98
-
99
- Add your first account interactively:
69
+ ## 使用方法
70
+
71
+ ### 命令概览
72
+
73
+ | 命令 | 别名 | 描述 |
74
+ |------|------|------|
75
+ | `ais add [name]` | - | 添加新的账户配置 |
76
+ | `ais list` | `ls` | 列出所有可用账户 |
77
+ | `ais use [name]` | - | 为当前项目设置账户 |
78
+ | `ais info` | - | 显示当前项目的账户信息 |
79
+ | `ais current` | - | 显示当前账户名称 |
80
+ | `ais remove [name]` | `rm` | 删除账户 |
81
+ | `ais model list` | `ls` | 列出当前账户的所有模型组 |
82
+ | `ais model add [name]` | - | 添加新的模型组 |
83
+ | `ais model use <name>` | - | 切换到不同的模型组 |
84
+ | `ais model remove [name]` | `rm` | 删除模型组 |
85
+ | `ais model show [name]` | - | 显示模型组配置 |
86
+ | `ais mcp add [name]` | - | 添加新的 MCP 服务器 |
87
+ | `ais mcp list` | `ls` | 列出所有 MCP 服务器 |
88
+ | `ais mcp show [name]` | - | 显示 MCP 服务器详情 |
89
+ | `ais mcp update [name]` | - | 更新 MCP 服务器配置 |
90
+ | `ais mcp remove [name]` | `rm` | 删除 MCP 服务器 |
91
+ | `ais mcp enable [name]` | - | 为当前项目启用 MCP 服务器 |
92
+ | `ais mcp disable [name]` | - | 为当前项目禁用 MCP 服务器 |
93
+ | `ais mcp enabled` | - | 显示已启用的 MCP 服务器 |
94
+ | `ais mcp sync` | - | 同步 MCP 配置到 Claude Code |
95
+ | `ais ui` | - | 启动 Web UI 管理界面 |
96
+ | `ais paths` | - | 显示配置文件路径 |
97
+ | `ais doctor` | - | 诊断 Claude Code 配置问题 |
98
+ | `ais export <name>` | - | 导出账户为 JSON 格式 |
99
+ | `ais help` | - | 显示帮助信息 |
100
+ | `ais --version` | - | 显示版本号 |
101
+
102
+ ### 快速开始
103
+
104
+ #### 1. 添加账户
105
+
106
+ 交互式添加第一个账户:
100
107
 
101
108
  ```bash
102
109
  ais add
103
110
  ```
104
111
 
105
- Or specify a name directly:
112
+ 或直接指定名称:
106
113
 
107
114
  ```bash
108
115
  ais add my-claude-account
109
116
  ```
110
117
 
111
- You'll be prompted to enter:
112
- - Account type (Claude, Codex, CCR, Droids, Other)
118
+ 系统将提示你输入:
119
+ - 账户类型(ClaudeCodexCCRDroids、其他)
113
120
  - API Key
114
- - API URL (optional)
115
- - Organization ID (optional)
116
- - Email (optional)
117
- - Description (optional)
118
- - Custom environment variables (optional)
119
- - Enter in `KEY=VALUE` format (e.g., `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
120
- - The tool will display all added variables before completion
121
- - Press Enter without input to finish adding variables
121
+ - API URL(可选)
122
+ - Email(可选)
123
+ - 描述(可选)
124
+ - 自定义环境变量(可选)
125
+ - 使用 `KEY=VALUE` 格式输入(例如:`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
126
+ - 工具会在完成前显示所有已添加的变量
127
+ - 直接按回车(不输入)即可完成添加
122
128
 
123
- #### 2. List All Accounts
129
+ #### 2. 列出所有账户
124
130
 
125
- View all your configured accounts:
131
+ 查看所有已配置的账户:
126
132
 
127
133
  ```bash
128
134
  ais list
129
- # or
135
+ #
130
136
  ais ls
131
137
  ```
132
138
 
133
- The active account for the current project will be marked with a green dot.
139
+ 当前项目激活的账户将用绿色圆点标记。
134
140
 
135
- #### 3. Switch Account for Current Project
141
+ #### 3. 为当前项目切换账户
136
142
 
137
- Set which account to use in your current project:
143
+ 设置当前项目使用的账户:
138
144
 
139
145
  ```bash
140
146
  ais use my-claude-account
141
147
  ```
142
148
 
143
- Or select interactively:
149
+ 或交互式选择:
144
150
 
145
151
  ```bash
146
152
  ais use
147
153
  ```
148
154
 
149
- **Note:** This command automatically generates `.claude/settings.local.json` for Claude Code CLI integration.
150
- You can run this command from any subdirectory within your project - it will automatically find the project root.
155
+ **注意**:此命令会自动生成 `.claude/settings.local.json` 文件用于 Claude Code CLI 集成。
156
+ 如果检测到当前项目是 Git 仓库,还会自动将配置文件添加到 `.gitignore` 中,避免将敏感信息提交到版本控制。
157
+ 你可以在项目的任何子目录中运行此命令 - 它会自动找到项目根目录。
151
158
 
152
- #### 4. Check Current Project Info
159
+ #### 4. 查看当前项目信息
153
160
 
154
- See which account is active for your current project:
161
+ 查看当前项目激活的账户:
155
162
 
156
163
  ```bash
157
164
  ais info
158
165
  ```
159
166
 
160
- Or just show the account name:
167
+ 或仅显示账户名称:
161
168
 
162
169
  ```bash
163
170
  ais current
164
171
  ```
165
172
 
166
- **Note:** These commands work from any subdirectory within your project, similar to how git commands work.
173
+ **注意**:这些命令可以在项目的任何子目录中使用,类似 git 命令的工作方式。
167
174
 
168
- #### 5. Remove an Account
175
+ #### 5. 使用 Web UI 管理界面
176
+
177
+ 启动可视化管理界面:
178
+
179
+ ```bash
180
+ ais ui
181
+ ```
169
182
 
170
- Remove an account you no longer need:
183
+ 这将在浏览器中打开 Web UI,服务器会自动使用一个随机的高位端口(49152-65535)。如果端口被占用,会自动尝试其他端口,提供以下功能:
184
+
185
+ **界面特性:**
186
+ - **账号管理**: 可视化的卡片界面,显示所有账号信息
187
+ - **添加/编辑账号**: 友好的表单界面,支持所有配置项
188
+ - **删除账号**: 一键删除,带确认提示
189
+ - **搜索过滤**: 实时搜索账号名称、邮箱或类型
190
+ - **批量操作**:
191
+ - 导出所有账号为 JSON 文件
192
+ - 从 JSON 文件导入账号(支持覆盖选项)
193
+ - **主题切换**:
194
+ - iOS 风格的 Switch 开关
195
+ - 支持浅色和深色主题
196
+ - 默认跟随系统主题设置
197
+ - **多语言支持**:
198
+ - 中文/英文一键切换
199
+ - 界面默认使用中文
200
+ - 语言设置自动保存
201
+
202
+ **UI 使用提示:**
203
+ - 所有修改实时同步到本地配置
204
+ - 关闭浏览器窗口不影响数据
205
+ - 按 `Ctrl+C` 停止 Web 服务器
206
+ - 支持在任何浏览器中使用
207
+
208
+ #### 6. 删除账户
209
+
210
+ 删除不再需要的账户:
171
211
 
172
212
  ```bash
173
213
  ais remove old-account
174
- # or
214
+ #
175
215
  ais rm
176
216
  ```
177
217
 
178
- ### Advanced Usage
218
+ ### 高级用法
179
219
 
180
- #### Show Configuration Paths
220
+ #### 显示配置路径
181
221
 
182
- See where your configurations are stored:
222
+ 查看配置文件的存储位置:
183
223
 
184
224
  ```bash
185
225
  ais paths
186
226
  ```
187
227
 
188
- #### Export Account Configuration
228
+ #### 诊断配置问题
189
229
 
190
- Export an account's configuration as JSON:
230
+ 如果 Claude Code 使用了错误的账户,运行诊断:
231
+
232
+ ```bash
233
+ ais doctor
234
+ ```
235
+
236
+ 此命令会检查:
237
+ - 当前目录和项目根目录
238
+ - AIS 项目配置
239
+ - Claude Code 配置
240
+ - 全局 Claude 配置
241
+ - 提供解决建议
242
+
243
+ #### 导出账户配置
244
+
245
+ 以 JSON 格式导出账户配置:
191
246
 
192
247
  ```bash
193
248
  ais export my-claude-account
194
249
  ```
195
250
 
196
- ## Configuration
251
+ ## 配置
197
252
 
198
- ### Global Configuration
253
+ ### 全局配置
199
254
 
200
- All accounts are stored globally in your home directory:
255
+ 所有账户都存储在用户主目录的全局配置中:
201
256
 
202
257
  - **macOS/Linux**: `~/.ai-account-switch/config.json`
203
258
  - **Windows**: `%USERPROFILE%\.ai-account-switch\config.json`
204
259
 
205
- ### Project Configuration
260
+ ### 项目配置
206
261
 
207
- Each project stores its active account reference in:
262
+ 每个项目将其活动账户引用存储在:
208
263
 
209
264
  ```
210
265
  ./.ais-project-config
211
266
  ```
212
267
 
213
- This file is created automatically when you run `ais use` and should be added to `.gitignore`.
268
+ 此文件在运行 `ais use` 时自动创建,应添加到 `.gitignore` 中。
214
269
 
215
- ### Claude Code Integration
270
+ ### Claude Code 集成
216
271
 
217
- When you run `ais use`, the tool automatically creates `.claude/settings.local.json` with the following structure:
272
+ 运行 `ais use` 时,工具会自动创建 `.claude/settings.local.json`,结构如下:
218
273
 
219
274
  ```json
220
275
  {
221
276
  "env": {
222
277
  "ANTHROPIC_AUTH_TOKEN": "your-api-key",
223
278
  "ANTHROPIC_BASE_URL": "your-api-url",
224
- "ANTHROPIC_ORGANIZATION_ID": "your-org-id",
225
279
  "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
226
280
  },
227
281
  "permissions": {
@@ -232,15 +286,15 @@ When you run `ais use`, the tool automatically creates `.claude/settings.local.j
232
286
  }
233
287
  ```
234
288
 
235
- This ensures Claude Code CLI automatically uses the correct account for your project.
289
+ 这确保 Claude Code CLI 自动使用项目的正确账户。
236
290
 
237
- ### Codex Integration
291
+ ### Codex 集成
238
292
 
239
- When you add a **Codex** type account and run `ais use`, the tool automatically creates a profile in `~/.codex/config.toml` and a `.codex-profile` file in your project directory.
293
+ 当你添加 **Codex** 类型账户并运行 `ais use` 时,工具会自动在 `~/.codex/config.toml` 中创建 profile,并在项目目录中创建 `.codex-profile` 文件。
240
294
 
241
- #### Adding a Codex Account
295
+ #### 添加 Codex 账户
242
296
 
243
- When adding a Codex account, you'll see helpful configuration tips:
297
+ 添加 Codex 账户时,你会看到有用的配置提示:
244
298
 
245
299
  ```bash
246
300
  ais add my-codex-account
@@ -256,44 +310,44 @@ ais add my-codex-account
256
310
  ? Enter API URL (e.g., https://api.example.com or https://api.example.com/v1): https://zone.veloera.org
257
311
  ```
258
312
 
259
- **Important Notes:**
260
- - AIS automatically adds `/v1` to the API URL if it's missing
261
- - The configuration uses `wire_api = "chat"` (OpenAI-compatible format)
262
- - This prevents common issues like Cloudflare 400 errors
313
+ **重要说明:**
314
+ - AIS 会自动为 API URL 添加 `/v1` 路径(如果缺少)
315
+ - 配置使用 `wire_api = "chat"`(OpenAI 兼容格式)
316
+ - 这可以防止常见的 Cloudflare 400 错误
263
317
 
264
- #### Using Codex with Your Project
318
+ #### 在项目中使用 Codex
265
319
 
266
- After running `ais use` with a Codex account:
320
+ 使用 Codex 账户运行 `ais use` 后:
267
321
 
268
322
  ```bash
269
323
  cd ~/my-project
270
324
  ais use my-codex-account
271
325
 
272
- # Output:
326
+ # 输出:
273
327
  # ✓ Switched to account 'my-codex-account' for current project.
274
328
  # ✓ Codex profile created: ais_my-project
275
329
  # Use: codex --profile ais_my-project [prompt]
276
330
  ```
277
331
 
278
- The tool creates:
279
- 1. **Global Profile**: `~/.codex/config.toml` with your account configuration
280
- 2. **Project Reference**: `.codex-profile` containing the profile name
332
+ 工具会创建:
333
+ 1. **全局 Profile**:`~/.codex/config.toml` 包含你的账户配置
334
+ 2. **项目引用**:`.codex-profile` 包含 profile 名称
281
335
 
282
- #### Running Codex
336
+ #### 运行 Codex
283
337
 
284
- Use Codex with the generated profile:
338
+ 使用生成的 profile 运行 Codex:
285
339
 
286
340
  ```bash
287
- # In your project directory
341
+ # 在项目目录中
288
342
  codex --profile ais_my-project "your prompt here"
289
343
 
290
- # Or use the profile name from .codex-profile
344
+ # 或使用 .codex-profile 中的 profile 名称
291
345
  codex --profile $(cat .codex-profile) "your prompt"
292
346
  ```
293
347
 
294
- #### Codex Configuration Structure
348
+ #### Codex 配置结构
295
349
 
296
- The generated configuration in `~/.codex/config.toml`:
350
+ `~/.codex/config.toml` 中生成的配置:
297
351
 
298
352
  ```toml
299
353
  # AIS Profile for project: /path/to/your/project
@@ -307,61 +361,61 @@ wire_api = "chat"
307
361
  http_headers = { "Authorization" = "Bearer sk-xxx..." }
308
362
  ```
309
363
 
310
- #### Switching Between Projects
364
+ #### 在不同项目间切换
311
365
 
312
- Each project can use a different Codex account:
366
+ 每个项目可以使用不同的 Codex 账户:
313
367
 
314
368
  ```bash
315
- # Project A
369
+ # 项目 A
316
370
  cd ~/project-a
317
371
  ais use codex-account-1
318
372
  codex --profile ais_project-a "implement feature X"
319
373
 
320
- # Project B
374
+ # 项目 B
321
375
  cd ~/project-b
322
376
  ais use codex-account-2
323
377
  codex --profile ais_project-b "fix bug Y"
324
378
  ```
325
379
 
326
- #### Troubleshooting Codex
380
+ #### Codex 故障排除
327
381
 
328
- **Error: "duplicate key" in TOML**
329
- - This happens if profiles weren't cleaned up properly
330
- - Solution: Run `ais use <account>` again to regenerate the configuration
382
+ **错误:"duplicate key" in TOML**
383
+ - 这是因为 profile 没有正确清理
384
+ - 解决方案:再次运行 `ais use <account>` 重新生成配置
331
385
 
332
- **Error: "400 Bad Request" from Cloudflare**
333
- - This usually means the API URL is incorrect
334
- - Solution: Make sure your API URL includes `/v1` or let AIS add it automatically
335
- - Run `ais use <account>` to regenerate with the correct configuration
386
+ **错误:"400 Bad Request" from Cloudflare**
387
+ - 这通常意味着 API URL 不正确
388
+ - 解决方案:确保 API URL 包含 `/v1` 或让 AIS 自动添加
389
+ - 运行 `ais use <account>` 使用正确的配置重新生成
336
390
 
337
- **Check Codex Configuration**
391
+ **检查 Codex 配置**
338
392
  ```bash
339
- # View your Codex profile
393
+ # 查看你的 Codex profile
340
394
  cat .codex-profile
341
395
 
342
- # Check the configuration
396
+ # 检查配置
343
397
  grep -A 10 "$(cat .codex-profile)" ~/.codex/config.toml
344
398
 
345
- # Or use the doctor command
399
+ # 或使用 doctor 命令
346
400
  ais doctor
347
401
  ```
348
402
 
349
- ### CCR (Claude Code Router) Integration
403
+ ### CCR (Claude Code Router) 集成
350
404
 
351
- [Claude Code Router](https://github.com/musistudio/claude-code-router) is a powerful routing layer for Claude Code that allows you to use multiple AI providers and models seamlessly.
405
+ [Claude Code Router](https://github.com/musistudio/claude-code-router) 是一个强大的 Claude Code 路由层,允许你无缝使用多个 AI 提供商和模型。
352
406
 
353
- When you add a **CCR** type account and run `ais use`, the tool automatically:
354
- 1. Updates `~/.claude-code-router/config.json` with Provider and Router configuration
355
- 2. Generates `.claude/settings.local.json` pointing to the local CCR Router
356
- 3. Automatically restarts CCR Router to apply changes
407
+ 当你添加 **CCR** 类型账户并运行 `ais use` 时,工具会自动:
408
+ 1. 更新 `~/.claude-code-router/config.json` 中的 Provider Router 配置
409
+ 2. 生成指向本地 CCR Router 的 `.claude/settings.local.json`
410
+ 3. 自动重启 CCR Router 以应用更改
357
411
 
358
- **Prerequisites:**
359
- - Install Claude Code Router: `npm install -g @musistudio/claude-code-router`
360
- - Start CCR Router: `ccr start`
412
+ **前提条件:**
413
+ - 安装 Claude Code Router:`npm install -g @musistudio/claude-code-router`
414
+ - 启动 CCR Router:`ccr start`
361
415
 
362
- #### Adding a CCR Account
416
+ #### 添加 CCR 账户
363
417
 
364
- When adding a CCR account, you'll see helpful configuration tips:
418
+ 添加 CCR 账户时,你会看到有用的配置提示:
365
419
 
366
420
  ```bash
367
421
  ais add my-ccr-account
@@ -381,20 +435,20 @@ ais add my-ccr-account
381
435
  ? Enter think model: gemini-2.5-pro
382
436
  ```
383
437
 
384
- **Important Notes:**
385
- - Default API URL is `http://localhost:3000/v1/chat/completions`
386
- - You need to specify three models: default, background, and think
387
- - Models are automatically deduplicated in the Provider configuration
438
+ **重要说明:**
439
+ - 默认 API URL `http://localhost:3000/v1/chat/completions`
440
+ - 你需要指定三个模型:defaultbackground think
441
+ - 模型会在 Provider 配置中自动去重
388
442
 
389
- #### Using CCR with Your Project
443
+ #### 在项目中使用 CCR
390
444
 
391
- After running `ais use` with a CCR account:
445
+ 使用 CCR 账户运行 `ais use` 后:
392
446
 
393
447
  ```bash
394
448
  cd ~/my-project
395
449
  ais use my-ccr-account
396
450
 
397
- # Output:
451
+ # 输出:
398
452
  # ✓ Switched to account 'my-ccr-account' for current project.
399
453
  # 🔄 Restarting CCR Router...
400
454
  # ✓ CCR Router restarted successfully
@@ -407,27 +461,27 @@ ais use my-ccr-account
407
461
  # Claude Code will use CCR Router to route requests
408
462
  ```
409
463
 
410
- The tool:
411
- 1. **Updates CCR Config**: Adds/updates Provider in `~/.claude-code-router/config.json`
412
- 2. **Updates Router**: Sets default, background, and think models
413
- 3. **Generates Claude Config**: Creates `.claude/settings.local.json` with `ANTHROPIC_BASE_URL` pointing to CCR Router
414
- 4. **Restarts CCR**: Automatically runs `ccr restart` to apply changes
464
+ 工具会:
465
+ 1. **更新 CCR 配置**:在 `~/.claude-code-router/config.json` 中添加/更新 Provider
466
+ 2. **更新 Router**:设置 defaultbackground think 模型
467
+ 3. **生成 Claude 配置**:创建 `.claude/settings.local.json`,`ANTHROPIC_BASE_URL` 指向 CCR Router
468
+ 4. **重启 CCR**:自动运行 `ccr restart` 以应用更改
415
469
 
416
- #### Running Claude with CCR
470
+ #### 使用 CCR 运行 Claude
417
471
 
418
- Start Claude interactive session:
472
+ 启动 Claude 交互会话:
419
473
 
420
474
  ```bash
421
- # In your project directory
475
+ # 在项目目录中
422
476
  claude
423
477
 
424
- # Claude Code will automatically use CCR Router
425
- # Requests are routed based on your CCR configuration
478
+ # Claude Code 会自动使用 CCR Router
479
+ # 请求会根据你的 CCR 配置进行路由
426
480
  ```
427
481
 
428
- #### CCR Configuration Structure
482
+ #### CCR 配置结构
429
483
 
430
- The generated configuration in `~/.claude-code-router/config.json`:
484
+ `~/.claude-code-router/config.json` 中生成的配置:
431
485
 
432
486
  ```json
433
487
  {
@@ -448,7 +502,7 @@ The generated configuration in `~/.claude-code-router/config.json`:
448
502
  }
449
503
  ```
450
504
 
451
- The generated configuration in `.claude/settings.local.json`:
505
+ `.claude/settings.local.json` 中生成的配置:
452
506
 
453
507
  ```json
454
508
  {
@@ -459,57 +513,57 @@ The generated configuration in `.claude/settings.local.json`:
459
513
  }
460
514
  ```
461
515
 
462
- #### Switching Between Projects
516
+ #### 在不同项目间切换
463
517
 
464
- Each project can use a different CCR configuration:
518
+ 每个项目可以使用不同的 CCR 配置:
465
519
 
466
520
  ```bash
467
- # Project A
521
+ # 项目 A
468
522
  cd ~/project-a
469
523
  ais use ccr-account-1
470
524
  claude
471
525
 
472
- # Project B
526
+ # 项目 B
473
527
  cd ~/project-b
474
528
  ais use ccr-account-2
475
529
  claude
476
530
  ```
477
531
 
478
- #### Troubleshooting CCR
532
+ #### CCR 故障排除
479
533
 
480
- **Check CCR Configuration**
534
+ **检查 CCR 配置**
481
535
  ```bash
482
- # View your CCR configuration
536
+ # 查看你的 CCR 配置
483
537
  cat ~/.claude-code-router/config.json
484
538
 
485
- # View Claude configuration
539
+ # 查看 Claude 配置
486
540
  cat .claude/settings.local.json
487
541
 
488
- # Or use the doctor command
542
+ # 或使用 doctor 命令
489
543
  ais doctor
490
544
  ```
491
545
 
492
- **CCR Router not installed**
493
- - Install from npm: `npm install -g @musistudio/claude-code-router`
494
- - Visit the project page: https://github.com/musistudio/claude-code-router
546
+ **CCR Router 未安装**
547
+ - npm 安装:`npm install -g @musistudio/claude-code-router`
548
+ - 访问项目页面:https://github.com/musistudio/claude-code-router
495
549
 
496
- **CCR Router not restarting**
497
- - Make sure CCR CLI is installed and available in your PATH
498
- - Run `ccr restart` manually if automatic restart fails
499
- - Check if CCR Router is running: `ccr status`
550
+ **CCR Router 未重启**
551
+ - 确保 CCR CLI 已安装并在 PATH 中可用
552
+ - 如果自动重启失败,手动运行 `ccr restart`
553
+ - 检查 CCR Router 是否运行:`ccr status`
500
554
 
501
- **Claude not using CCR Router**
502
- - Verify `ANTHROPIC_BASE_URL` in `.claude/settings.local.json` points to correct port
503
- - Check CCR Router is running on the configured port
504
- - Restart Claude Code after configuration changes
555
+ **Claude 未使用 CCR Router**
556
+ - 验证 `.claude/settings.local.json` 中的 `ANTHROPIC_BASE_URL` 指向正确的端口
557
+ - 检查 CCR Router 是否在配置的端口上运行
558
+ - 配置更改后重启 Claude Code
505
559
 
506
- ### Droids Integration
560
+ ### Droids 集成
507
561
 
508
- When you add a **Droids** type account and run `ais use`, the tool automatically creates a configuration file at `.droids/config.json` in your project directory.
562
+ 当你添加 **Droids** 类型账户并运行 `ais use` 时,工具会自动在项目目录中创建 `.droids/config.json` 配置文件。
509
563
 
510
- #### Adding a Droids Account
564
+ #### 添加 Droids 账户
511
565
 
512
- When adding a Droids account, you'll see helpful configuration tips:
566
+ 添加 Droids 账户时,你会看到有用的配置提示:
513
567
 
514
568
  ```bash
515
569
  ais add my-droids-account
@@ -527,15 +581,15 @@ ais add my-droids-account
527
581
  ? Enter model name: droids-model-v1
528
582
  ```
529
583
 
530
- #### Using Droids with Your Project
584
+ #### 在项目中使用 Droids
531
585
 
532
- After running `ais use` with a Droids account:
586
+ 使用 Droids 账户运行 `ais use` 后:
533
587
 
534
588
  ```bash
535
589
  cd ~/my-project
536
590
  ais use my-droids-account
537
591
 
538
- # Output:
592
+ # 输出:
539
593
  # ✓ Switched to account 'my-droids-account' for current project.
540
594
  # ✓ Droids configuration generated at: .droids/config.json
541
595
  #
@@ -545,23 +599,23 @@ ais use my-droids-account
545
599
  # Droids will automatically use the configuration from .droids/config.json
546
600
  ```
547
601
 
548
- The tool creates:
549
- - **Project Configuration**: `.droids/config.json` with your account settings
602
+ 工具会创建:
603
+ - **项目配置**:`.droids/config.json` 包含你的账户设置
550
604
 
551
- #### Running Droids
605
+ #### 运行 Droids
552
606
 
553
- Start Droids interactive session:
607
+ 启动 Droids 交互会话:
554
608
 
555
609
  ```bash
556
- # In your project directory
610
+ # 在项目目录中
557
611
  droid
558
612
 
559
- # Droids will automatically load configuration from .droids/config.json
613
+ # Droids 会自动从 .droids/config.json 加载配置
560
614
  ```
561
615
 
562
- #### Droids Configuration Structure
616
+ #### Droids 配置结构
563
617
 
564
- The generated configuration in `.droids/config.json`:
618
+ `.droids/config.json` 中生成的配置:
565
619
 
566
620
  ```json
567
621
  {
@@ -574,42 +628,42 @@ The generated configuration in `.droids/config.json`:
574
628
  }
575
629
  ```
576
630
 
577
- #### Switching Between Projects
631
+ #### 在不同项目间切换
578
632
 
579
- Each project can use a different Droids account:
633
+ 每个项目可以使用不同的 Droids 账户:
580
634
 
581
635
  ```bash
582
- # Project A
636
+ # 项目 A
583
637
  cd ~/project-a
584
638
  ais use droids-account-1
585
639
  droid
586
640
 
587
- # Project B
641
+ # 项目 B
588
642
  cd ~/project-b
589
643
  ais use droids-account-2
590
644
  droid
591
645
  ```
592
646
 
593
- #### Troubleshooting Droids
647
+ #### Droids 故障排除
594
648
 
595
- **Check Droids Configuration**
649
+ **检查 Droids 配置**
596
650
  ```bash
597
- # View your Droids configuration
651
+ # 查看你的 Droids 配置
598
652
  cat .droids/config.json
599
653
 
600
- # Or use the doctor command
654
+ # 或使用 doctor 命令
601
655
  ais doctor
602
656
  ```
603
657
 
604
- **Droids CLI not found**
605
- - Make sure Droids CLI is installed and available in your PATH
606
- - Run `droid --version` to verify installation
658
+ **Droids CLI 未找到**
659
+ - 确保 Droids CLI 已安装并在 PATH 中可用
660
+ - 运行 `droid --version` 验证安装
607
661
 
608
- #### Custom Environment Variables
662
+ #### 自定义环境变量
609
663
 
610
- You can add custom environment variables when creating an account. When prompted, enter them in `KEY=VALUE` format:
664
+ 在创建账户时可以添加自定义环境变量。在提示时,使用 `KEY=VALUE` 格式输入:
611
665
 
612
- **Input Format:**
666
+ **输入格式:**
613
667
  ```
614
668
  ? Environment variable (KEY=VALUE format): CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
615
669
  ✓ Added: CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
@@ -620,572 +674,519 @@ You can add custom environment variables when creating an account. When prompted
620
674
  ? Add another environment variable? (y/N)
621
675
  ```
622
676
 
623
- **Common Examples:**
624
- - `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` - Disable non-essential network traffic
625
- - `HTTP_PROXY=http://proxy.example.com:8080` - Set HTTP proxy
626
- - `HTTPS_PROXY=https://proxy.example.com:8080` - Set HTTPS proxy
627
- - Any other environment variables needed for your setup
628
-
629
- **Features:**
630
- - One-line input format (`KEY=VALUE`)
631
- - Real-time display of added variables
632
- - Press Enter without input to finish
633
- - Variables are automatically included in `.claude/settings.local.json`
634
-
635
- ### MCP (Model Context Protocol) Integration
636
-
637
- AIS supports managing MCP servers globally and enabling them per project. MCP servers extend Claude Code with additional tools and capabilities.
638
-
639
- You can manage MCP servers through both **CLI commands** and **Web UI**.
640
-
641
- #### Web UI Management (Recommended)
642
-
643
- The easiest way to manage MCP servers is through the Web UI:
644
-
645
- ```bash
646
- ais ui
647
- ```
648
-
649
- Then click on the **"MCP 服务器" (MCP Servers)** tab to:
650
-
651
- **Features:**
652
- - ✅ **Add MCP Servers**: Click "+ 添加 MCP 服务器" to add new servers
653
- - Choose server type: stdio, sse, or http
654
- - Fill in configuration (command, URL, environment variables, etc.)
655
- - Add description for easy identification
656
- - ✅ **Edit Servers**: Click "编辑" to modify existing server configurations
657
- - ✅ **Test Connection**: Click "测试连接" to verify server availability
658
- - ✅ **Enable/Disable**: Toggle servers for the current project with one click
659
- - ✅ **Search & Filter**: Quickly find servers by name or type
660
- - ✅ **Delete Servers**: Remove servers you no longer need
661
- - ✅ **Sync Configuration**: Click "同步配置" to sync to Claude Code
662
-
663
- **Benefits:**
664
- - Intuitive visual interface
665
- - Real-time validation
666
- - No need to remember command syntax
667
- - See all servers at a glance
668
- - Status indicators (enabled/disabled)
669
- - Supports Chinese and English
670
-
671
- **Example Workflow:**
672
- 1. Start Web UI: `ais ui`
673
- 2. Click "MCP 服务器" tab
674
- 3. Click "+ 添加 MCP 服务器"
675
- 4. Select type: "stdio"
676
- 5. Enter command: "npx"
677
- 6. Enter arguments: "@modelcontextprotocol/server-filesystem,/path"
678
- 7. Click "保存"
679
- 8. Click "测试连接" to verify
680
- 9. Click "启用" to enable for current project
681
-
682
- #### CLI Management
683
-
684
- You can also manage MCP servers through CLI commands:
685
-
686
- ##### Adding an MCP Server
687
-
688
- Add a new MCP server interactively:
689
-
690
- ```bash
691
- ais mcp add filesystem
692
- ```
693
-
694
- You'll be prompted to configure:
695
- - **Server type**: stdio, sse, or http
696
- - **Command and arguments** (for stdio type)
697
- - **URL** (for sse/http types)
698
- - **Environment variables** (optional)
699
- - **Headers** (optional for sse/http)
700
- - **Description** (optional)
701
-
702
- **Example: Adding a stdio MCP server**
703
- ```bash
704
- $ ais mcp add filesystem
705
- ? Select MCP server type: stdio
706
- ? Enter command: npx
707
- ? Enter arguments (comma-separated): @modelcontextprotocol/server-filesystem,/Users/user/workspace
708
- ? Add environment variables? Yes
709
- ? Environment variable (KEY=VALUE): ALLOWED_PATHS=/Users/user/workspace
710
- ? Add another? No
711
- ? Enter description: File system access MCP server
712
- ✓ MCP server 'filesystem' added successfully!
713
- ```
714
-
715
- ##### Listing MCP Servers
716
-
717
- View all configured MCP servers:
718
-
719
- ```bash
720
- ais mcp list
721
- ```
722
-
723
- Output shows server name, type, enabled status, and description.
724
-
725
- ##### Enabling MCP Servers for a Project
726
-
727
- Enable an MCP server for the current project:
728
-
729
- ```bash
730
- cd ~/my-project
731
- ais mcp enable filesystem
732
- ```
733
-
734
- This will:
735
- 1. Add the server to the project's enabled list
736
- 2. Update `.claude/settings.local.json` with the MCP configuration
737
- 3. Make the MCP server available to Claude Code in this project
738
-
739
- ##### Managing MCP Servers
740
-
741
- ```bash
742
- # Show MCP server details
743
- ais mcp show filesystem
744
-
745
- # Update MCP server configuration
746
- ais mcp update filesystem
747
-
748
- # Disable MCP server for current project
749
- ais mcp disable filesystem
750
-
751
- # Show enabled MCP servers for current project
752
- ais mcp enabled
753
-
754
- # Sync MCP configuration to Claude Code
755
- ais mcp sync
756
-
757
- # Remove an MCP server
758
- ais mcp remove filesystem
759
- ```
760
-
761
- #### MCP Configuration Structure
762
-
763
- MCP servers are stored globally in `~/.ai-account-switch/config.json`:
764
-
765
- ```json
766
- {
767
- "accounts": { ... },
768
- "mcpServers": {
769
- "filesystem": {
770
- "name": "filesystem",
771
- "type": "stdio",
772
- "command": "npx",
773
- "args": ["@modelcontextprotocol/server-filesystem", "/Users/user/workspace"],
774
- "env": {
775
- "ALLOWED_PATHS": "/Users/user/workspace"
776
- },
777
- "description": "File system access MCP server",
778
- "createdAt": "2025-01-03T00:00:00.000Z",
779
- "updatedAt": "2025-01-03T00:00:00.000Z"
780
- }
781
- }
782
- }
783
- ```
784
-
785
- Project-level enabled servers are stored in `.ais-project-config`:
786
-
787
- ```json
788
- {
789
- "activeAccount": "my-account",
790
- "projectPath": "/path/to/project",
791
- "setAt": "2025-01-03T00:00:00.000Z",
792
- "enabledMcpServers": ["filesystem"]
793
- }
794
- ```
795
-
796
- When enabled, MCP servers are automatically added to `.claude/settings.local.json`:
797
-
798
- ```json
799
- {
800
- "env": { ... },
801
- "permissions": { ... },
802
- "mcpServers": {
803
- "filesystem": {
804
- "command": "npx",
805
- "args": ["@modelcontextprotocol/server-filesystem", "/Users/user/workspace"],
806
- "env": {
807
- "ALLOWED_PATHS": "/Users/user/workspace"
808
- }
809
- }
810
- }
811
- }
812
- ```
813
-
814
- #### MCP Server Types
815
-
816
- **stdio**: Communicates via standard input/output
817
- - Requires: `command`, `args`
818
- - Optional: `env`
819
-
820
- **sse**: Server-Sent Events
821
- - Requires: `url`
822
- - Optional: `headers`
677
+ **常见示例:**
678
+ - `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` - 禁用非必要网络流量
679
+ - `HTTP_PROXY=http://proxy.example.com:8080` - 设置 HTTP 代理
680
+ - `HTTPS_PROXY=https://proxy.example.com:8080` - 设置 HTTPS 代理
681
+ - 其他你需要的环境变量
823
682
 
824
- **http**: HTTP requests
825
- - Requires: `url`
826
- - Optional: `headers`
683
+ **功能特性:**
684
+ - 单行输入格式(`KEY=VALUE`)
685
+ - 实时显示已添加的变量
686
+ - 直接按回车即可完成
687
+ - 变量会自动包含在 `.claude/settings.local.json` 文件中
827
688
 
828
- ## Examples
689
+ ## 使用示例
829
690
 
830
- ### Example 1: Setting Up Multiple Accounts
691
+ ### 示例 1:设置多个账户
831
692
 
832
693
  ```bash
833
- # Add your personal Claude account
694
+ # 添加个人 Claude 账户
834
695
  ais add personal-claude
835
696
 
836
- # Add your work Claude account
697
+ # 添加工作 Claude 账户
837
698
  ais add work-claude
838
699
 
839
- # Add a Codex account
700
+ # 添加 Codex 账户
840
701
  ais add codex-dev
841
702
 
842
- # Add a Droids account
703
+ # 添加 Droids 账户
843
704
  ais add droids-dev
844
705
 
845
- # List all accounts
706
+ # 列出所有账户
846
707
  ais list
847
708
  ```
848
709
 
849
- ### Example 2: Using Different Accounts for Different Projects
710
+ ### 示例 2:为不同项目使用不同账户
850
711
 
851
712
  ```bash
852
- # In your personal project
713
+ # 在个人项目中
853
714
  cd ~/my-personal-project
854
715
  ais use personal-claude
855
716
 
856
- # In your work project
717
+ # 在工作项目中
857
718
  cd ~/work/company-project
858
719
  ais use work-claude
859
720
 
860
- # Check what's active
721
+ # 检查激活的账户
861
722
  ais info
862
723
  ```
863
724
 
864
- ### Example 3: Managing Accounts
725
+ ### 示例 3:管理账户
865
726
 
866
727
  ```bash
867
- # View all accounts
728
+ # 查看所有账户
868
729
  ais list
869
730
 
870
- # Check current account
731
+ # 检查当前账户
871
732
  ais current
872
733
 
873
- # Export an account config
734
+ # 导出账户配置
874
735
  ais export personal-claude
875
736
 
876
- # Remove old accounts
737
+ # 删除旧账户
877
738
  ais remove old-account
878
739
 
879
- # View config locations
740
+ # 查看配置位置
880
741
  ais paths
881
742
  ```
882
743
 
883
- ## Security Notes
744
+ ### 示例 4:诊断问题
884
745
 
885
- - API keys are stored locally on your machine only
886
- - The global configuration file contains sensitive credentials
887
- - Always add `.ais-project-config` to your `.gitignore`
888
- - Never commit account credentials to version control
889
- - API keys are masked when displayed (shows first and last 4 characters only)
746
+ ```bash
747
+ # 如果 Claude Code 使用了错误的账户
748
+ cd ~/your-project
749
+ ais doctor
750
+
751
+ # 根据诊断建议操作
752
+ # 然后重新设置账户
753
+ ais use correct-account
754
+ ```
755
+
756
+ ## 安全注意事项
890
757
 
891
- ## Platform Compatibility
758
+ - API 密钥仅存储在本地机器上
759
+ - 全局配置文件包含敏感凭证
760
+ - `ais use` 命令会自动将配置文件添加到 `.gitignore` (如果项目是 Git 仓库)
761
+ - 始终验证 `.gitignore` 包含以下文件:
762
+ - `.ais-project-config`
763
+ - `.claude/settings.local.json`
764
+ - 切勿将账户凭证提交到版本控制
765
+ - 显示 API 密钥时会进行掩码处理(仅显示前 4 位和后 4 位字符)
892
766
 
893
- | Platform | Status | Notes |
894
- |----------|--------|-------|
895
- | macOS | ✅ Fully Supported | Tested on macOS 10.15+ |
896
- | Linux | ✅ Fully Supported | Tested on Ubuntu 20.04+ |
897
- | Windows | ✅ Fully Supported | Tested on Windows 10+ |
767
+ ## 平台兼容性
898
768
 
899
- ## Requirements
769
+ | 平台 | 状态 | 备注 |
770
+ |------|------|------|
771
+ | macOS | ✅ 完全支持 | 已在 macOS 10.15+ 上测试 |
772
+ | Linux | ✅ 完全支持 | 已在 Ubuntu 20.04+ 上测试 |
773
+ | Windows | ✅ 完全支持 | 已在 Windows 10+ 上测试 |
774
+
775
+ ## 系统要求
900
776
 
901
777
  - **Node.js**: >= 16.0.0
902
778
  - **npm**: >= 7.0.0
903
779
 
904
- **Note**: This tool requires Node.js version 16 or higher (due to commander@11.x dependency). You can check your current version with:
780
+ **注意**: 此工具需要 Node.js 16 或更高版本(因为 commander@11.x 依赖要求)。你可以使用以下命令检查当前版本:
905
781
  ```bash
906
782
  node --version
907
783
  npm --version
908
784
  ```
909
785
 
910
- If you need to upgrade Node.js, visit [nodejs.org](https://nodejs.org/) or use a version manager like [nvm](https://github.com/nvm-sh/nvm).
786
+ 如果需要升级 Node.js,请访问 [nodejs.org](https://nodejs.org/) 或使用版本管理器如 [nvm](https://github.com/nvm-sh/nvm)
911
787
 
912
- ## Project Structure
788
+ ## 项目结构
913
789
 
914
790
  ```
915
791
  ai-agent-user-swith/
916
792
  ├── bin/
917
- │ └── ais.js # Executable entry point
793
+ │ └── ais.js # 可执行入口点
918
794
  ├── src/
919
- │ ├── index.js # Main CLI program
920
- │ ├── commands.js # Command implementations
921
- │ └── config.js # Configuration manager
795
+ │ ├── index.js # CLI 程序
796
+ │ ├── commands.js # 命令实现
797
+ │ └── config.js # 配置管理器
798
+ ├── .github/
799
+ │ └── workflows/
800
+ │ └── release.yml # GitHub Actions 自动发布
922
801
  ├── package.json
923
802
  ├── .gitignore
924
- └── README.md
803
+ ├── .npmignore
804
+ ├── README.md # 英文文档
805
+ ├── README_ZH.md # 中文文档
806
+ ├── NPM_PUBLISH.md # npm 发布指南
807
+ └── RELEASE.md # 发布指南
925
808
  ```
926
809
 
927
- ## Troubleshooting
810
+ ## 故障排除
928
811
 
929
- ### Command not found: ais
812
+ ### 命令未找到:ais
930
813
 
931
- If you get this error after installation, make sure you've linked the package:
814
+ 如果安装后出现此错误,确保已链接包:
932
815
 
933
816
  ```bash
934
817
  npm link
935
818
  ```
936
819
 
937
- ### Permission denied
820
+ ### 权限被拒绝
938
821
 
939
- On Unix systems, ensure the bin file is executable:
822
+ Unix 系统上,确保 bin 文件可执行:
940
823
 
941
824
  ```bash
942
825
  chmod +x bin/ais.js
943
826
  ```
944
827
 
945
- ### No accounts found
828
+ ### 未找到账户
946
829
 
947
- Make sure you've added at least one account:
830
+ 确保你已添加至少一个账户:
948
831
 
949
832
  ```bash
950
833
  ais add
951
834
  ```
952
835
 
953
- ### Claude Code uses wrong account
836
+ ### Claude Code 使用了错误的账户
954
837
 
955
- If Claude Code is using a different account than expected:
838
+ 如果 Claude Code 使用了非预期的账户:
956
839
 
957
- 1. Run diagnostics:
840
+ 1. 运行诊断:
958
841
  ```bash
959
842
  ais doctor
960
843
  ```
961
844
 
962
- 2. Check if global Claude config is overriding project config:
963
- - If `~/.claude/settings.json` contains `env.ANTHROPIC_AUTH_TOKEN`, it may conflict
964
- - **Solution**: Remove the `env` section from global config, or only keep `permissions`
845
+ 2. 检查全局 Claude 配置是否覆盖了项目配置:
846
+ - 如果 `~/.claude/settings.json` 包含 `env.ANTHROPIC_AUTH_TOKEN`,可能会冲突
847
+ - **解决方案**:从全局配置中删除 `env` 部分,或仅保留 `permissions`
965
848
 
966
- 3. Ensure you're starting Claude Code from your project directory or subdirectory
849
+ 3. 确保从项目目录或子目录启动 Claude Code
967
850
 
968
- 4. Regenerate project config:
851
+ 4. 重新生成项目配置:
969
852
  ```bash
970
- ais use <your-account-name>
853
+ ais use <你的账户名>
971
854
  ```
972
855
 
973
- ### Project config not found in subdirectory
856
+ ### 在子目录中未找到项目配置
974
857
 
975
- The tool should work in any subdirectory. If it doesn't:
858
+ 工具应该在任何子目录中工作。如果不行:
976
859
 
977
860
  ```bash
978
- # Make sure you're within a configured project
861
+ # 确保你在已配置的项目中
979
862
  cd /path/to/your/project
980
863
  ais use <account>
981
864
 
982
- # Then try from subdirectory
865
+ # 然后从子目录尝试
983
866
  cd src/
984
- ais current # Should show your account
867
+ ais current # 应该显示你的账户
868
+ ```
869
+
870
+ ### MCP (Model Context Protocol) 集成
871
+
872
+ AIS 支持全局管理 MCP 服务器并按项目启用。MCP 服务器为 Claude Code 扩展额外的工具和功能。
873
+
874
+ 你可以通过 **CLI 命令**和 **Web UI** 两种方式管理 MCP 服务器。
875
+
876
+ #### Web UI 管理(推荐)
877
+
878
+ 管理 MCP 服务器最简单的方式是通过 Web UI:
879
+
880
+ ```bash
881
+ ais ui
882
+ ```
883
+
884
+ 然后点击 **"MCP 服务器"** 标签页:
885
+
886
+ **功能:**
887
+ - ✅ **添加 MCP 服务器**:点击"+ 添加 MCP 服务器"添加新服务器
888
+ - 选择服务器类型:stdio、sse 或 http
889
+ - 填写配置(命令、URL、环境变量等)
890
+ - 添加描述便于识别
891
+ - ✅ **编辑服务器**:点击"编辑"修改现有服务器配置
892
+ - ✅ **测试连接**:点击"测试连接"验证服务器可用性
893
+ - ✅ **启用/禁用**:一键切换当前项目的服务器状态
894
+ - ✅ **搜索和筛选**:快速按名称或类型查找服务器
895
+ - ✅ **删除服务器**:删除不再需要的服务器
896
+ - ✅ **同步配置**:点击"同步配置"同步到 Claude Code
897
+
898
+ **优势:**
899
+ - 直观的可视化界面
900
+ - 实时验证
901
+ - 无需记忆命令语法
902
+ - 一目了然查看所有服务器
903
+ - 状态指示器(已启用/未启用)
904
+ - 支持中英文
905
+
906
+ **示例工作流程:**
907
+ 1. 启动 Web UI:`ais ui`
908
+ 2. 点击"MCP 服务器"标签页
909
+ 3. 点击"+ 添加 MCP 服务器"
910
+ 4. 选择类型:"stdio"
911
+ 5. 输入命令:"npx"
912
+ 6. 输入参数:"@modelcontextprotocol/server-filesystem,/path"
913
+ 7. 点击"保存"
914
+ 8. 点击"测试连接"验证
915
+ 9. 点击"启用"为当前项目启用
916
+
917
+ #### CLI 管理
918
+
919
+ 你也可以通过 CLI 命令管理 MCP 服务器:
920
+
921
+ ##### 添加 MCP 服务器
922
+
923
+ 交互式添加新的 MCP 服务器:
924
+
925
+ ```bash
926
+ ais mcp add filesystem
927
+ ```
928
+
929
+ 你将被提示配置:
930
+ - **服务器类型**:stdio、sse 或 http
931
+ - **命令和参数**(stdio 类型)
932
+ - **URL**(sse/http 类型)
933
+ - **环境变量**(可选)
934
+ - **请求头**(sse/http 可选)
935
+ - **描述**(可选)
936
+
937
+ **示例:添加 stdio MCP 服务器**
938
+ ```bash
939
+ $ ais mcp add filesystem
940
+ ? 选择 MCP 服务器类型: stdio
941
+ ? 输入命令: npx
942
+ ? 输入参数(逗号分隔): @modelcontextprotocol/server-filesystem,/Users/user/workspace
943
+ ? 添加环境变量? 是
944
+ ? 环境变量 (KEY=VALUE): ALLOWED_PATHS=/Users/user/workspace
945
+ ? 添加另一个? 否
946
+ ? 输入描述: 文件系统访问 MCP 服务器
947
+ ✓ MCP 服务器 'filesystem' 添加成功!
948
+ ```
949
+
950
+ ##### 列出 MCP 服务器
951
+
952
+ 查看所有配置的 MCP 服务器:
953
+
954
+ ```bash
955
+ ais mcp list
956
+ ```
957
+
958
+ 输出显示服务器名称、类型、启用状态和描述。
959
+
960
+ ##### 为项目启用 MCP 服务器
961
+
962
+ 为当前项目启用 MCP 服务器:
963
+
964
+ ```bash
965
+ cd ~/my-project
966
+ ais mcp enable filesystem
967
+ ```
968
+
969
+ 这将:
970
+ 1. 将服务器添加到项目的启用列表
971
+ 2. 更新 `.claude/settings.local.json` 的 MCP 配置
972
+ 3. 使 MCP 服务器在此项目中对 Claude Code 可用
973
+
974
+ ##### 管理 MCP 服务器
975
+
976
+ ```bash
977
+ # 显示 MCP 服务器详情
978
+ ais mcp show filesystem
979
+
980
+ # 更新 MCP 服务器配置
981
+ ais mcp update filesystem
982
+
983
+ # 为当前项目禁用 MCP 服务器
984
+ ais mcp disable filesystem
985
+
986
+ # 显示当前项目已启用的 MCP 服务器
987
+ ais mcp enabled
988
+
989
+ # 同步 MCP 配置到 Claude Code
990
+ ais mcp sync
991
+
992
+ # 删除 MCP 服务器
993
+ ais mcp remove filesystem
985
994
  ```
986
995
 
987
- ## Contributing
996
+ ## 贡献
988
997
 
989
- Contributions are welcome! Feel free to:
990
- - Report bugs
991
- - Suggest new features
992
- - Submit pull requests
998
+ 欢迎贡献!你可以:
999
+ - 报告 bug
1000
+ - 建议新功能
1001
+ - 提交 pull request
993
1002
 
994
- ## License
1003
+ ## 许可证
995
1004
 
996
- MIT License - feel free to use this tool in your projects!
1005
+ MIT License - 欢迎在你的项目中使用此工具!
997
1006
 
998
- ## Changelog
1007
+ ## 更新日志
999
1008
 
1000
1009
  ### v1.7.0
1001
- - **MCP Web UI Management**:
1002
- - Complete MCP server management through Web UI
1003
- - Tab navigation system (Accounts / MCP Servers)
1004
- - Add, edit, delete MCP servers with intuitive interface
1005
- - Test MCP server connections
1006
- - Enable/disable servers per project with one click
1007
- - Search and filter functionality
1008
- - Real-time validation and status indicators
1009
- - Full internationalization (Chinese/English)
1010
- - **MCP CLI Integration**:
1011
- - Global MCP server management with `ais mcp` commands
1012
- - Project-level MCP server enable/disable functionality
1013
- - Support for stdio, sse, and http MCP server types
1014
- - Automatic Claude Code configuration generation with MCP servers
1015
- - Commands: `ais mcp add`, `ais mcp list`, `ais mcp show`, `ais mcp update`, `ais mcp remove`
1016
- - Project commands: `ais mcp enable`, `ais mcp disable`, `ais mcp enabled`, `ais mcp sync`
1017
- - Interactive MCP server configuration with validation
1018
- - Environment variables and headers support for MCP servers
1019
- - **Bug Fixes**:
1020
- - Fixed account data not showing after adding tabs
1021
- - Fixed "switchTab is not defined" error
1022
- - Fixed incorrect search result messages
1023
- - **Improvements**:
1024
- - Better user experience with clearer messages
1025
- - Modern JavaScript practices (event listeners)
1026
- - Improved code quality and maintainability
1027
- - 32 automated tests all passing
1010
+ - **MCP Web UI 管理**:
1011
+ - 通过 Web UI 完整管理 MCP 服务器
1012
+ - 标签页导航系统(账号管理 / MCP 服务器)
1013
+ - 直观界面添加、编辑、删除 MCP 服务器
1014
+ - 测试 MCP 服务器连接
1015
+ - 一键启用/禁用项目级服务器
1016
+ - 搜索和筛选功能
1017
+ - 实时验证和状态指示器
1018
+ - 完整的中英文支持
1019
+ - **MCP CLI 集成**:
1020
+ - 使用 `ais mcp` 命令全局管理 MCP 服务器
1021
+ - 项目级 MCP 服务器启用/禁用功能
1022
+ - 支持 stdiosse http MCP 服务器类型
1023
+ - 自动生成 Claude Code MCP 配置
1024
+ - 命令:`ais mcp add`、`ais mcp list`、`ais mcp show`、`ais mcp update`、`ais mcp remove`
1025
+ - 项目命令:`ais mcp enable`、`ais mcp disable`、`ais mcp enabled`、`ais mcp sync`
1026
+ - 交互式 MCP 服务器配置,带验证
1027
+ - 支持 MCP 服务器的环境变量和请求头
1028
+ - **Bug 修复**:
1029
+ - 修复添加标签页后账号数据不显示的问题
1030
+ - 修复 "switchTab is not defined" 错误
1031
+ - 修复搜索结果提示信息不正确的问题
1032
+ - **改进**:
1033
+ - 更好的用户体验,提示信息更清晰
1034
+ - 现代 JavaScript 实践(事件监听器)
1035
+ - 改进代码质量和可维护性
1036
+ - 32 个自动化测试全部通过
1028
1037
 
1029
1038
  ### v1.6.0
1030
- - **CCR (Claude Code Router) Integration**:
1031
- - Added full support for Claude Code Router
1032
- - Automatic generation of `~/.claude-code-router/config.json` configuration
1033
- - Provider and Router configuration management
1034
- - Automatic CCR Router restart after configuration changes
1035
- - Claude Code integration with local CCR Router endpoint
1036
- - Support for default, background, and think model routing
1037
- - **Web UI Enhancements**:
1038
- - Added account status checking with color-coded indicators (green: available, orange: unstable, red: unavailable)
1039
- - Status results are saved and displayed on page load
1040
- - Real-time status checking with "状态检查" button
1041
- - Improved account card layout with status in top-right corner
1042
- - Enhanced visual feedback during status checks
1043
- - **Configuration Improvements**:
1044
- - CCR accounts automatically generate both CCR and Claude configurations
1045
- - Dynamic port reading from CCR config for Claude integration
1046
- - Better error handling and user feedback
1047
-
1048
- ### v1.5.8
1049
- - **Bilingual Support (双语支持)**:
1050
- - All CLI commands now display both English and Chinese text (所有 CLI 命令现在同时显示中英文)
1051
- - Help messages, prompts, and output messages are bilingual (帮助信息、提示和输出消息都支持双语)
1052
- - Better user experience for Chinese-speaking users (为中文用户提供更好的使用体验)
1053
- - No configuration needed - works out of the box (无需配置 - 开箱即用)
1054
- - Uses parentheses format for better clarity: `English text (中文)` (使用括号格式更清晰)
1039
+ - **CCR (Claude Code Router) 集成**:
1040
+ - 完整支持 Claude Code Router
1041
+ - 自动生成 `~/.claude-code-router/config.json` 配置
1042
+ - Provider Router 配置管理
1043
+ - 配置更改后自动重启 CCR Router
1044
+ - Claude Code 与本地 CCR Router 端点集成
1045
+ - 支持 defaultbackground think 模型路由
1046
+ - **Web UI 增强**:
1047
+ - 添加账户状态检查,带颜色指示器(绿色:可用,橙色:不稳定,红色:不可用)
1048
+ - 状态结果会保存并在页面加载时显示
1049
+ - 实时状态检查,带"状态检查"按钮
1050
+ - 改进账户卡片布局,状态显示在右上角
1051
+ - 状态检查期间增强视觉反馈
1052
+ - **配置改进**:
1053
+ - CCR 账户自动生成 CCR Claude 两种配置
1054
+ - CCR 配置动态读取端口用于 Claude 集成
1055
+ - 更好的错误处理和用户反馈
1055
1056
 
1056
1057
  ### v1.5.7
1057
- - **Droids Integration**:
1058
- - Added full support for Droids AI assistant
1059
- - Automatic generation of `.droids/config.json` configuration
1060
- - Simple model configuration for Droids accounts
1061
- - Interactive session command: `droid`
1062
- - Enhanced `ais doctor` command with Droids configuration detection
1063
- - **UI Enhancements**:
1064
- - Added type filter dropdown for quick account filtering
1065
- - Color-coded account cards by type (Claude: blue, Codex: purple, Droids: green, Other: orange)
1066
- - Left border color indicators on account cards
1067
- - Improved visual hierarchy and user experience
1068
- - **Model Configuration Improvements**:
1069
- - Separated model configuration for different account types
1070
- - Claude: Complex model groups with multiple model settings
1071
- - Codex/Droids: Simple model field for straightforward configuration
1072
- - All model settings moved to collapsible "Advanced Configuration" section
1073
- - **Better User Guidance**:
1074
- - Enhanced `ais use` command with clear next-step instructions
1075
- - Type-specific usage examples for each AI assistant
1076
- - Interactive mode prompts instead of one-time command examples
1058
+ - **Droids 集成**:
1059
+ - 完整支持 Droids AI 助手
1060
+ - 自动生成 `.droids/config.json` 配置文件
1061
+ - Droids 账户的简单模型配置
1062
+ - 交互会话命令:`droid`
1063
+ - 增强 `ais doctor` 命令,支持 Droids 配置检测
1064
+ - **UI 增强**:
1065
+ - 添加类型筛选下拉框,快速过滤账户
1066
+ - 按类型为账户卡片着色(Claude: 蓝色,Codex: 紫色,Droids: 绿色,Other: 橙色)
1067
+ - 账户卡片左侧边框颜色指示器
1068
+ - 改进视觉层次和用户体验
1069
+ - **模型配置改进**:
1070
+ - 为不同账户类型分离模型配置
1071
+ - Claude: 复杂的模型组,支持多个模型设置
1072
+ - Codex/Droids: 简单的模型字段,配置更直观
1073
+ - 所有模型设置移至可折叠的"高级配置"区域
1074
+ - **更好的用户指引**:
1075
+ - 增强 `ais use` 命令,提供清晰的下一步操作说明
1076
+ - 为每个 AI 助手提供特定类型的使用示例
1077
+ - 交互模式提示而非一次性命令示例
1077
1078
 
1078
1079
  ### v1.5.1
1079
- - **Codex Integration Enhancements**:
1080
- - Added full support for Codex CLI with profile-based configuration
1081
- - Automatic generation of `~/.codex/config.toml` profiles for Codex accounts
1082
- - Project-level `.codex-profile` file for easy profile reference
1083
- - Smart API URL handling: automatically adds `/v1` path if missing
1084
- - Uses OpenAI-compatible `wire_api = "chat"` format
1085
- - Prevents Cloudflare 400 errors with correct configuration
1086
- - **Improved User Experience**:
1087
- - Configuration tips displayed when adding Codex accounts
1088
- - Usage instructions shown after account creation
1089
- - Enhanced `ais doctor` command with Codex configuration detection
1090
- - Better duplicate profile cleanup in TOML files
1091
- - **Bug Fixes**:
1092
- - Fixed duplicate profile key errors in Codex configuration
1093
- - Improved profile deletion regex patterns
1094
- - Separated Claude and Codex configuration generation logic
1095
- - **Documentation**:
1096
- - Comprehensive Codex integration guide in README
1097
- - Troubleshooting section for common Codex issues
1098
- - Examples for multi-project Codex usage
1080
+ - **Codex 集成增强**:
1081
+ - 完整支持 Codex CLI profile 配置
1082
+ - 自动为 Codex 账户生成 `~/.codex/config.toml` profiles
1083
+ - 项目级 `.codex-profile` 文件方便引用 profile
1084
+ - 智能 API URL 处理:自动添加 `/v1` 路径(如果缺少)
1085
+ - 使用 OpenAI 兼容的 `wire_api = "chat"` 格式
1086
+ - 通过正确配置防止 Cloudflare 400 错误
1087
+ - **用户体验改进**:
1088
+ - 添加 Codex 账户时显示配置提示
1089
+ - 账户创建后显示使用说明
1090
+ - 增强 `ais doctor` 命令,支持 Codex 配置检测
1091
+ - 改进 TOML 文件中的重复 profile 清理
1092
+ - **Bug 修复**:
1093
+ - 修复 Codex 配置中的重复 profile key 错误
1094
+ - 改进 profile 删除的正则表达式模式
1095
+ - 分离 Claude Codex 配置生成逻辑
1096
+ - **文档更新**:
1097
+ - README 中添加全面的 Codex 集成指南
1098
+ - 常见 Codex 问题的故障排除部分
1099
+ - 多项目 Codex 使用示例
1099
1100
 
1100
1101
  ### v1.5.0
1101
- - **Model Groups Management System**:
1102
- - Refactored model configuration to use flexible Model Groups
1103
- - Each account can have multiple model groups with different configurations
1104
- - Quick switching between model groups with automatic Claude config updates
1105
- - **New CLI Commands**:
1106
- - `ais model list/ls` - List all model groups for current account
1107
- - `ais model add [name]` - Create a new model group
1108
- - `ais model use <name>` - Switch to a different model group
1109
- - `ais model remove/rm [name]` - Remove a model group
1110
- - `ais model show [name]` - Show model group configuration
1111
- - **Enhancements**:
1112
- - Enhanced account creation workflow with model group support
1113
- - Web UI updated with collapsible model group management
1114
- - Fixed model configuration not switching when changing accounts
1115
- - Better color consistency in CLI output
1116
- - DEFAULT_MODEL auto-fills other model configs when not specified
1117
- - **Backward Compatibility**:
1118
- - Maintains support for old modelConfig structure
1119
- - Existing accounts continue to work without migration
1102
+ - **模型组管理系统**:
1103
+ - 重构模型配置为灵活的模型组(Model Groups)系统
1104
+ - 每个账户可以拥有多个不同配置的模型组
1105
+ - 快速切换模型组,自动更新 Claude 配置
1106
+ - **新增 CLI 命令**:
1107
+ - `ais model list/ls` - 列出当前账户的所有模型组
1108
+ - `ais model add [name]` - 创建新的模型组
1109
+ - `ais model use <name>` - 切换到不同的模型组
1110
+ - `ais model remove/rm [name]` - 删除模型组
1111
+ - `ais model show [name]` - 显示模型组配置详情
1112
+ - **功能增强**:
1113
+ - 增强账户创建流程,支持模型组配置
1114
+ - Web UI 更新,支持可折叠的模型组管理界面
1115
+ - 修复切换账户时模型配置不更新的问题
1116
+ - 优化 CLI 输出颜色一致性
1117
+ - DEFAULT_MODEL 自动填充其他未设置的模型配置
1118
+ - **向后兼容**:
1119
+ - 保持对旧 modelConfig 结构的支持
1120
+ - 现有账户无需迁移即可继续使用
1120
1121
 
1121
1122
  ### v1.4.0
1122
- - **Added Web UI Management Interface**:
1123
- - Modern single-page application with dark/light theme support
1124
- - Bilingual support (English/Chinese), default English
1125
- - Visual account management: CRUD operations at a glance
1126
- - Import/Export functionality: batch manage account configurations
1127
- - Real-time search and filter accounts
1128
- - Custom environment variables configuration
1129
- - Theme follows system settings automatically
1130
- - iOS-style theme toggle switch
1131
- - **Port Optimization**:
1132
- - UI server uses random high ports (49152-65535)
1133
- - Automatic port conflict detection and retry
1134
- - **UI Improvements**:
1135
- - Fixed inconsistent button positioning in account cards
1136
- - Buttons now consistently fixed at card bottom
1137
- - **Removed Organization ID**:
1138
- - Simplified account configuration process
1139
- - Removed organization ID option from CLI and UI
1123
+ - **添加 Web UI 管理界面**:
1124
+ - 现代化单页面应用,支持深色/浅色主题
1125
+ - 中英文双语支持,默认中文
1126
+ - 可视化账号管理:增删改查一目了然
1127
+ - 导入/导出功能:批量管理账号配置
1128
+ - 实时搜索过滤账号
1129
+ - 自定义环境变量配置
1130
+ - 主题自动跟随系统设置
1131
+ - iOS 风格的主题切换开关
1132
+ - **端口优化**:
1133
+ - UI 服务器使用随机高位端口(49152-65535
1134
+ - 自动检测端口冲突并重试
1135
+ - **界面改进**:
1136
+ - 修复账号卡片按钮位置不一致问题
1137
+ - 按钮始终固定在卡片底部
1138
+ - **移除组织 ID 配置**:
1139
+ - 简化账号配置流程
1140
+ - 移除 CLI UI 中的组织 ID 选项
1140
1141
 
1141
1142
  ### v1.3.0
1142
- - **Improved custom environment variables input**:
1143
- - One-line `KEY=VALUE` format input (e.g., `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
1144
- - Real-time display of added variables during configuration
1145
- - Press Enter without input to finish adding variables
1146
- - Better error messages and user guidance
1147
- - Enhanced documentation with detailed examples and usage instructions
1143
+ - **改进自定义环境变量输入**:
1144
+ - 支持单行 `KEY=VALUE` 格式输入(例如:`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
1145
+ - 配置过程中实时显示已添加的变量
1146
+ - 直接按回车即可完成变量添加
1147
+ - 更清晰的错误提示和用户指引
1148
+ - 增强文档,添加详细的示例和使用说明
1148
1149
 
1149
1150
  ### v1.2.0
1150
- - Added custom environment variables support for accounts
1151
- - Added `ais doctor` command for configuration diagnostics
1152
- - Enhanced `ais help` with all new features
1153
- - Updated installation documentation (npm as recommended method)
1154
- - Improved PATH configuration instructions
1155
- - Display custom env variables in `ais list` and `ais info`
1151
+ - 添加账户自定义环境变量支持
1152
+ - 添加 `ais doctor` 命令用于配置诊断
1153
+ - 增强 `ais help` 显示所有新功能
1154
+ - 更新安装文档(npm 作为推荐安装方式)
1155
+ - 改进 PATH 配置说明
1156
+ - `ais list` `ais info` 中显示自定义环境变量
1156
1157
 
1157
1158
  ### v1.1.0
1158
- - Added smart directory detection (works in any subdirectory)
1159
- - Automatic Claude Code `.claude/settings.local.json` generation
1160
- - Project root display in `ais info` command
1161
- - Improved cross-platform compatibility
1159
+ - 添加智能目录检测(在任何子目录中工作)
1160
+ - 自动生成 Claude Code `.claude/settings.local.json` 配置
1161
+ - `ais info` 命令中显示项目根目录
1162
+ - 改进跨平台兼容性
1162
1163
 
1163
1164
  ### v1.0.0
1164
- - Initial release
1165
- - Basic account management (add, list, remove)
1166
- - Project-specific account switching
1167
- - Cross-platform support
1168
- - Interactive CLI prompts
1169
- - Account export functionality
1170
-
1171
- ## Future Enhancements
1172
-
1173
- Potential features for future versions:
1174
- - Account validation
1175
- - Bulk import/export
1176
- - Account templates
1177
- - Environment variable export
1178
- - Account sharing (encrypted)
1179
- - Cloud sync support
1180
- - Account usage statistics
1181
-
1182
- ## Support
1183
-
1184
- If you encounter any issues or have questions:
1185
- 1. Check the troubleshooting section
1186
- 2. Review existing issues
1187
- 3. Create a new issue with detailed information
1165
+ - 初始版本
1166
+ - 基本账户管理(添加、列出、删除)
1167
+ - 项目级账户切换
1168
+ - 跨平台支持
1169
+ - 交互式 CLI 提示
1170
+ - 账户导出功能
1171
+
1172
+ ## 未来增强
1173
+
1174
+ 未来版本的潜在功能:
1175
+ - 账户验证
1176
+ - 批量导入/导出
1177
+ - 账户模板
1178
+ - 环境变量导出
1179
+ - 账户共享(加密)
1180
+ - 云同步支持
1181
+ - 账户使用统计
1182
+
1183
+ ## 支持
1184
+
1185
+ 如果遇到任何问题或有疑问:
1186
+ 1. 查看故障排除部分
1187
+ 2. 查看现有 issues
1188
+ 3. 创建新 issue 并提供详细信息
1188
1189
 
1189
1190
  ---
1190
1191
 
1191
- **Happy coding with your AI assistants!** 🤖
1192
+ **祝你与 AI 助手编码愉快!** 🤖