ai-account-switch 1.2.0 → 1.4.0

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.
@@ -0,0 +1,109 @@
1
+ # Windows Installation Guide
2
+
3
+ This guide provides detailed instructions for installing AI Account Switch (ais) on Windows.
4
+
5
+ ## Quick Install (Recommended)
6
+
7
+ ### Method 1: One-Line PowerShell Install
8
+
9
+ Open PowerShell and run:
10
+
11
+ ```powershell
12
+ irm https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/install.ps1 | iex
13
+ ```
14
+
15
+ This will:
16
+ - Download the latest version
17
+ - Install to `%LOCALAPPDATA%\ais` (no admin rights required)
18
+ - Automatically add to your PATH
19
+ - Verify the installation
20
+
21
+ ### Method 2: Download and Run Installer
22
+
23
+ 1. Download `install.ps1` or `install.bat` from the [Releases page](https://github.com/yourusername/ai-agent-user-swith/releases)
24
+ 2. Right-click `install.ps1` → "Run with PowerShell"
25
+ - Or double-click `install.bat`
26
+
27
+ ### System-Wide Installation
28
+
29
+ If you want to install for all users (requires Administrator):
30
+
31
+ ```powershell
32
+ # Run PowerShell as Administrator
33
+ irm https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/install.ps1 | iex -SystemWide
34
+ ```
35
+
36
+ Or run the downloaded `install.ps1` with the `-SystemWide` parameter:
37
+
38
+ ```powershell
39
+ .\install.ps1 -SystemWide
40
+ ```
41
+
42
+ This installs to `C:\Program Files\ais` instead of the user directory.
43
+
44
+ ## Manual Installation
45
+
46
+ If you prefer to install manually, see the main [README.md](README.md) for detailed instructions.
47
+
48
+ ## Verify Installation
49
+
50
+ After installation, open a **new terminal window** and run:
51
+
52
+ ```cmd
53
+ ais --version
54
+ ```
55
+
56
+ You should see the version number displayed.
57
+
58
+ ## Troubleshooting
59
+
60
+ ### Command not found
61
+
62
+ If `ais` command is not found after installation:
63
+
64
+ 1. Close and reopen your terminal (PATH changes require a new session)
65
+ 2. Verify the installation directory is in your PATH:
66
+ ```cmd
67
+ echo %PATH%
68
+ ```
69
+ 3. Re-run the installer
70
+
71
+ ### Permission Denied
72
+
73
+ If you get permission errors:
74
+
75
+ 1. Run PowerShell as Administrator
76
+ 2. Or use the user-local installation (default, no admin required)
77
+
78
+ ### Antivirus Blocking
79
+
80
+ Some antivirus software may flag the executable. This is a false positive. You can:
81
+
82
+ 1. Add an exception in your antivirus software
83
+ 2. Download and verify the file manually from GitHub Releases
84
+ 3. Install from npm instead: `npm install -g ai-account-switch`
85
+
86
+ ## Uninstallation
87
+
88
+ To uninstall ais:
89
+
90
+ 1. Remove the installation directory:
91
+ ```cmd
92
+ rmdir /s "%LOCALAPPDATA%\ais"
93
+ ```
94
+ Or for system-wide installation:
95
+ ```cmd
96
+ rmdir /s "C:\Program Files\ais"
97
+ ```
98
+
99
+ 2. Remove from PATH:
100
+ - Open "Edit the system environment variables"
101
+ - Click "Environment Variables"
102
+ - Find "Path" and remove the ais directory entry
103
+
104
+ ## Alternative Installation Methods
105
+
106
+ - **npm**: `npm install -g ai-account-switch` (requires Node.js)
107
+ - **From source**: Clone the repository and run `npm link`
108
+
109
+ See [README.md](README.md) for more details.
package/README.md CHANGED
@@ -41,22 +41,147 @@ export PATH="$PATH:$(npm config get prefix)/bin"
41
41
 
42
42
  Download the latest release for your platform from the [Releases page](https://github.com/yourusername/ai-agent-user-swith/releases):
43
43
 
44
- **macOS:**
45
- ```bash
46
- # Download and install
47
- curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-macos -o /usr/local/bin/ais
48
- chmod +x /usr/local/bin/ais
44
+ **Windows (Automatic Installation - Recommended):**
45
+
46
+ Use the automated installer that downloads the latest version and adds it to PATH automatically:
47
+
48
+ **Method 1: PowerShell (Recommended)**
49
+ ```powershell
50
+ # Run in PowerShell (Administrator recommended for system-wide install)
51
+ irm https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/install.ps1 | iex
49
52
  ```
50
53
 
51
- **Linux:**
52
- ```bash
53
- # Download and install
54
- curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-linux -o /usr/local/bin/ais
55
- chmod +x /usr/local/bin/ais
54
+ **Method 2: Download and Run Installer Script**
55
+ 1. Download `install.ps1` or `install.bat` from the [Releases page](https://github.com/yourusername/ai-agent-user-swith/releases)
56
+ 2. Right-click on `install.ps1` and select "Run with PowerShell"
57
+ - Or run `install.bat` by double-clicking it
58
+
59
+ The installer will:
60
+ - Download the latest `ais-win.exe`
61
+ - Install to `%LOCALAPPDATA%\ais` (user install) or `C:\Program Files\ais` (system install)
62
+ - Automatically add to PATH
63
+ - Verify the installation
64
+
65
+ After installation, open a **new terminal** and verify:
66
+ ```cmd
67
+ ais --version
56
68
  ```
57
69
 
58
- **Windows:**
59
- Download `ais-win.exe` from the releases page and add it to your PATH.
70
+ **Windows (Manual Installation):**
71
+
72
+ If you prefer manual installation:
73
+
74
+ 1. Download `ais-win.exe` from the [Releases page](https://github.com/yourusername/ai-agent-user-swith/releases)
75
+
76
+ 2. Choose an installation location (recommended: `C:\Program Files\ais\`)
77
+ ```cmd
78
+ mkdir "C:\Program Files\ais"
79
+ ```
80
+
81
+ 3. Move the downloaded file to the installation directory and rename it:
82
+ ```cmd
83
+ move "%USERPROFILE%\Downloads\ais-win.exe" "C:\Program Files\ais\ais.exe"
84
+ ```
85
+
86
+ 4. Add to PATH:
87
+
88
+ **Method 1: Using System Settings (Recommended)**
89
+ - Open Start Menu and search for "Environment Variables"
90
+ - Click "Edit the system environment variables"
91
+ - Click "Environment Variables..." button
92
+ - Under "System variables" (or "User variables" for current user only), find and select "Path"
93
+ - Click "Edit..."
94
+ - Click "New"
95
+ - Add `C:\Program Files\ais`
96
+ - Click "OK" on all dialogs
97
+ - **Restart your terminal** for changes to take effect
98
+
99
+ **Method 2: Using PowerShell (Administrator)**
100
+ ```powershell
101
+ # Add to User PATH
102
+ [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\ais", "User")
103
+
104
+ # Or add to System PATH (requires admin)
105
+ [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\ais", "Machine")
106
+ ```
107
+
108
+ **Method 3: Using Command Prompt (Administrator)**
109
+ ```cmd
110
+ setx PATH "%PATH%;C:\Program Files\ais"
111
+ ```
112
+
113
+ 5. Verify installation:
114
+ ```cmd
115
+ # Open a NEW terminal window
116
+ ais --version
117
+ ```
118
+
119
+ **Note**: If you prefer a user-local installation without admin rights, use `%LOCALAPPDATA%\ais` instead:
120
+ ```cmd
121
+ mkdir "%LOCALAPPDATA%\ais"
122
+ move "%USERPROFILE%\Downloads\ais-win.exe" "%LOCALAPPDATA%\ais\ais.exe"
123
+ # Then add %LOCALAPPDATA%\ais to your User PATH
124
+ ```
125
+
126
+ **macOS:**
127
+
128
+ 1. Download and install to `/usr/local/bin`:
129
+ ```bash
130
+ curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-macos -o /usr/local/bin/ais
131
+ chmod +x /usr/local/bin/ais
132
+ ```
133
+
134
+ 2. If you don't have write permissions for `/usr/local/bin`, use sudo:
135
+ ```bash
136
+ sudo curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-macos -o /usr/local/bin/ais
137
+ sudo chmod +x /usr/local/bin/ais
138
+ ```
139
+
140
+ 3. Alternatively, install to your user directory (no sudo required):
141
+ ```bash
142
+ mkdir -p ~/.local/bin
143
+ curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-macos -o ~/.local/bin/ais
144
+ chmod +x ~/.local/bin/ais
145
+
146
+ # Add to PATH if not already there
147
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
148
+ source ~/.zshrc
149
+ ```
150
+
151
+ 4. Verify installation:
152
+ ```bash
153
+ ais --version
154
+ ```
155
+
156
+ **Linux:**
157
+
158
+ 1. Download and install to `/usr/local/bin`:
159
+ ```bash
160
+ curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-linux -o /usr/local/bin/ais
161
+ chmod +x /usr/local/bin/ais
162
+ ```
163
+
164
+ 2. If you don't have write permissions for `/usr/local/bin`, use sudo:
165
+ ```bash
166
+ sudo curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-linux -o /usr/local/bin/ais
167
+ sudo chmod +x /usr/local/bin/ais
168
+ ```
169
+
170
+ 3. Alternatively, install to your user directory (no sudo required):
171
+ ```bash
172
+ mkdir -p ~/.local/bin
173
+ curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-linux -o ~/.local/bin/ais
174
+ chmod +x ~/.local/bin/ais
175
+
176
+ # Add to PATH if not already there
177
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
178
+ source ~/.bashrc
179
+ ```
180
+
181
+ 4. Verify installation:
182
+ ```bash
183
+ ais --version
184
+ ```
60
185
 
61
186
  ### Option 3: Install from Source
62
187
 
@@ -114,7 +239,10 @@ You'll be prompted to enter:
114
239
  - Organization ID (optional)
115
240
  - Email (optional)
116
241
  - Description (optional)
117
- - Custom environment variables (optional, e.g., `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
242
+ - Custom environment variables (optional)
243
+ - Enter in `KEY=VALUE` format (e.g., `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
244
+ - The tool will display all added variables before completion
245
+ - Press Enter without input to finish adding variables
118
246
 
119
247
  #### 2. List All Accounts
120
248
 
@@ -232,14 +360,30 @@ This ensures Claude Code CLI automatically uses the correct account for your pro
232
360
 
233
361
  #### Custom Environment Variables
234
362
 
235
- You can add custom environment variables when creating an account. Common examples:
363
+ You can add custom environment variables when creating an account. When prompted, enter them in `KEY=VALUE` format:
364
+
365
+ **Input Format:**
366
+ ```
367
+ ? Environment variable (KEY=VALUE format): CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
368
+ ✓ Added: CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
369
+
370
+ 📋 Current environment variables:
371
+ • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
236
372
 
373
+ ? Add another environment variable? (y/N)
374
+ ```
375
+
376
+ **Common Examples:**
237
377
  - `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` - Disable non-essential network traffic
238
378
  - `HTTP_PROXY=http://proxy.example.com:8080` - Set HTTP proxy
239
379
  - `HTTPS_PROXY=https://proxy.example.com:8080` - Set HTTPS proxy
240
380
  - Any other environment variables needed for your setup
241
381
 
242
- These custom variables are automatically included in the generated `.claude/settings.local.json` file.
382
+ **Features:**
383
+ - One-line input format (`KEY=VALUE`)
384
+ - Real-time display of added variables
385
+ - Press Enter without input to finish
386
+ - Variables are automatically included in `.claude/settings.local.json`
243
387
 
244
388
  ## Examples
245
389
 
@@ -402,6 +546,14 @@ MIT License - feel free to use this tool in your projects!
402
546
 
403
547
  ## Changelog
404
548
 
549
+ ### v1.3.0
550
+ - **Improved custom environment variables input**:
551
+ - One-line `KEY=VALUE` format input (e.g., `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
552
+ - Real-time display of added variables during configuration
553
+ - Press Enter without input to finish adding variables
554
+ - Better error messages and user guidance
555
+ - Enhanced documentation with detailed examples and usage instructions
556
+
405
557
  ### v1.2.0
406
558
  - Added custom environment variables support for accounts
407
559
  - Added `ais doctor` command for configuration diagnostics
package/README_ZH.md CHANGED
@@ -11,7 +11,15 @@
11
11
  - **项目级配置**:每个项目可以使用不同的账户
12
12
  - **智能目录检测**:在项目的任何子目录中都能工作(类似 git)
13
13
  - **Claude Code 集成**:自动生成 `.claude/settings.local.json` 配置文件
14
- - **安全存储**:账户凭证仅存储在本地
14
+ - **Web UI 管理界面**:
15
+ - 🎨 现代化单页面应用,支持深色/浅色主题
16
+ - 🌍 中英文双语支持,一键切换
17
+ - ⚙️ 可视化管理账号:增删改查一目了然
18
+ - 📤 导入/导出功能:批量管理账号配置
19
+ - 🔍 实时搜索过滤账号
20
+ - 💾 自定义环境变量配置
21
+ - 🎯 主题自动跟随系统设置
22
+ - **安全存储**:账户凭证仅存储在本地
15
23
  - **交互式命令行**:所有操作都有易用的交互式提示
16
24
  - **多种账户类型**:支持 Claude、Codex 和其他 AI 服务
17
25
 
@@ -41,22 +49,147 @@ export PATH="$PATH:$(npm config get prefix)/bin"
41
49
 
42
50
  从 [Releases 页面](https://github.com/yourusername/ai-agent-user-swith/releases) 下载适合你平台的最新版本:
43
51
 
44
- **macOS:**
45
- ```bash
46
- # 下载并安装
47
- curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-macos -o /usr/local/bin/ais
48
- chmod +x /usr/local/bin/ais
52
+ **Windows(自动安装 - 推荐):**
53
+
54
+ 使用自动安装程序,它会下载最新版本并自动添加到 PATH:
55
+
56
+ **方法 1:PowerShell(推荐)**
57
+ ```powershell
58
+ # 在 PowerShell 中运行(建议使用管理员权限进行系统级安装)
59
+ irm https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/install.ps1 | iex
49
60
  ```
50
61
 
51
- **Linux:**
52
- ```bash
53
- # 下载并安装
54
- curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-linux -o /usr/local/bin/ais
55
- chmod +x /usr/local/bin/ais
62
+ **方法 2:下载并运行安装脚本**
63
+ 1. 从 [Releases 页面](https://github.com/yourusername/ai-agent-user-swith/releases) 下载 `install.ps1` 或 `install.bat`
64
+ 2. 右键点击 `install.ps1` 并选择"使用 PowerShell 运行"
65
+ - 或双击运行 `install.bat`
66
+
67
+ 安装程序将:
68
+ - 下载最新的 `ais-win.exe`
69
+ - 安装到 `%LOCALAPPDATA%\ais`(用户安装)或 `C:\Program Files\ais`(系统安装)
70
+ - 自动添加到 PATH
71
+ - 验证安装
72
+
73
+ 安装完成后,打开**新的终端**并验证:
74
+ ```cmd
75
+ ais --version
76
+ ```
77
+
78
+ **Windows(手动安装):**
79
+
80
+ 如果你更喜欢手动安装:
81
+
82
+ 1. 从 [Releases 页面](https://github.com/yourusername/ai-agent-user-swith/releases) 下载 `ais-win.exe`
83
+
84
+ 2. 选择安装位置(推荐:`C:\Program Files\ais\`)
85
+ ```cmd
86
+ mkdir "C:\Program Files\ais"
87
+ ```
88
+
89
+ 3. 将下载的文件移动到安装目录并重命名:
90
+ ```cmd
91
+ move "%USERPROFILE%\Downloads\ais-win.exe" "C:\Program Files\ais\ais.exe"
92
+ ```
93
+
94
+ 4. 添加到 PATH:
95
+
96
+ **方法 1:使用系统设置(推荐)**
97
+ - 打开开始菜单,搜索"环境变量"
98
+ - 点击"编辑系统环境变量"
99
+ - 点击"环境变量..."按钮
100
+ - 在"系统变量"(或"用户变量",仅对当前用户有效)下,找到并选择"Path"
101
+ - 点击"编辑..."
102
+ - 点击"新建"
103
+ - 添加 `C:\Program Files\ais`
104
+ - 在所有对话框上点击"确定"
105
+ - **重启终端**使更改生效
106
+
107
+ **方法 2:使用 PowerShell(管理员权限)**
108
+ ```powershell
109
+ # 添加到用户 PATH
110
+ [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\ais", "User")
111
+
112
+ # 或添加到系统 PATH(需要管理员权限)
113
+ [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\ais", "Machine")
114
+ ```
115
+
116
+ **方法 3:使用命令提示符(管理员权限)**
117
+ ```cmd
118
+ setx PATH "%PATH%;C:\Program Files\ais"
119
+ ```
120
+
121
+ 5. 验证安装:
122
+ ```cmd
123
+ # 打开新的终端窗口
124
+ ais --version
125
+ ```
126
+
127
+ **注意**:如果你希望安装到用户目录而不需要管理员权限,可以使用 `%LOCALAPPDATA%\ais`:
128
+ ```cmd
129
+ mkdir "%LOCALAPPDATA%\ais"
130
+ move "%USERPROFILE%\Downloads\ais-win.exe" "%LOCALAPPDATA%\ais\ais.exe"
131
+ # 然后将 %LOCALAPPDATA%\ais 添加到你的用户 PATH
56
132
  ```
57
133
 
58
- **Windows:**
59
- 从 releases 页面下载 `ais-win.exe` 并添加到系统 PATH。
134
+ **macOS:**
135
+
136
+ 1. 下载并安装到 `/usr/local/bin`:
137
+ ```bash
138
+ curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-macos -o /usr/local/bin/ais
139
+ chmod +x /usr/local/bin/ais
140
+ ```
141
+
142
+ 2. 如果你没有 `/usr/local/bin` 的写入权限,使用 sudo:
143
+ ```bash
144
+ sudo curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-macos -o /usr/local/bin/ais
145
+ sudo chmod +x /usr/local/bin/ais
146
+ ```
147
+
148
+ 3. 或者,安装到用户目录(无需 sudo):
149
+ ```bash
150
+ mkdir -p ~/.local/bin
151
+ curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-macos -o ~/.local/bin/ais
152
+ chmod +x ~/.local/bin/ais
153
+
154
+ # 如果还未添加到 PATH,请添加
155
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
156
+ source ~/.zshrc
157
+ ```
158
+
159
+ 4. 验证安装:
160
+ ```bash
161
+ ais --version
162
+ ```
163
+
164
+ **Linux:**
165
+
166
+ 1. 下载并安装到 `/usr/local/bin`:
167
+ ```bash
168
+ curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-linux -o /usr/local/bin/ais
169
+ chmod +x /usr/local/bin/ais
170
+ ```
171
+
172
+ 2. 如果你没有 `/usr/local/bin` 的写入权限,使用 sudo:
173
+ ```bash
174
+ sudo curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-linux -o /usr/local/bin/ais
175
+ sudo chmod +x /usr/local/bin/ais
176
+ ```
177
+
178
+ 3. 或者,安装到用户目录(无需 sudo):
179
+ ```bash
180
+ mkdir -p ~/.local/bin
181
+ curl -L https://github.com/yourusername/ai-agent-user-swith/releases/latest/download/ais-linux -o ~/.local/bin/ais
182
+ chmod +x ~/.local/bin/ais
183
+
184
+ # 如果还未添加到 PATH,请添加
185
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
186
+ source ~/.bashrc
187
+ ```
188
+
189
+ 4. 验证安装:
190
+ ```bash
191
+ ais --version
192
+ ```
60
193
 
61
194
  ### 方式 3:从源码安装
62
195
 
@@ -89,6 +222,7 @@ npm link
89
222
  | `ais paths` | - | 显示配置文件路径 |
90
223
  | `ais doctor` | - | 诊断 Claude Code 配置问题 |
91
224
  | `ais export <name>` | - | 导出账户为 JSON 格式 |
225
+ | `ais ui` | - | 启动 Web UI 管理界面 |
92
226
  | `ais help` | - | 显示帮助信息 |
93
227
  | `ais --version` | - | 显示版本号 |
94
228
 
@@ -112,10 +246,12 @@ ais add my-claude-account
112
246
  - 账户类型(Claude、Codex、其他)
113
247
  - API Key
114
248
  - API URL(可选)
115
- - Organization ID(可选)
116
249
  - Email(可选)
117
250
  - 描述(可选)
118
- - 自定义环境变量(可选,例如 `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
251
+ - 自定义环境变量(可选)
252
+ - 使用 `KEY=VALUE` 格式输入(例如:`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
253
+ - 工具会在完成前显示所有已添加的变量
254
+ - 直接按回车(不输入)即可完成添加
119
255
 
120
256
  #### 2. 列出所有账户
121
257
 
@@ -162,7 +298,40 @@ ais current
162
298
 
163
299
  **注意**:这些命令可以在项目的任何子目录中使用,类似 git 命令的工作方式。
164
300
 
165
- #### 5. 删除账户
301
+ #### 5. 使用 Web UI 管理界面
302
+
303
+ 启动可视化管理界面:
304
+
305
+ ```bash
306
+ ais ui
307
+ ```
308
+
309
+ 这将在浏览器中打开 Web UI,服务器会自动使用一个随机的高位端口(49152-65535)。如果端口被占用,会自动尝试其他端口,提供以下功能:
310
+
311
+ **界面特性:**
312
+ - **账号管理**: 可视化的卡片界面,显示所有账号信息
313
+ - **添加/编辑账号**: 友好的表单界面,支持所有配置项
314
+ - **删除账号**: 一键删除,带确认提示
315
+ - **搜索过滤**: 实时搜索账号名称、邮箱或类型
316
+ - **批量操作**:
317
+ - 导出所有账号为 JSON 文件
318
+ - 从 JSON 文件导入账号(支持覆盖选项)
319
+ - **主题切换**:
320
+ - iOS 风格的 Switch 开关
321
+ - 支持浅色和深色主题
322
+ - 默认跟随系统主题设置
323
+ - **多语言支持**:
324
+ - 中文/英文一键切换
325
+ - 界面默认使用中文
326
+ - 语言设置自动保存
327
+
328
+ **UI 使用提示:**
329
+ - 所有修改实时同步到本地配置
330
+ - 关闭浏览器窗口不影响数据
331
+ - 按 `Ctrl+C` 停止 Web 服务器
332
+ - 支持在任何浏览器中使用
333
+
334
+ #### 6. 删除账户
166
335
 
167
336
  删除不再需要的账户:
168
337
 
@@ -233,7 +402,6 @@ ais export my-claude-account
233
402
  "env": {
234
403
  "ANTHROPIC_AUTH_TOKEN": "your-api-key",
235
404
  "ANTHROPIC_BASE_URL": "your-api-url",
236
- "ANTHROPIC_ORGANIZATION_ID": "your-org-id",
237
405
  "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
238
406
  },
239
407
  "permissions": {
@@ -248,14 +416,30 @@ ais export my-claude-account
248
416
 
249
417
  #### 自定义环境变量
250
418
 
251
- 在创建账户时可以添加自定义环境变量。常见示例:
419
+ 在创建账户时可以添加自定义环境变量。在提示时,使用 `KEY=VALUE` 格式输入:
420
+
421
+ **输入格式:**
422
+ ```
423
+ ? Environment variable (KEY=VALUE format): CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
424
+ ✓ Added: CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
425
+
426
+ 📋 Current environment variables:
427
+ • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
252
428
 
429
+ ? Add another environment variable? (y/N)
430
+ ```
431
+
432
+ **常见示例:**
253
433
  - `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` - 禁用非必要网络流量
254
434
  - `HTTP_PROXY=http://proxy.example.com:8080` - 设置 HTTP 代理
255
435
  - `HTTPS_PROXY=https://proxy.example.com:8080` - 设置 HTTPS 代理
256
436
  - 其他你需要的环境变量
257
437
 
258
- 这些自定义变量会自动包含在生成的 `.claude/settings.local.json` 文件中。
438
+ **功能特性:**
439
+ - 单行输入格式(`KEY=VALUE`)
440
+ - 实时显示已添加的变量
441
+ - 直接按回车即可完成
442
+ - 变量会自动包含在 `.claude/settings.local.json` 文件中
259
443
 
260
444
  ## 使用示例
261
445
 
@@ -437,6 +621,34 @@ MIT License - 欢迎在你的项目中使用此工具!
437
621
 
438
622
  ## 更新日志
439
623
 
624
+ ### v1.4.0
625
+ - **添加 Web UI 管理界面**:
626
+ - 现代化单页面应用,支持深色/浅色主题
627
+ - 中英文双语支持,默认中文
628
+ - 可视化账号管理:增删改查一目了然
629
+ - 导入/导出功能:批量管理账号配置
630
+ - 实时搜索过滤账号
631
+ - 自定义环境变量配置
632
+ - 主题自动跟随系统设置
633
+ - iOS 风格的主题切换开关
634
+ - **端口优化**:
635
+ - UI 服务器使用随机高位端口(49152-65535)
636
+ - 自动检测端口冲突并重试
637
+ - **界面改进**:
638
+ - 修复账号卡片按钮位置不一致问题
639
+ - 按钮始终固定在卡片底部
640
+ - **移除组织 ID 配置**:
641
+ - 简化账号配置流程
642
+ - 移除 CLI 和 UI 中的组织 ID 选项
643
+
644
+ ### v1.3.0
645
+ - **改进自定义环境变量输入**:
646
+ - 支持单行 `KEY=VALUE` 格式输入(例如:`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`)
647
+ - 配置过程中实时显示已添加的变量
648
+ - 直接按回车即可完成变量添加
649
+ - 更清晰的错误提示和用户指引
650
+ - 增强文档,添加详细的示例和使用说明
651
+
440
652
  ### v1.2.0
441
653
  - 添加账户自定义环境变量支持
442
654
  - 添加 `ais doctor` 命令用于配置诊断