claude-multi 0.3.0 → 0.4.2
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 +52 -0
- package/README.md +7 -85
- package/development.md +602 -0
- package/dist/cli.js +748 -138
- package/package.json +3 -3
- package/bun.lock +0 -77
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,58 @@ 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.4.2] - 2026-01-26
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Auto-sync symlinks now use absolute paths instead of relative paths
|
|
12
|
+
- Previously used hardcoded `../../.claude/` which assumed instances were in `~/.claude-instances/`
|
|
13
|
+
- Now uses `homedir()` to resolve absolute paths, working for any instance location
|
|
14
|
+
- Fixes broken symlinks when instances are created directly in home directory (e.g., `~/.claude-tester/`)
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Symlink test suite to verify both relative and absolute symlink behaviors
|
|
18
|
+
|
|
19
|
+
[0.4.2]: https://github.com/hmziqrs/claude-multi/compare/v0.4.1...v0.4.2
|
|
20
|
+
|
|
21
|
+
## [0.4.1] - 2026-01-26
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- **Test Suite**: Comprehensive sandboxing tests for auto-sync functionality
|
|
25
|
+
- 46 tests covering syncPluginsAndSkills, unsyncPluginsAndSkills, copySettingsFromDefault, and copyAllFromDefault
|
|
26
|
+
- Real file system operations in temporary directories with complete isolation
|
|
27
|
+
- AutoSyncTestHelper class for test utilities and assertions
|
|
28
|
+
- Test helper functions to override default Claude directory for testing
|
|
29
|
+
- Integration tests for sync/unsync cycles and auto-sync toggle
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- macOS compatibility: Fixed rmSync usage to properly handle both symlinks and directories
|
|
33
|
+
- Security: copySettingsFromDefault now uses whitelist approach to only copy safe settings (exclude sensitive data like env and mcpServers)
|
|
34
|
+
|
|
35
|
+
[0.4.1]: https://github.com/hmziqrs/claude-multi/compare/v0.4.0...v0.4.1
|
|
36
|
+
|
|
37
|
+
## [0.4.0] - 2026-01-26
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- **Auto-Sync for Plugins and Skills**: Share plugins/skills across instances via symlinks
|
|
41
|
+
- New `--auto-sync` and `--manual` flags for `add` command
|
|
42
|
+
- Auto-sync enabled by default when copying all files
|
|
43
|
+
- `auto-sync <name> <on|off>` command to toggle for existing instances
|
|
44
|
+
- Interactive mode option to toggle auto-sync setting
|
|
45
|
+
- Instance info/list now display auto-sync status
|
|
46
|
+
- **Bun Runtime Support**: Migrated from npm/node to Bun
|
|
47
|
+
- All npm commands replaced with bun equivalents
|
|
48
|
+
- Build target changed from node to bun
|
|
49
|
+
- Shebangs updated to use bun instead of node
|
|
50
|
+
- Windows binary path changed to `%LOCALAPPDATA%\bun\bin`
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
- Plugins and skills directories now use symlinks by default (auto-sync mode)
|
|
54
|
+
- When auto-sync is enabled, plugins/skills are symlinked from `~/.claude`
|
|
55
|
+
- When auto-sync is disabled, files are copied to instance config directory
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
- Removed unused code and improved error handling
|
|
59
|
+
|
|
8
60
|
## [0.3.0] - 2025-01-XX
|
|
9
61
|
|
|
10
62
|
### Added
|
package/README.md
CHANGED
|
@@ -18,14 +18,7 @@ Claude Code supports multiple AI providers (Anthropic, GLM, Minimax), but switch
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
|
|
22
|
-
bun install
|
|
23
|
-
|
|
24
|
-
# Build the project
|
|
25
|
-
bun run build
|
|
26
|
-
|
|
27
|
-
# Install globally (optional)
|
|
28
|
-
npm link
|
|
21
|
+
npm install -g claude-multi
|
|
29
22
|
```
|
|
30
23
|
|
|
31
24
|
## Quick Start
|
|
@@ -33,9 +26,6 @@ npm link
|
|
|
33
26
|
Get started with a provider template in 30 seconds:
|
|
34
27
|
|
|
35
28
|
```bash
|
|
36
|
-
# Install claude-multi
|
|
37
|
-
npm link # or npm install -g claude-multi
|
|
38
|
-
|
|
39
29
|
# Create a GLM instance
|
|
40
30
|
claude-multi add glm --provider glm --api-key "your-glm-api-key"
|
|
41
31
|
|
|
@@ -140,22 +130,6 @@ claude-multi version
|
|
|
140
130
|
claude-multi update
|
|
141
131
|
```
|
|
142
132
|
|
|
143
|
-
## How It Works
|
|
144
|
-
|
|
145
|
-
`claude-multi` creates wrapper scripts that set the `CLAUDE_CONFIG_DIR` environment variable before calling the original `claude` binary:
|
|
146
|
-
|
|
147
|
-
```javascript
|
|
148
|
-
#!/usr/bin/env node
|
|
149
|
-
process.env.CLAUDE_CONFIG_DIR = "/Users/you/.claude-glm"
|
|
150
|
-
import("/usr/local/bin/claude")
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
This approach:
|
|
154
|
-
- ✅ Doesn't modify Anthropic's code (legal)
|
|
155
|
-
- ✅ Uses official Claude Code (no forking)
|
|
156
|
-
- ✅ Auto-syncs with upstream (no version tracking needed)
|
|
157
|
-
- ✅ Simple and maintainable
|
|
158
|
-
|
|
159
133
|
## Use Cases
|
|
160
134
|
|
|
161
135
|
### Personal + Work
|
|
@@ -215,28 +189,9 @@ claude-multi add myinstance
|
|
|
215
189
|
|
|
216
190
|
Customize later by editing `~/.claude-{name}/settings.json`
|
|
217
191
|
|
|
218
|
-
## Development
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
# Install dependencies
|
|
222
|
-
bun install
|
|
223
|
-
|
|
224
|
-
# Run in dev mode
|
|
225
|
-
bun run dev
|
|
226
|
-
|
|
227
|
-
# Build
|
|
228
|
-
bun run build
|
|
229
|
-
|
|
230
|
-
# Test
|
|
231
|
-
bun run dev add test --binary ./test-bin/claude-test
|
|
232
|
-
bun run dev list
|
|
233
|
-
bun run dev remove test --force
|
|
234
|
-
```
|
|
235
|
-
|
|
236
192
|
## Requirements
|
|
237
193
|
|
|
238
194
|
- Node.js >= 18
|
|
239
|
-
- Bun (for development)
|
|
240
195
|
- `@anthropic-ai/claude-code` installed globally
|
|
241
196
|
|
|
242
197
|
## Platform Support
|
|
@@ -259,45 +214,6 @@ bun run dev remove test --force
|
|
|
259
214
|
- Binary path defaults to `~/.local/bin`
|
|
260
215
|
- Scripts are automatically marked as executable
|
|
261
216
|
|
|
262
|
-
## Project Structure
|
|
263
|
-
|
|
264
|
-
```
|
|
265
|
-
claude-multi/
|
|
266
|
-
├── src/
|
|
267
|
-
│ ├── cli.ts # Main CLI interface
|
|
268
|
-
│ ├── config.ts # Instance config management
|
|
269
|
-
│ ├── wrapper.ts # Wrapper script generation
|
|
270
|
-
│ └── version.ts # Version checking
|
|
271
|
-
├── docs/
|
|
272
|
-
│ └── raw-plan.md # Detailed implementation plan
|
|
273
|
-
├── package.json
|
|
274
|
-
└── README.md
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
## Configuration
|
|
278
|
-
|
|
279
|
-
Instance metadata is stored in `~/.claude-multi/config.json`:
|
|
280
|
-
|
|
281
|
-
```json
|
|
282
|
-
{
|
|
283
|
-
"instances": [
|
|
284
|
-
{
|
|
285
|
-
"name": "glm",
|
|
286
|
-
"configDir": "/Users/you/.claude-glm",
|
|
287
|
-
"binaryPath": "/usr/local/bin/claude-glm",
|
|
288
|
-
"createdAt": "2025-11-02T03:57:41.000Z"
|
|
289
|
-
}
|
|
290
|
-
],
|
|
291
|
-
"version": "1.0.0"
|
|
292
|
-
}
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
## CI/CD
|
|
296
|
-
|
|
297
|
-
- **CI**: Runs on PRs and pushes to master (Node 20.x)
|
|
298
|
-
- **Publish**: Auto-publishes to npm when version tags are pushed
|
|
299
|
-
- **Requirements**: `NPM_TOKEN` secret configured in GitHub
|
|
300
|
-
|
|
301
217
|
## License
|
|
302
218
|
|
|
303
219
|
MIT
|
|
@@ -307,3 +223,9 @@ MIT
|
|
|
307
223
|
Built with [Bun](https://bun.sh) and [Commander.js](https://github.com/tj/commander.js)
|
|
308
224
|
|
|
309
225
|
Wrapper for [@anthropic-ai/claude-code](https://www.npmjs.com/package/@anthropic-ai/claude-code)
|
|
226
|
+
|
|
227
|
+
## Support
|
|
228
|
+
|
|
229
|
+
For technical documentation, development setup, and contribution guidelines, see [development.md](development.md).
|
|
230
|
+
|
|
231
|
+
For issues, questions, or feature requests, please visit the project's issue tracker.
|