ai-account-switch 1.5.2 → 1.5.4

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
@@ -17,7 +17,7 @@ A cross-platform CLI tool to manage and switch between Claude/Codex account conf
17
17
 
18
18
  ## Installation
19
19
 
20
- ### Option 1: Global npm Installation (Recommended)
20
+ ### npm Installation (Recommended)
21
21
 
22
22
  ```bash
23
23
  npm install -g ai-account-switch
@@ -25,7 +25,7 @@ npm install -g ai-account-switch
25
25
 
26
26
  After installation, the `ais` command will be available globally.
27
27
 
28
- **Note**: If you encounter "command not found" after installation, you may need to add npm's global bin directory to your PATH:
28
+ **Troubleshooting**: If you encounter "command not found" after installation:
29
29
 
30
30
  ```bash
31
31
  # Check npm global bin path
@@ -37,153 +37,7 @@ export PATH="$PATH:$(npm config get prefix)/bin"
37
37
  # On Windows, add to system PATH: %APPDATA%\npm
38
38
  ```
39
39
 
40
- ### Option 2: Download Pre-built Binary
41
-
42
- Download the latest release for your platform from the [Releases page](https://github.com/yourusername/ai-agent-user-swith/releases):
43
-
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
52
- ```
53
-
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
68
- ```
69
-
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
- ```
185
-
186
- ### Option 3: Install from Source
40
+ ### Install from Source
187
41
 
188
42
  ```bash
189
43
  # Clone the repository
@@ -197,8 +51,6 @@ npm install
197
51
  npm link
198
52
  ```
199
53
 
200
- **For Maintainers**: See [NPM_PUBLISH.md](NPM_PUBLISH.md) for publishing instructions.
201
-
202
54
  ## Usage
203
55
 
204
56
  ### Commands Overview
package/README_ZH.md CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  ## 安装
27
27
 
28
- ### 方式 1:全局 npm 安装(推荐)
28
+ ### npm 安装(推荐)
29
29
 
30
30
  ```bash
31
31
  npm install -g ai-account-switch
@@ -33,7 +33,7 @@ npm install -g ai-account-switch
33
33
 
34
34
  安装后,`ais` 命令将在全局可用。
35
35
 
36
- **注意**:如果安装后提示"命令未找到",可能需要将 npm 的全局 bin 目录添加到 PATH
36
+ **故障排除**:如果安装后提示"命令未找到":
37
37
 
38
38
  ```bash
39
39
  # 查看 npm 全局 bin 路径
@@ -45,153 +45,7 @@ export PATH="$PATH:$(npm config get prefix)/bin"
45
45
  # Windows 上,添加到系统 PATH:%APPDATA%\npm
46
46
  ```
47
47
 
48
- ### 方式 2:下载预编译二进制文件
49
-
50
- 从 [Releases 页面](https://github.com/yourusername/ai-agent-user-swith/releases) 下载适合你平台的最新版本:
51
-
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
60
- ```
61
-
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
132
- ```
133
-
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
- ```
193
-
194
- ### 方式 3:从源码安装
48
+ ### 从源码安装
195
49
 
196
50
  ```bash
197
51
  # 克隆仓库
@@ -205,8 +59,6 @@ npm install
205
59
  npm link
206
60
  ```
207
61
 
208
- **维护者说明**:请查看 [NPM_PUBLISH.md](NPM_PUBLISH.md) 了解发布说明。
209
-
210
62
  ## 使用方法
211
63
 
212
64
  ### 命令概览
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-account-switch",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "A cross-platform CLI tool to manage and switch Claude/Codex account configurations",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -8,11 +8,7 @@
8
8
  },
9
9
  "scripts": {
10
10
  "test": "node src/index.js",
11
- "link": "npm link",
12
- "build": "pkg . --targets node18-linux-x64,node18-macos-x64,node18-win-x64 --output dist/ais",
13
- "build:win": "pkg . --targets node18-win-x64 --output dist/ais-win.exe",
14
- "build:installer": "iscc installer\\windows\\ais-setup.iss",
15
- "build:win-installer": "npm run build:win && npm run build:installer"
11
+ "link": "npm link"
16
12
  },
17
13
  "keywords": [
18
14
  "cli",
@@ -1,109 +0,0 @@
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.