claude-multi 0.3.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -5,6 +5,45 @@ 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.1] - 2025-01-26
9
+
10
+ ### Added
11
+ - **Test Suite**: Comprehensive sandboxing tests for auto-sync functionality
12
+ - 46 tests covering syncPluginsAndSkills, unsyncPluginsAndSkills, copySettingsFromDefault, and copyAllFromDefault
13
+ - Real file system operations in temporary directories with complete isolation
14
+ - AutoSyncTestHelper class for test utilities and assertions
15
+ - Test helper functions to override default Claude directory for testing
16
+ - Integration tests for sync/unsync cycles and auto-sync toggle
17
+
18
+ ### Fixed
19
+ - macOS compatibility: Fixed rmSync usage to properly handle both symlinks and directories
20
+ - Security: copySettingsFromDefault now uses whitelist approach to only copy safe settings (exclude sensitive data like env and mcpServers)
21
+
22
+ [0.4.1]: https://github.com/hmziqrs/claude-multi/compare/v0.4.0...v0.4.1
23
+
24
+ ## [0.4.0] - 2025-01-26
25
+
26
+ ### Added
27
+ - **Auto-Sync for Plugins and Skills**: Share plugins/skills across instances via symlinks
28
+ - New `--auto-sync` and `--manual` flags for `add` command
29
+ - Auto-sync enabled by default when copying all files
30
+ - `auto-sync <name> <on|off>` command to toggle for existing instances
31
+ - Interactive mode option to toggle auto-sync setting
32
+ - Instance info/list now display auto-sync status
33
+ - **Bun Runtime Support**: Migrated from npm/node to Bun
34
+ - All npm commands replaced with bun equivalents
35
+ - Build target changed from node to bun
36
+ - Shebangs updated to use bun instead of node
37
+ - Windows binary path changed to `%LOCALAPPDATA%\bun\bin`
38
+
39
+ ### Changed
40
+ - Plugins and skills directories now use symlinks by default (auto-sync mode)
41
+ - When auto-sync is enabled, plugins/skills are symlinked from `~/.claude`
42
+ - When auto-sync is disabled, files are copied to instance config directory
43
+
44
+ ### Fixed
45
+ - Removed unused code and improved error handling
46
+
8
47
  ## [0.3.0] - 2025-01-XX
9
48
 
10
49
  ### 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
- # Install dependencies
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.