claude-multi 0.5.6 → 0.5.8
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/CHANGELOG.md +34 -10
- package/LICENSE +21 -0
- package/README.md +252 -52
- package/dist/cli.js +196 -9
- package/package.json +17 -7
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.5.8] - 2026-05-28
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Region selection for MiMo Token Plan** (`--region`): `mimo-token` provider now supports regional endpoints — China (`cn`), Singapore (`sgp`), Europe (`ams`). Users are prompted to pick a region after selecting `mimo-token` in all three entry points (CLI `--region` flag, interactive prompts, Ink TUI wizard). Defaults to `cn` for backward compatibility.
|
|
12
|
+
- **API key prefix mapping** (`API_KEY_PREFIXES`): `mimo-token` shows `tp_...` placeholder in the API key input; all other providers show `sk-...`. Extensible map for future providers with non-standard key formats.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- **`--provider` error message** (`src/cli.ts`): unknown provider error now dynamically lists all available providers instead of hardcoding three names.
|
|
16
|
+
- **Region advisory**: both the interactive prompts and Ink TUI display a highlighted message reminding users to check their Xiaomi account console for the correct region.
|
|
17
|
+
|
|
18
|
+
## [0.5.7] - 2026-05-27
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- **Provider templates** (`src/templates.ts`): five new AI provider templates
|
|
22
|
+
- **Xiaomi MiMo** (`mimo`): MiMo-V2.5-Pro and MiMo-V2.5 via xiaomimimo.com, pay-per-token API
|
|
23
|
+
- **Xiaomi MiMo Token Plan** (`mimo-token`): MiMo-V2.5-Pro via xiaomimimo.com subscription; replace base URL with your regional endpoint (CN/SG/EU) from the subscription console
|
|
24
|
+
- **Moonshot Kimi** (`kimi`): Kimi K2.6 (opus) and Kimi K2.5 (sonnet/haiku) via moonshot.ai, pay-per-token
|
|
25
|
+
- **Alibaba Qwen** (`qwen`): Qwen3-Coder-Next/Plus/Flash via Alibaba DashScope, pay-per-token API
|
|
26
|
+
- **Alibaba Qwen Coding Plan** (`qwen-coding`): Qwen3-Coder-Next/Plus/Flash via DashScope Coding Plan subscription
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- **GLM template** (`glm`): display name updated to "GLM Coding Plan"; description now clarifies the Anthropic endpoint is coding-plan-only (standard Z.ai pay-per-token API has no Anthropic-compatible URL)
|
|
30
|
+
- **Kimi template** (`kimi`): sonnet/haiku tiers use `kimi-k2.5` instead of `kimi-k2.6`, same family, ~37% cheaper; legacy K2 series EOL'd May 25 2026
|
|
31
|
+
|
|
8
32
|
## [0.5.6] - 2026-05-23
|
|
9
33
|
|
|
10
34
|
### Added
|
|
@@ -13,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
13
37
|
### Changed
|
|
14
38
|
- **Runtime-agnostic launcher** (`bin/claude-multi.js`): polyglot bin entry is simultaneously valid POSIX sh and ESM JavaScript
|
|
15
39
|
- On Linux/macOS: shell shebang detects bun/node/deno and execs the correct runtime
|
|
16
|
-
- On Windows + bun global install: bun's `.exe` shim reads the `.js` extension and runs directly as ESM
|
|
40
|
+
- On Windows + bun global install: bun's `.exe` shim reads the `.js` extension and runs directly as ESM, no `/bin/sh` lookup required
|
|
17
41
|
- On Windows + npm install: npm's `.cmd` shim calls `node` on the `.js` file
|
|
18
42
|
- Shebang changed to `#!/usr/bin/env bun` so bun's Windows shim can resolve itself in `PATH`
|
|
19
43
|
|
|
@@ -30,10 +54,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
30
54
|
|
|
31
55
|
### Changed
|
|
32
56
|
- **Cross-runtime support**: all package-manager operations (`upgradeClaudeMulti`, `getCurrentVersion`, `updateClaudeCode`) now use the detected package manager instead of hard-coding bun commands
|
|
33
|
-
- `getLatestVersion()` replaced `bun pm npm view` with a direct `fetch()` to the npm registry
|
|
57
|
+
- `getLatestVersion()` replaced `bun pm npm view` with a direct `fetch()` to the npm registry, works in any runtime
|
|
34
58
|
- `getDefaultBinaryPath()` selects the correct global bin directory for the active package manager on Windows (was always `%LOCALAPPDATA%\bun\bin`)
|
|
35
59
|
- Generated wrapper shebang changed from `#!/usr/bin/env bun` to `#!/usr/bin/env node`
|
|
36
|
-
- Default action (no subcommand) always launches the Ink TUI and awaits `waitUntilExit()
|
|
60
|
+
- Default action (no subcommand) always launches the Ink TUI and awaits `waitUntilExit()`, the `CLAUDE_MULTI_INK=false` prompts fallback is removed
|
|
37
61
|
- Update check is now **opt-in**: set `CLAUDE_MULTI_UPDATE_CHECK=true` to enable; it no longer runs on every invocation
|
|
38
62
|
- Removed `interactive` / `i` command alias (default action covers this)
|
|
39
63
|
|
|
@@ -103,11 +127,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
103
127
|
- Verify MCP configuration
|
|
104
128
|
- Copy between instances
|
|
105
129
|
- **CLI Plugin Commands**: 5 new `plugins` sub-commands
|
|
106
|
-
- `plugins install <instance> <ids
|
|
107
|
-
- `plugins remove <instance> <ids
|
|
108
|
-
- `plugins list-defaults
|
|
109
|
-
- `plugins list-installed [instance]
|
|
110
|
-
- `plugins check-collisions <instance> <ids
|
|
130
|
+
- `plugins install <instance> <ids...>`, install plugins with collision detection
|
|
131
|
+
- `plugins remove <instance> <ids...>`, remove plugins with symlink guard
|
|
132
|
+
- `plugins list-defaults`, list all 50 default plugins with category/MCP badges
|
|
133
|
+
- `plugins list-installed [instance]`, list installed plugins per instance
|
|
134
|
+
- `plugins check-collisions <instance> <ids...>`, detect MCP name conflicts
|
|
111
135
|
- **Provider Templates**: DeepSeek provider template added
|
|
112
136
|
- **Instance State**: `initializeInstanceState()` creates `.claude.json` with `hasCompletedOnboarding: true`
|
|
113
137
|
- **Provider Env**: `mergeProviderEnv()` integrates provider template env vars into instance settings
|
|
@@ -117,7 +141,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
117
141
|
- `copyAllFromDefault()` restored `autoSync` parameter for symlink-based plugin sync
|
|
118
142
|
- `syncPluginsAndSkills()` creates actual symlinks instead of copying files
|
|
119
143
|
- Broken symlink detection uses `lstatSync` (works when `existsSync` returns false)
|
|
120
|
-
- `~/.claude` is strictly read-only
|
|
144
|
+
- `~/.claude` is strictly read-only, never modified by any operation
|
|
121
145
|
- Atomic file writes for both config.json and settings.json (temp-file-rename pattern)
|
|
122
146
|
- Lazy path resolution in migration.ts and health.ts for testability
|
|
123
147
|
|
|
@@ -125,7 +149,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
125
149
|
- `syncPluginsAndSkills` was doing recursive copy instead of creating symlinks
|
|
126
150
|
- `copyAllFromDefault` `autoSync` parameter was removed, breaking symlink-based sync
|
|
127
151
|
- Broken symlinks not cleaned before creating new ones (used `lstatSync` instead of `existsSync`)
|
|
128
|
-
- `isClaudeCodeRunning()` blocked tests
|
|
152
|
+
- `isClaudeCodeRunning()` blocked tests, skips in `NODE_ENV=test`
|
|
129
153
|
- `writeFileSync` not imported in config.ts
|
|
130
154
|
- `McpSourceDetails` prop name mismatch in ManageMcp
|
|
131
155
|
- `renameSync` dynamic import in `saveConfigAtomic` replaced with top-level import
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 hmziqrs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,104 +2,233 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="public/favicon-animated.svg" width="256" height="256" alt="claude-multi logo">
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<h1 align="center">claude-multi</h1>
|
|
6
6
|
|
|
7
|
+
<p align="center">
|
|
8
|
+
Run multiple isolated Claude Code instances side by side. Each one gets its own provider, config directory, plugins, MCP servers, and <code>claude-<name></code> command.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/claude-multi"><img src="https://img.shields.io/npm/v/claude-multi?style=flat-square" alt="npm version" /></a>
|
|
13
|
+
<a href="https://github.com/hmziqrs/claude-multi/blob/master/LICENSE"><img src="https://img.shields.io/github/license/hmziqrs/claude-multi?style=flat-square" alt="license" /></a>
|
|
14
|
+
<a href="https://github.com/hmziqrs/claude-multi"><img src="https://img.shields.io/github/stars/hmziqrs/claude-multi?style=flat-square" alt="GitHub stars" /></a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
---
|
|
7
18
|
</div>
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
## Demo
|
|
21
|
+
|
|
22
|
+
https://github.com/user-attachments/assets/790edd9c-6ee2-425a-952c-397ad047d653
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Why?
|
|
27
|
+
|
|
28
|
+
Claude Code is great. Switching between providers and model setups is not.
|
|
29
|
+
|
|
30
|
+
If you want to try GLM today and DeepSeek tomorrow, you usually end up editing `settings.json` by hand, juggling env vars, swapping keys, or maintaining a bunch of shell aliases nobody asked for.
|
|
31
|
+
|
|
32
|
+
The other option is to use each provider's own CLI tool. That sounds clean until you realize every tool has its own workflow, its own flags, its own way of doing things. Learning a new harness for every model gets old fast.
|
|
33
|
+
|
|
34
|
+
So I went the other way: keep one harness I already like, and put the providers behind it. That's claude-multi. One workflow, many providers.
|
|
35
|
+
|
|
36
|
+
And because it's still Claude Code under the hood, you keep everything you already use. `/loop`, `/goal`, skills, MCP servers, plugins, all of it. Switching providers does not mean rebuilding your setup from scratch.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
claude # your normal Claude Code setup
|
|
40
|
+
claude-glm # Claude Code using GLM / Z.ai config
|
|
41
|
+
claude-deepseek # Claude Code using DeepSeek config
|
|
42
|
+
claude-minimax # Claude Code using MiniMax config
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Each instance is isolated. All of them run the normal, unmodified Claude Code binary.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Features
|
|
50
|
+
|
|
51
|
+
* Multiple Claude Code instances, one `claude-<name>` command each.
|
|
52
|
+
* Provider templates for GLM/Z.ai, MiniMax, and DeepSeek.
|
|
53
|
+
* Isolated config directories. Every instance gets its own `~/.claude-<name>/`.
|
|
54
|
+
* A full terminal UI that covers adding, listing, plugins, MCP, and sync.
|
|
55
|
+
* Plugin management per instance: enable, disable, install, copy, remove.
|
|
56
|
+
* MCP management: list and copy server configs between instances.
|
|
57
|
+
* Optional auto-sync that symlinks plugins and skills from your default `~/.claude`.
|
|
58
|
+
* No fork. It wraps your existing `claude` binary instead of patching it.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Requirements
|
|
63
|
+
|
|
64
|
+
* Node.js 18+ or Bun 1+
|
|
65
|
+
* Claude Code installed globally
|
|
66
|
+
|
|
67
|
+
If you don't have Claude Code yet:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm install -g @anthropic-ai/claude-code
|
|
71
|
+
```
|
|
10
72
|
|
|
11
|
-
|
|
73
|
+
---
|
|
12
74
|
|
|
13
75
|
## Install
|
|
14
76
|
|
|
77
|
+
Bun:
|
|
78
|
+
|
|
15
79
|
```bash
|
|
16
80
|
bun add -g claude-multi
|
|
17
81
|
```
|
|
18
82
|
|
|
83
|
+
npm:
|
|
84
|
+
|
|
19
85
|
```bash
|
|
20
86
|
npm install -g claude-multi
|
|
21
87
|
```
|
|
22
88
|
|
|
89
|
+
pnpm:
|
|
90
|
+
|
|
23
91
|
```bash
|
|
24
92
|
pnpm add -g claude-multi
|
|
25
93
|
```
|
|
26
94
|
|
|
95
|
+
Deno:
|
|
96
|
+
|
|
27
97
|
```bash
|
|
28
98
|
deno install -g -A -n claude-multi npm:claude-multi
|
|
29
99
|
```
|
|
30
100
|
|
|
31
|
-
|
|
101
|
+
---
|
|
32
102
|
|
|
33
|
-
##
|
|
103
|
+
## Getting started
|
|
34
104
|
|
|
35
|
-
|
|
105
|
+
Launch the TUI:
|
|
36
106
|
|
|
37
107
|
```bash
|
|
38
108
|
claude-multi
|
|
39
109
|
```
|
|
40
110
|
|
|
41
|
-
|
|
111
|
+
That's the only command you need to remember. Everything else lives inside the terminal UI.
|
|
42
112
|
|
|
43
|
-
|
|
113
|
+
### The main menu
|
|
44
114
|
|
|
45
|
-
|
|
46
|
-
|
|
115
|
+
When the TUI opens, you get something like this:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
🤖 Claude Multi - Interactive Mode
|
|
119
|
+
|
|
120
|
+
➕ Add new instance
|
|
121
|
+
📋 List all instances
|
|
122
|
+
ℹ️ Instance details
|
|
123
|
+
🔌 Manage plugins
|
|
124
|
+
🔄 Toggle auto-sync
|
|
125
|
+
🔗 Re-sync symlinks
|
|
126
|
+
🗑️ Remove instance
|
|
127
|
+
⚙️ MCP servers
|
|
128
|
+
🚪 Exit
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Arrow keys to move. `Enter` to pick. `ESC` to go back. `q` to quit.
|
|
132
|
+
|
|
133
|
+
### Setting up your first instance
|
|
134
|
+
|
|
135
|
+
Pick **➕ Add new instance**. The wizard has eight steps.
|
|
136
|
+
|
|
137
|
+
**1. Instance name**
|
|
138
|
+
|
|
139
|
+
Pick something short like `glm`, `deepseek`, or `work`. Letters, numbers, hyphens, and underscores only. Whatever you type here becomes your command, so `glm` gives you `claude-glm`.
|
|
140
|
+
|
|
141
|
+
**2. Provider template**
|
|
142
|
+
|
|
143
|
+
Pick one:
|
|
144
|
+
|
|
145
|
+
* `glm` for GLM / Z.ai
|
|
146
|
+
* `minimax` for MiniMax
|
|
147
|
+
* `deepseek` for DeepSeek
|
|
148
|
+
* `None / Custom` if you want to set things up by hand later
|
|
149
|
+
|
|
150
|
+
**3. API key** *(only if you picked a provider)*
|
|
151
|
+
|
|
152
|
+
Paste your key. It's masked while you type and gets written into the instance's `settings.json`.
|
|
153
|
+
|
|
154
|
+
**4. Confirm paths**
|
|
155
|
+
|
|
156
|
+
The wizard shows where things will go:
|
|
157
|
+
|
|
158
|
+
* Config: `~/.claude-<name>/`
|
|
159
|
+
* Binary: `~/.local/bin/claude-<name>`
|
|
160
|
+
|
|
161
|
+
Hit `y` to accept. The defaults are fine for almost everyone.
|
|
162
|
+
|
|
163
|
+
**5. Copy options**
|
|
164
|
+
|
|
165
|
+
If you already have a `~/.claude` setup, you can carry pieces of it into the new instance:
|
|
166
|
+
|
|
167
|
+
* **Nothing.** Start fresh, inherit nothing.
|
|
168
|
+
* **Only `settings.json`.** Copy just the base settings file.
|
|
169
|
+
* **Select plugins.** Cherry-pick plugins from your default setup.
|
|
170
|
+
* **All files.** Settings, `CLAUDE.md`, plugins, skills, the whole thing.
|
|
171
|
+
|
|
172
|
+
**6. Select plugins** *(only if you picked "Select plugins")*
|
|
173
|
+
|
|
174
|
+
A multi-select list of every plugin in your default `~/.claude`. `space` toggles. `enter` confirms.
|
|
175
|
+
|
|
176
|
+
**7. Auto-sync** *(only if you picked "All files")*
|
|
177
|
+
|
|
178
|
+
This asks whether to symlink `plugins/` and `skills/` back to `~/.claude`. Say `y` if you want to install a plugin once and have it show up in every instance. Say `n` if you want this instance to have its own independent copies.
|
|
179
|
+
|
|
180
|
+
**8. Done**
|
|
181
|
+
|
|
182
|
+
The wizard prints the new instance and its paths:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
✓ Instance 'glm' created successfully!
|
|
186
|
+
├─ Binary: /Users/you/.local/bin/claude-glm
|
|
187
|
+
└─ Config: /Users/you/.claude-glm
|
|
47
188
|
```
|
|
48
189
|
|
|
49
|
-
|
|
190
|
+
Run it:
|
|
50
191
|
|
|
51
192
|
```bash
|
|
52
193
|
claude-glm
|
|
53
194
|
```
|
|
54
195
|
|
|
55
|
-
|
|
196
|
+
That's a full Claude Code session on the provider you picked, with its own isolated config. Same `claude` you already know, just pointed at a different brain.
|
|
56
197
|
|
|
57
|
-
|
|
198
|
+
### Other TUI flows
|
|
58
199
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
# Plugins & MCP
|
|
72
|
-
claude-multi plugins list
|
|
73
|
-
claude-multi plugins enable <name> <plugin-id>
|
|
74
|
-
claude-multi plugins disable <name> <plugin-id>
|
|
75
|
-
claude-multi plugins copy <name> # copy from default ~/.claude
|
|
76
|
-
claude-multi mcp list
|
|
77
|
-
claude-multi mcp copy <src> <dst>
|
|
78
|
-
|
|
79
|
-
# Sync
|
|
80
|
-
claude-multi auto-sync <name> on|off # symlink plugins/skills from ~/.claude
|
|
81
|
-
claude-multi fix-symlinks --all
|
|
82
|
-
|
|
83
|
-
# Claude Code itself
|
|
84
|
-
claude-multi version
|
|
85
|
-
claude-multi update
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Set `CLAUDE_MULTI_INK=false` to force the simpler prompts-based UI instead of the Ink TUI.
|
|
200
|
+
* **📋 List all instances.** Every instance with its provider, paths, and sync status.
|
|
201
|
+
* **ℹ️ Instance details.** Pick one to inspect its full config.
|
|
202
|
+
* **🔌 Manage plugins.** Pick an instance, then enable, disable, install, copy, or remove plugins for it.
|
|
203
|
+
* **🔄 Toggle auto-sync.** Flip symlink syncing on or off for a chosen instance.
|
|
204
|
+
* **🔗 Re-sync symlinks.** Rebuild broken plugin or skill symlinks after you've moved `~/.claude` around.
|
|
205
|
+
* **🗑️ Remove instance.** Delete an instance, its wrapper, and optionally its config dir.
|
|
206
|
+
* **⚙️ MCP servers.** View MCP configs and copy them between instances.
|
|
207
|
+
|
|
208
|
+
If the menu shows a `!` health hint, press `!` to see what's wrong and fix it.
|
|
209
|
+
|
|
210
|
+
---
|
|
89
211
|
|
|
90
212
|
## Providers
|
|
91
213
|
|
|
92
|
-
| Provider | Endpoint |
|
|
93
|
-
|
|
94
|
-
| GLM
|
|
95
|
-
| MiniMax | `api.minimax.io` |
|
|
96
|
-
| DeepSeek | `api.deepseek.com` |
|
|
214
|
+
| Provider | Endpoint | Template name |
|
|
215
|
+
|---|---|---|
|
|
216
|
+
| GLM Coding Plan | `api.z.ai` | `glm` |
|
|
217
|
+
| MiniMax | `api.minimax.io` | `minimax` |
|
|
218
|
+
| DeepSeek | `api.deepseek.com` | `deepseek` |
|
|
219
|
+
| Xiaomi MiMo | `api.xiaomimimo.com` | `mimo` |
|
|
220
|
+
| Xiaomi MiMo (Token Plan) | `token-plan-cn.xiaomimimo.com` | `mimo-token` |
|
|
221
|
+
| Moonshot Kimi | `api.moonshot.ai` | `kimi` |
|
|
222
|
+
| Alibaba Qwen | `dashscope-intl.aliyuncs.com` | `qwen` |
|
|
223
|
+
| Alibaba Qwen Coding Plan | `coding-intl.dashscope.aliyuncs.com` | `qwen-coding` |
|
|
224
|
+
|
|
225
|
+
The templates write `ANTHROPIC_BASE_URL`, `ANTHROPIC_MODEL`, and a few related env vars into `~/.claude-<name>/settings.json`. Edit that file if you want to tweak things further.
|
|
97
226
|
|
|
98
|
-
|
|
227
|
+
---
|
|
99
228
|
|
|
100
229
|
## How it works
|
|
101
230
|
|
|
102
|
-
|
|
231
|
+
Every instance gets a config dir at `~/.claude-<name>/` and a wrapper script at `~/.local/bin/claude-<name>`. The wrapper sets `CLAUDE_CONFIG_DIR` and then runs the unmodified `claude` binary. No fork, no patch.
|
|
103
232
|
|
|
104
233
|
```js
|
|
105
234
|
#!/usr/bin/env bun
|
|
@@ -107,8 +236,79 @@ process.env.CLAUDE_CONFIG_DIR = "/Users/you/.claude-glm"
|
|
|
107
236
|
spawn("claude", process.argv.slice(2), { stdio: "inherit", env: process.env })
|
|
108
237
|
```
|
|
109
238
|
|
|
110
|
-
Instance metadata
|
|
239
|
+
Instance metadata sits in `~/.claude-multi/config.json`. When auto-sync is on, `plugins/` and `skills/` are symlinks back to `~/.claude/`, so installing a plugin once makes it show up everywhere.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## File locations
|
|
244
|
+
|
|
245
|
+
| Path | Purpose |
|
|
246
|
+
|---|---|
|
|
247
|
+
| `~/.claude-multi/config.json` | claude-multi instance registry |
|
|
248
|
+
| `~/.claude-<name>/` | config directory for one instance |
|
|
249
|
+
| `~/.local/bin/claude-<name>` | generated wrapper command on Linux/macOS |
|
|
250
|
+
| `~/.claude/` | your default Claude Code config. Treated as the source for copy and sync operations. |
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Auto-sync vs manual mode
|
|
255
|
+
|
|
256
|
+
With auto-sync on, `plugins/` and `skills/` are symlinks pointing at your default `~/.claude/`. Install a plugin once, and every instance that opted in picks it up.
|
|
257
|
+
|
|
258
|
+
Use manual mode when you want an instance that's fully independent. Just say `n` at the auto-sync step in the wizard. You can also flip this later from the main menu under **🔄 Toggle auto-sync**.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Troubleshooting
|
|
263
|
+
|
|
264
|
+
### `claude-<name>` command not found
|
|
265
|
+
|
|
266
|
+
Your global binary directory probably isn't on `PATH`.
|
|
267
|
+
|
|
268
|
+
For zsh on Linux/macOS:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
|
|
272
|
+
source ~/.zshrc
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
For Bash:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
279
|
+
source ~/.bashrc
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Broken plugin or skill symlinks
|
|
283
|
+
|
|
284
|
+
Open the TUI and pick **🔗 Re-sync symlinks**. Choose the broken instance (or all of them) and it rebuilds the links.
|
|
285
|
+
|
|
286
|
+
### Health warnings in the menu
|
|
287
|
+
|
|
288
|
+
If the main menu shows a yellow or red banner, hit `!` to open the health screen. It lists what's wrong (missing binary, broken symlinks, stale registry entries, that kind of thing) and offers fixes for each one.
|
|
289
|
+
|
|
290
|
+
### Force the simpler prompts UI
|
|
291
|
+
|
|
292
|
+
If the Ink TUI doesn't render right on your terminal:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
CLAUDE_MULTI_INK=false claude-multi
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
You get a basic prompt-based UI with the same flows.
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Roadmap ideas
|
|
303
|
+
|
|
304
|
+
* More provider templates
|
|
305
|
+
* Better docs for provider-specific models
|
|
306
|
+
* Import and export instance profiles
|
|
307
|
+
* Safer API key management
|
|
308
|
+
* Preset workflows for coding, planning, review, and cheap exploration models
|
|
309
|
+
|
|
310
|
+
---
|
|
111
311
|
|
|
112
312
|
## License
|
|
113
313
|
|
|
114
|
-
MIT
|
|
314
|
+
MIT. See [LICENSE](./LICENSE) for the full text. Copyright (c) 2026 hmziqrs.
|
package/dist/cli.js
CHANGED
|
@@ -7293,6 +7293,25 @@ var require_prompts3 = __commonJS((exports, module) => {
|
|
|
7293
7293
|
});
|
|
7294
7294
|
|
|
7295
7295
|
// src/templates.ts
|
|
7296
|
+
function getApiKeyPlaceholder(providerName) {
|
|
7297
|
+
const prefix = API_KEY_PREFIXES[providerName];
|
|
7298
|
+
return prefix ? `${prefix}...` : "sk-...";
|
|
7299
|
+
}
|
|
7300
|
+
function providerHasRegions(providerName) {
|
|
7301
|
+
return providerName === "mimo-token";
|
|
7302
|
+
}
|
|
7303
|
+
function resolveRegionTemplate(template, region) {
|
|
7304
|
+
if (!providerHasRegions(template.name)) {
|
|
7305
|
+
return template;
|
|
7306
|
+
}
|
|
7307
|
+
const regionConfig = MIMO_TOKEN_REGIONS[region];
|
|
7308
|
+
if (!regionConfig) {
|
|
7309
|
+
throw new Error(`Unknown region '${region}' for ${template.name}. Available: ${Object.keys(MIMO_TOKEN_REGIONS).join(", ")}`);
|
|
7310
|
+
}
|
|
7311
|
+
const resolved = structuredClone(template);
|
|
7312
|
+
resolved.settings.env.ANTHROPIC_BASE_URL = regionConfig.baseUrl;
|
|
7313
|
+
return resolved;
|
|
7314
|
+
}
|
|
7296
7315
|
function getAvailableProviders() {
|
|
7297
7316
|
return Object.values(PROVIDER_TEMPLATES);
|
|
7298
7317
|
}
|
|
@@ -7304,13 +7323,13 @@ function applyProviderTemplate(template, apiKey) {
|
|
|
7304
7323
|
settings.env.ANTHROPIC_AUTH_TOKEN = apiKey;
|
|
7305
7324
|
return settings;
|
|
7306
7325
|
}
|
|
7307
|
-
var PROVIDER_TEMPLATES;
|
|
7326
|
+
var PROVIDER_TEMPLATES, API_KEY_PREFIXES, MIMO_TOKEN_REGIONS;
|
|
7308
7327
|
var init_templates = __esm(() => {
|
|
7309
7328
|
PROVIDER_TEMPLATES = {
|
|
7310
7329
|
glm: {
|
|
7311
7330
|
name: "glm",
|
|
7312
|
-
displayName: "GLM
|
|
7313
|
-
description: "GLM-5.1 and GLM-5-Turbo
|
|
7331
|
+
displayName: "GLM Coding Plan",
|
|
7332
|
+
description: "GLM-5.1 and GLM-5-Turbo via z.ai Coding Plan subscription (Anthropic endpoint is coding-plan-only)",
|
|
7314
7333
|
settings: {
|
|
7315
7334
|
env: {
|
|
7316
7335
|
ANTHROPIC_AUTH_TOKEN: "",
|
|
@@ -7371,6 +7390,118 @@ var init_templates = __esm(() => {
|
|
|
7371
7390
|
includeCoAuthoredBy: false,
|
|
7372
7391
|
alwaysThinkingEnabled: false
|
|
7373
7392
|
}
|
|
7393
|
+
},
|
|
7394
|
+
mimo: {
|
|
7395
|
+
name: "mimo",
|
|
7396
|
+
displayName: "Xiaomi MiMo",
|
|
7397
|
+
description: "MiMo-V2.5-Pro and MiMo-V2.5 via xiaomimimo.com — pay-per-token API",
|
|
7398
|
+
settings: {
|
|
7399
|
+
env: {
|
|
7400
|
+
ANTHROPIC_AUTH_TOKEN: "",
|
|
7401
|
+
ANTHROPIC_BASE_URL: "https://api.xiaomimimo.com/anthropic",
|
|
7402
|
+
API_TIMEOUT_MS: "3000000",
|
|
7403
|
+
ANTHROPIC_MODEL: "mimo-v2.5-pro",
|
|
7404
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL: "mimo-v2.5-pro",
|
|
7405
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL: "mimo-v2.5-pro",
|
|
7406
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL: "mimo-v2.5",
|
|
7407
|
+
ANTHROPIC_SMALL_FAST_MODEL: "mimo-v2.5"
|
|
7408
|
+
},
|
|
7409
|
+
includeCoAuthoredBy: false,
|
|
7410
|
+
alwaysThinkingEnabled: false
|
|
7411
|
+
}
|
|
7412
|
+
},
|
|
7413
|
+
"mimo-token": {
|
|
7414
|
+
name: "mimo-token",
|
|
7415
|
+
displayName: "Xiaomi MiMo (Token Plan)",
|
|
7416
|
+
description: "MiMo-V2.5-Pro via xiaomimimo.com Token Plan — monthly subscription with credit pool, replace base URL with your regional endpoint (CN/SG/EU) from the subscription console",
|
|
7417
|
+
settings: {
|
|
7418
|
+
env: {
|
|
7419
|
+
ANTHROPIC_AUTH_TOKEN: "",
|
|
7420
|
+
ANTHROPIC_BASE_URL: "https://token-plan-cn.xiaomimimo.com/anthropic",
|
|
7421
|
+
API_TIMEOUT_MS: "3000000",
|
|
7422
|
+
ANTHROPIC_MODEL: "mimo-v2.5-pro",
|
|
7423
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL: "mimo-v2.5-pro",
|
|
7424
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL: "mimo-v2.5-pro",
|
|
7425
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL: "mimo-v2.5",
|
|
7426
|
+
ANTHROPIC_SMALL_FAST_MODEL: "mimo-v2.5"
|
|
7427
|
+
},
|
|
7428
|
+
includeCoAuthoredBy: false,
|
|
7429
|
+
alwaysThinkingEnabled: false
|
|
7430
|
+
}
|
|
7431
|
+
},
|
|
7432
|
+
kimi: {
|
|
7433
|
+
name: "kimi",
|
|
7434
|
+
displayName: "Moonshot Kimi",
|
|
7435
|
+
description: "Kimi K2.6 and K2.5 models via moonshot.ai — pay-per-token only, no subscription plan",
|
|
7436
|
+
settings: {
|
|
7437
|
+
env: {
|
|
7438
|
+
ANTHROPIC_AUTH_TOKEN: "",
|
|
7439
|
+
ANTHROPIC_BASE_URL: "https://api.moonshot.ai/anthropic",
|
|
7440
|
+
API_TIMEOUT_MS: "3000000",
|
|
7441
|
+
ANTHROPIC_MODEL: "kimi-k2.6",
|
|
7442
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL: "kimi-k2.6",
|
|
7443
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL: "kimi-k2.5",
|
|
7444
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL: "kimi-k2.5",
|
|
7445
|
+
ANTHROPIC_SMALL_FAST_MODEL: "kimi-k2.5"
|
|
7446
|
+
},
|
|
7447
|
+
includeCoAuthoredBy: false,
|
|
7448
|
+
alwaysThinkingEnabled: false
|
|
7449
|
+
}
|
|
7450
|
+
},
|
|
7451
|
+
qwen: {
|
|
7452
|
+
name: "qwen",
|
|
7453
|
+
displayName: "Qwen (Alibaba)",
|
|
7454
|
+
description: "Qwen3-Coder and Qwen3.5 models via Alibaba DashScope — pay-per-token API",
|
|
7455
|
+
settings: {
|
|
7456
|
+
env: {
|
|
7457
|
+
ANTHROPIC_AUTH_TOKEN: "",
|
|
7458
|
+
ANTHROPIC_BASE_URL: "https://dashscope-intl.aliyuncs.com/apps/anthropic",
|
|
7459
|
+
API_TIMEOUT_MS: "3000000",
|
|
7460
|
+
ANTHROPIC_MODEL: "qwen3-coder-next",
|
|
7461
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL: "qwen3-coder-next",
|
|
7462
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL: "qwen3-coder-plus",
|
|
7463
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL: "qwen3-coder-flash",
|
|
7464
|
+
ANTHROPIC_SMALL_FAST_MODEL: "qwen3-coder-flash"
|
|
7465
|
+
},
|
|
7466
|
+
includeCoAuthoredBy: false,
|
|
7467
|
+
alwaysThinkingEnabled: false
|
|
7468
|
+
}
|
|
7469
|
+
},
|
|
7470
|
+
"qwen-coding": {
|
|
7471
|
+
name: "qwen-coding",
|
|
7472
|
+
displayName: "Qwen Coding Plan (Alibaba)",
|
|
7473
|
+
description: "Qwen3-Coder and Qwen3.5 models via Alibaba DashScope Coding Plan subscription",
|
|
7474
|
+
settings: {
|
|
7475
|
+
env: {
|
|
7476
|
+
ANTHROPIC_AUTH_TOKEN: "",
|
|
7477
|
+
ANTHROPIC_BASE_URL: "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic",
|
|
7478
|
+
API_TIMEOUT_MS: "3000000",
|
|
7479
|
+
ANTHROPIC_MODEL: "qwen3-coder-next",
|
|
7480
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL: "qwen3-coder-next",
|
|
7481
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL: "qwen3-coder-plus",
|
|
7482
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL: "qwen3-coder-flash",
|
|
7483
|
+
ANTHROPIC_SMALL_FAST_MODEL: "qwen3-coder-flash"
|
|
7484
|
+
},
|
|
7485
|
+
includeCoAuthoredBy: false,
|
|
7486
|
+
alwaysThinkingEnabled: false
|
|
7487
|
+
}
|
|
7488
|
+
}
|
|
7489
|
+
};
|
|
7490
|
+
API_KEY_PREFIXES = {
|
|
7491
|
+
"mimo-token": "tp_"
|
|
7492
|
+
};
|
|
7493
|
+
MIMO_TOKEN_REGIONS = {
|
|
7494
|
+
cn: {
|
|
7495
|
+
label: "China",
|
|
7496
|
+
baseUrl: "https://token-plan-cn.xiaomimimo.com/anthropic"
|
|
7497
|
+
},
|
|
7498
|
+
sgp: {
|
|
7499
|
+
label: "Singapore",
|
|
7500
|
+
baseUrl: "https://token-plan-sgp.xiaomimimo.com/anthropic"
|
|
7501
|
+
},
|
|
7502
|
+
ams: {
|
|
7503
|
+
label: "Europe",
|
|
7504
|
+
baseUrl: "https://token-plan-ams.xiaomimimo.com/anthropic"
|
|
7374
7505
|
}
|
|
7375
7506
|
};
|
|
7376
7507
|
});
|
|
@@ -53692,6 +53823,10 @@ function useConfig() {
|
|
|
53692
53823
|
getDefaultBinaryPath,
|
|
53693
53824
|
getAvailableProviders,
|
|
53694
53825
|
getProviderTemplate,
|
|
53826
|
+
providerHasRegions,
|
|
53827
|
+
resolveRegionTemplate,
|
|
53828
|
+
MIMO_TOKEN_REGIONS,
|
|
53829
|
+
getApiKeyPlaceholder,
|
|
53695
53830
|
updateInstanceAutoSync,
|
|
53696
53831
|
syncPluginsAndSkills,
|
|
53697
53832
|
initializeInstanceState,
|
|
@@ -53804,6 +53939,7 @@ var import_react67, jsx_dev_runtime4, AddResult = ({
|
|
|
53804
53939
|
const [error, setError] = import_react67.useState("");
|
|
53805
53940
|
const [useProvider, setUseProvider] = import_react67.useState(false);
|
|
53806
53941
|
const [selectedProvider, setSelectedProvider] = import_react67.useState(null);
|
|
53942
|
+
const [selectedRegion, setSelectedRegion] = import_react67.useState(null);
|
|
53807
53943
|
const [apiKey, setApiKey] = import_react67.useState("");
|
|
53808
53944
|
const [autoSync, setAutoSync] = import_react67.useState(false);
|
|
53809
53945
|
const [copyOption, setCopyOption] = import_react67.useState(CopyOption.None);
|
|
@@ -53823,7 +53959,8 @@ var import_react67, jsx_dev_runtime4, AddResult = ({
|
|
|
53823
53959
|
const goBack = import_react67.useCallback(() => {
|
|
53824
53960
|
const prevMap = {
|
|
53825
53961
|
"provider-select": "name",
|
|
53826
|
-
"provider-
|
|
53962
|
+
"provider-region": "provider-select",
|
|
53963
|
+
"provider-apikey": "provider-region",
|
|
53827
53964
|
"paths-confirm": "provider-select",
|
|
53828
53965
|
"copy-options": "paths-confirm",
|
|
53829
53966
|
"select-plugins": "copy-options",
|
|
@@ -53859,6 +53996,14 @@ var import_react67, jsx_dev_runtime4, AddResult = ({
|
|
|
53859
53996
|
}
|
|
53860
53997
|
setUseProvider(true);
|
|
53861
53998
|
setSelectedProvider(value);
|
|
53999
|
+
if (providerHasRegions(value)) {
|
|
54000
|
+
setStep("provider-region");
|
|
54001
|
+
} else {
|
|
54002
|
+
setStep("provider-apikey");
|
|
54003
|
+
}
|
|
54004
|
+
}, []);
|
|
54005
|
+
const handleRegionSelect = import_react67.useCallback((value) => {
|
|
54006
|
+
setSelectedRegion(value);
|
|
53862
54007
|
setStep("provider-apikey");
|
|
53863
54008
|
}, []);
|
|
53864
54009
|
const handleApiKeySubmit = import_react67.useCallback((value) => {
|
|
@@ -53927,7 +54072,10 @@ var import_react67, jsx_dev_runtime4, AddResult = ({
|
|
|
53927
54072
|
await cfg.copySettingsFromDefault(cDir);
|
|
53928
54073
|
}
|
|
53929
54074
|
if (useProvider && selectedProvider) {
|
|
53930
|
-
|
|
54075
|
+
let template2 = cfg.getProviderTemplate(selectedProvider);
|
|
54076
|
+
if (template2 && selectedRegion && providerHasRegions(selectedProvider)) {
|
|
54077
|
+
template2 = resolveRegionTemplate(template2, selectedRegion);
|
|
54078
|
+
}
|
|
53931
54079
|
if (template2)
|
|
53932
54080
|
await cfg.mergeProviderEnv(cDir, template2, apiKey);
|
|
53933
54081
|
}
|
|
@@ -54007,6 +54155,33 @@ var import_react67, jsx_dev_runtime4, AddResult = ({
|
|
|
54007
54155
|
}, undefined, false, undefined, this)
|
|
54008
54156
|
]
|
|
54009
54157
|
}, undefined, true, undefined, this),
|
|
54158
|
+
step === "provider-region" && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
|
|
54159
|
+
flexDirection: "column",
|
|
54160
|
+
gap: 1,
|
|
54161
|
+
children: [
|
|
54162
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
54163
|
+
children: "Select your subscription region:"
|
|
54164
|
+
}, undefined, false, undefined, this),
|
|
54165
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
|
|
54166
|
+
borderStyle: "round",
|
|
54167
|
+
borderColor: "yellow",
|
|
54168
|
+
paddingX: 1,
|
|
54169
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
54170
|
+
bold: true,
|
|
54171
|
+
color: "yellow",
|
|
54172
|
+
children: "Check your Xiaomi account console to confirm the correct region for your subscription."
|
|
54173
|
+
}, undefined, false, undefined, this)
|
|
54174
|
+
}, undefined, false, undefined, this),
|
|
54175
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Select, {
|
|
54176
|
+
options: Object.entries(MIMO_TOKEN_REGIONS).map(([key, val]) => ({
|
|
54177
|
+
label: `${val.label} — ${val.baseUrl}`,
|
|
54178
|
+
value: key
|
|
54179
|
+
})),
|
|
54180
|
+
visibleOptionCount: 3,
|
|
54181
|
+
onChange: handleRegionSelect
|
|
54182
|
+
}, undefined, false, undefined, this)
|
|
54183
|
+
]
|
|
54184
|
+
}, undefined, true, undefined, this),
|
|
54010
54185
|
step === "provider-apikey" && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
|
|
54011
54186
|
flexDirection: "column",
|
|
54012
54187
|
gap: 1,
|
|
@@ -54019,7 +54194,7 @@ var import_react67, jsx_dev_runtime4, AddResult = ({
|
|
|
54019
54194
|
]
|
|
54020
54195
|
}, undefined, true, undefined, this),
|
|
54021
54196
|
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(PasswordInput, {
|
|
54022
|
-
placeholder: "sk-...",
|
|
54197
|
+
placeholder: selectedProvider ? getApiKeyPlaceholder(selectedProvider) : "sk-...",
|
|
54023
54198
|
onSubmit: handleApiKeySubmit
|
|
54024
54199
|
}, undefined, false, undefined, this)
|
|
54025
54200
|
]
|
|
@@ -54145,6 +54320,7 @@ var init_AddInstance = __esm(async () => {
|
|
|
54145
54320
|
init_wrapper();
|
|
54146
54321
|
init_useAnimations();
|
|
54147
54322
|
init_constants();
|
|
54323
|
+
init_templates();
|
|
54148
54324
|
await __promiseAll([
|
|
54149
54325
|
init_build2(),
|
|
54150
54326
|
init_build3(),
|
|
@@ -54158,6 +54334,7 @@ var init_AddInstance = __esm(async () => {
|
|
|
54158
54334
|
STEP_TITLES = {
|
|
54159
54335
|
name: "Instance Name",
|
|
54160
54336
|
"provider-select": "Provider Template",
|
|
54337
|
+
"provider-region": "Region",
|
|
54161
54338
|
"provider-apikey": "API Key",
|
|
54162
54339
|
"paths-confirm": "Paths",
|
|
54163
54340
|
"copy-options": "Copy Options",
|
|
@@ -54169,6 +54346,7 @@ var init_AddInstance = __esm(async () => {
|
|
|
54169
54346
|
STEP_ORDER = [
|
|
54170
54347
|
"name",
|
|
54171
54348
|
"provider-select",
|
|
54349
|
+
"provider-region",
|
|
54172
54350
|
"provider-apikey",
|
|
54173
54351
|
"paths-confirm",
|
|
54174
54352
|
"copy-options",
|
|
@@ -56847,8 +57025,8 @@ function requireNonEmptyArgs(items, errorMsg, usage) {
|
|
|
56847
57025
|
}
|
|
56848
57026
|
}
|
|
56849
57027
|
var program2 = new Command;
|
|
56850
|
-
program2.name("claude-multi").description("Manage multiple Claude Code instances with different aliases").version("0.5.
|
|
56851
|
-
program2.command("add <name>").description("Add a new Claude Code instance").option("-c, --config <dir>", "Config directory path", (name) => join7(homedir4(), `.claude-${name}`)).option("-b, --binary <path>", "Binary path (default: ~/.local/bin/claude-<name>)").option("--copy-settings", "Copy settings.json from default Claude").option("--copy-all", "Copy all files from default Claude").option("--copy-mcp", "Copy MCP server configurations from default Claude").option("--skip-prompts", "Skip interactive prompts (start fresh)").option("--provider <name>", "Use a provider template (glm, minimax)").option("--api-key <key>", "API key for the provider").option("--auto-sync", "Auto-sync plugins/skills via symlinks (default)").option("--manual", "Manually manage plugins/skills (copy files)").action(async (name, options) => {
|
|
57028
|
+
program2.name("claude-multi").description("Manage multiple Claude Code instances with different aliases").version("0.5.8");
|
|
57029
|
+
program2.command("add <name>").description("Add a new Claude Code instance").option("-c, --config <dir>", "Config directory path", (name) => join7(homedir4(), `.claude-${name}`)).option("-b, --binary <path>", "Binary path (default: ~/.local/bin/claude-<name>)").option("--copy-settings", "Copy settings.json from default Claude").option("--copy-all", "Copy all files from default Claude").option("--copy-mcp", "Copy MCP server configurations from default Claude").option("--skip-prompts", "Skip interactive prompts (start fresh)").option("--provider <name>", "Use a provider template (glm, minimax, deepseek, mimo, mimo-token, kimi, qwen, qwen-coding)").option("--api-key <key>", "API key for the provider").option("--region <region>", "Region for regional providers (e.g., cn, sgp, ams for mimo-token)").option("--auto-sync", "Auto-sync plugins/skills via symlinks (default)").option("--manual", "Manually manage plugins/skills (copy files)").action(async (name, options) => {
|
|
56852
57030
|
try {
|
|
56853
57031
|
const configDir = options.config || join7(homedir4(), `.claude-${name}`);
|
|
56854
57032
|
const binaryPath = options.binary || getDefaultBinaryPath(name);
|
|
@@ -56864,7 +57042,7 @@ program2.command("add <name>").description("Add a new Claude Code instance").opt
|
|
|
56864
57042
|
if (options.provider) {
|
|
56865
57043
|
providerTemplate = getProviderTemplate(options.provider);
|
|
56866
57044
|
if (!providerTemplate) {
|
|
56867
|
-
console.error(source_default.red(`✗ Unknown provider '${options.provider}'. Available:
|
|
57045
|
+
console.error(source_default.red(`✗ Unknown provider '${options.provider}'. Available: ${getAvailableProviders().map((p) => p.name).join(", ")}`));
|
|
56868
57046
|
exitWithCode(1);
|
|
56869
57047
|
}
|
|
56870
57048
|
if (!options.apiKey) {
|
|
@@ -56873,6 +57051,15 @@ program2.command("add <name>").description("Add a new Claude Code instance").opt
|
|
|
56873
57051
|
}
|
|
56874
57052
|
apiKey = options.apiKey;
|
|
56875
57053
|
useProviderTemplate = true;
|
|
57054
|
+
if (providerHasRegions(providerTemplate.name)) {
|
|
57055
|
+
const region = options.region || "cn";
|
|
57056
|
+
try {
|
|
57057
|
+
providerTemplate = resolveRegionTemplate(providerTemplate, region);
|
|
57058
|
+
} catch (err) {
|
|
57059
|
+
console.error(source_default.red(`✗ ${toMessage(err)}`));
|
|
57060
|
+
exitWithCode(1);
|
|
57061
|
+
}
|
|
57062
|
+
}
|
|
56876
57063
|
}
|
|
56877
57064
|
if (options.copySettings || options.copyAll || options.copyMcp || options.skipPrompts || options.provider) {
|
|
56878
57065
|
if (options.copyAll) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-multi",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "Manage multiple Claude Code instances with different aliases and configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"docs:preview": "astro preview",
|
|
24
24
|
"ci:docs:deploy": "gh workflow run deploy-docs.yml",
|
|
25
25
|
"ci:publish": "gh workflow run publish.yml -f version=$(node -p \"require('./package.json').version\")",
|
|
26
|
-
"ci:test-install": "gh workflow run test-install.yml"
|
|
26
|
+
"ci:test-install": "gh workflow run test-install.yml",
|
|
27
|
+
"tts-server": "bash scripts/start-tts-server.sh",
|
|
28
|
+
"generate-audio": "bun run scripts/generate-audio.ts"
|
|
27
29
|
},
|
|
28
30
|
"keywords": [
|
|
29
31
|
"claude",
|
|
@@ -38,13 +40,10 @@
|
|
|
38
40
|
"type": "git",
|
|
39
41
|
"url": "git+https://github.com/hmziqrs/claude-multi.git"
|
|
40
42
|
},
|
|
41
|
-
"homepage": "https://
|
|
43
|
+
"homepage": "https://claude-multi.hmziq.xyz",
|
|
42
44
|
"bugs": {
|
|
43
45
|
"url": "https://github.com/hmziqrs/claude-multi/issues"
|
|
44
46
|
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"@anthropic-ai/claude-code": ">=2.0.0"
|
|
47
|
-
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@astrojs/starlight": "^0.39.2",
|
|
50
49
|
"@astrojs/tailwind": "^6.0.2",
|
|
@@ -72,5 +71,16 @@
|
|
|
72
71
|
"engines": {
|
|
73
72
|
"node": ">=18.0.0",
|
|
74
73
|
"bun": ">=1.0.0"
|
|
75
|
-
}
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@astrojs/rss": "^4.0.18",
|
|
77
|
+
"@iconify-json/lucide": "^1.2.109",
|
|
78
|
+
"@iconify-json/simple-icons": "^1.2.83",
|
|
79
|
+
"astro-icon": "^1.1.5",
|
|
80
|
+
"sharp": "^0.34.5"
|
|
81
|
+
},
|
|
82
|
+
"trustedDependencies": [
|
|
83
|
+
"onnxruntime-node",
|
|
84
|
+
"protobufjs"
|
|
85
|
+
]
|
|
76
86
|
}
|