@ghackk/multi-claude 1.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 gyane
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 ADDED
@@ -0,0 +1,313 @@
1
+ <div align="center">
2
+
3
+ <h1>claude-multi-account</h1>
4
+
5
+ <p><strong>Run multiple Claude CLI accounts with shared settings, plugins, marketplace sync, and backup/restore.</strong></p>
6
+
7
+ <p>
8
+ <a href="https://www.npmjs.com/package/multi-claude"><img src="https://img.shields.io/npm/v/multi-claude?color=cb3837&label=npm" alt="npm"></a>
9
+ <a href="https://pypi.org/project/multi-claude/"><img src="https://img.shields.io/pypi/v/multi-claude?color=3776ab&label=pip" alt="PyPI"></a>
10
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
11
+ <img src="https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey" alt="Platform">
12
+ <a href="https://github.com/ghackk/claude-multi-account/stargazers"><img src="https://img.shields.io/github/stars/ghackk/claude-multi-account?style=social" alt="GitHub Stars"></a>
13
+ </p>
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## Why?
20
+
21
+ Claude CLI stores all config in a single `~/.claude/` directory — so you're locked to **one account at a time**. Switching means logging out, logging in, and losing your settings.
22
+
23
+ **claude-multi-account** fixes this:
24
+
25
+ - **Isolated profiles** — each account gets its own config directory, no conflicts
26
+ - **Shared settings** — define MCP servers, env vars, plugins, and CLAUDE.md once — auto-applied everywhere
27
+ - **Plugin & marketplace management** — enable plugins globally or per-account, browse marketplace indexes
28
+ - **One command** — launch any account instantly from an interactive menu
29
+
30
+ ---
31
+
32
+ ## Features
33
+
34
+ <table>
35
+ <tr>
36
+ <td width="50%">
37
+
38
+ **Multi-Account Management**<br>
39
+ Create, launch, rename, and delete independent Claude CLI profiles
40
+
41
+ </td>
42
+ <td width="50%">
43
+
44
+ **Shared MCP & Settings**<br>
45
+ Define MCP servers, env vars, and preferences once — sync to all accounts
46
+
47
+ </td>
48
+ </tr>
49
+ <tr>
50
+ <td>
51
+
52
+ **Plugins & Marketplace**<br>
53
+ Enable/disable plugins globally or per-account, browse and manage marketplace indexes
54
+
55
+ </td>
56
+ <td>
57
+
58
+ **Global CLAUDE.md**<br>
59
+ Write instructions and skills that apply across every account
60
+
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>
65
+
66
+ **Backup & Restore**<br>
67
+ Timestamped archives of all accounts and configs with one click
68
+
69
+ </td>
70
+ <td>
71
+
72
+ **Export / Import Profiles**<br>
73
+ Copy a profile between machines as a single base64 token — credentials, settings, and launcher included
74
+
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td>
79
+
80
+ **Zero Dependencies**<br>
81
+ Just your shell and Claude CLI — nothing else to install
82
+
83
+ </td>
84
+ <td>
85
+
86
+ **Run from Repo**<br>
87
+ Add the repo to your PATH — `git pull` instantly updates the menu, no manual copying
88
+
89
+ </td>
90
+ </tr>
91
+ </table>
92
+
93
+ ---
94
+
95
+ ## Install
96
+
97
+ Pick any method — they all give you the `claude-menu` (or `multi-claude`) command.
98
+
99
+ ### One-liner (recommended)
100
+
101
+ ```bash
102
+ # Linux / macOS
103
+ curl -fsSL https://raw.githubusercontent.com/ghackk/claude-multi-account/master/install.sh | bash
104
+ ```
105
+
106
+ ```powershell
107
+ # Windows (PowerShell)
108
+ irm https://raw.githubusercontent.com/ghackk/claude-multi-account/master/install.ps1 | iex
109
+ ```
110
+
111
+ ### npm
112
+
113
+ ```bash
114
+ npm install -g multi-claude
115
+ ```
116
+
117
+ ### pip
118
+
119
+ ```bash
120
+ pip install multi-claude
121
+ ```
122
+
123
+ ### Homebrew (macOS / Linux)
124
+
125
+ ```bash
126
+ brew install ghackk/tap/multi-claude
127
+ ```
128
+
129
+ ### Scoop (Windows)
130
+
131
+ ```powershell
132
+ scoop bucket add multi-claude https://github.com/ghackk/scoop-multi-claude
133
+ scoop install multi-claude
134
+ ```
135
+
136
+ ### AUR (Arch Linux)
137
+
138
+ ```bash
139
+ yay -S multi-claude
140
+ ```
141
+
142
+ ### Manual (git clone)
143
+
144
+ ```bash
145
+ # Linux / macOS
146
+ git clone https://github.com/ghackk/claude-multi-account.git ~/claude-multi-account
147
+ echo 'alias claude-menu="~/claude-multi-account/unix/claude-menu.sh"' >> ~/.bashrc
148
+ ```
149
+
150
+ ```powershell
151
+ # Windows
152
+ git clone https://github.com/ghackk/claude-multi-account.git $HOME\claude-multi-account
153
+ [Environment]::SetEnvironmentVariable("PATH", "$HOME\claude-multi-account;" + [Environment]::GetEnvironmentVariable("PATH", "User"), "User")
154
+ ```
155
+
156
+ Then open a new terminal and run `claude-menu`.
157
+
158
+ ---
159
+
160
+ ## Menu Overview
161
+
162
+ ### Main Menu
163
+
164
+ ```
165
+ ======================================
166
+ Claude Account Manager
167
+ ======================================
168
+ Current Accounts:
169
+
170
+ 1. claude-work [logged in] (last used: 02 Mar 2026 10:30 AM)
171
+ 2. claude-personal [logged in] (last used: 01 Mar 2026 08:15 PM)
172
+
173
+ ======================================
174
+ 1. List Accounts
175
+ 2. Create New Account
176
+ 3. Launch Account
177
+ 4. Rename Account
178
+ 5. Delete Account
179
+ 6. Backup Sessions
180
+ 7. Restore Sessions
181
+ 8. Shared Settings (MCP/Skills)
182
+ 9. Plugins & Marketplace
183
+ E. Export Profile (Token)
184
+ I. Import Profile (Token)
185
+ 0. Exit
186
+ ======================================
187
+ ```
188
+
189
+ ### Shared Settings (Option 8)
190
+
191
+ Manage universal settings applied to all accounts on launch:
192
+
193
+ | Option | Action |
194
+ |--------|--------|
195
+ | 1 | Edit MCP + Settings (opens in editor) |
196
+ | 2 | Edit Skills/Instructions (CLAUDE.md) |
197
+ | 3 | View current shared settings |
198
+ | 4 | Sync shared settings to ALL accounts |
199
+ | 5 | Show MCP server list |
200
+ | 6 | Reset shared settings |
201
+
202
+ ### Plugins & Marketplace (Option 9)
203
+
204
+ Browse marketplace indexes and manage plugins across accounts:
205
+
206
+ | Option | Action |
207
+ |--------|--------|
208
+ | 1 | Enable plugin for ALL accounts |
209
+ | 2 | Enable plugin for one account |
210
+ | 3 | Disable plugin (shared) |
211
+ | 4 | Disable plugin (one account) |
212
+ | 5 | Browse marketplace plugins |
213
+ | 6 | Marketplace Management (add/remove/sync) |
214
+
215
+ ### Export / Import Profile (Options E & I)
216
+
217
+ Transfer a profile between machines using a copy-pasteable base64 token:
218
+
219
+ | Option | Action |
220
+ |--------|--------|
221
+ | E | Export a profile — generates a compact token (~5 KB) containing credentials, settings, and launcher |
222
+ | I | Import a profile — paste the token to restore the account on any machine |
223
+
224
+ The token bundles only essentials (credentials, settings, CLAUDE.md, launcher) — not cache or conversation history.
225
+
226
+ ---
227
+
228
+ ## How It Works
229
+
230
+ ```
231
+ ┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐
232
+ │ You pick │ ───> │ Shared settings │ ───> │ Claude CLI │
233
+ │ an account │ │ + plugins are │ │ launches with │
234
+ │ from menu │ │ merged in │ │ isolated config│
235
+ └─────────────┘ └──────────────────┘ └─────────────────┘
236
+ ```
237
+
238
+ Each account gets its own config directory (`~/.claude-<name>`). On every launch, shared settings from `~/claude-shared/` are deep-merged into the account — MCP servers, env vars, preferences, plugins, marketplace indexes, and CLAUDE.md instructions all stay in sync.
239
+
240
+ ### Merge Strategy
241
+
242
+ Settings are **deep-merged** with shared settings winning on conflict:
243
+
244
+ | Scenario | Result |
245
+ |----------|--------|
246
+ | Key exists only in account | Kept |
247
+ | Key exists only in shared | Added |
248
+ | Key exists in both (simple value) | Shared wins |
249
+ | Key exists in both (nested object) | Recursively merged |
250
+
251
+ For `CLAUDE.md`, shared content is inserted between auto-managed markers at the top. Account-specific instructions below the markers are preserved.
252
+
253
+ ---
254
+
255
+ ## Folder Structure
256
+
257
+ ```
258
+ ~/
259
+ ├── claude-multi-account/ # Git repo (can be added to PATH directly)
260
+ │ ├── claude-menu.ps1 # Windows menu script
261
+ │ ├── claude-menu.bat # Windows launcher
262
+ │ ├── windows/ # Windows-specific scripts
263
+ │ └── unix/ # Linux/macOS scripts
264
+
265
+ ├── claude-accounts/ # Account launchers (auto-created)
266
+ │ ├── claude-work.bat/.sh # Account launcher
267
+ │ └── claude-personal.bat/.sh
268
+
269
+ ├── claude-shared/ # Shared config (applied to all accounts)
270
+ │ ├── settings.json # MCP servers, env vars, preferences, enabledPlugins, extraKnownMarketplaces
271
+ │ ├── CLAUDE.md # Global instructions & skills
272
+ │ └── plugins/ # Shared plugin & marketplace data
273
+ │ └── marketplaces/ # Cached marketplace indexes
274
+
275
+ ├── claude-backups/ # Timestamped backup archives
276
+
277
+ ├── .claude-work/ # Account: work (auto-created)
278
+ ├── .claude-personal/ # Account: personal (auto-created)
279
+ └── .claude-<name>/ # Account: <name>
280
+ ```
281
+
282
+ ---
283
+
284
+ ## Documentation
285
+
286
+ - **[Installation Guide](docs/installation.md)** — setup for all platforms
287
+ - **[Usage Guide](docs/usage.md)** — full walkthrough of every feature
288
+
289
+ ---
290
+
291
+ ## Requirements
292
+
293
+ - [Claude CLI](https://docs.anthropic.com/en/docs/claude-code) installed and available in PATH
294
+ - **Windows**: PowerShell 5.1+
295
+ - **Linux/macOS**: Bash 4+, `jq` for JSON merging
296
+
297
+ ---
298
+
299
+ ## Contributing
300
+
301
+ Contributions are welcome! Feel free to open an issue or submit a pull request.
302
+
303
+ ---
304
+
305
+ ## Credits
306
+
307
+ Built by **[Gyanesh Kumar](https://github.com/ghackk)**
308
+
309
+ ---
310
+
311
+ ## License
312
+
313
+ [MIT](LICENSE)
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ const { execSync } = require('child_process');
3
+ const path = require('path');
4
+ const os = require('os');
5
+
6
+ const rootDir = path.resolve(__dirname, '..');
7
+
8
+ try {
9
+ if (os.platform() === 'win32') {
10
+ const script = path.join(rootDir, 'claude-menu.ps1');
11
+ execSync(`powershell -ExecutionPolicy Bypass -File "${script}"`, { stdio: 'inherit' });
12
+ } else {
13
+ const script = path.join(rootDir, 'unix', 'claude-menu.sh');
14
+ execSync(`bash "${script}"`, { stdio: 'inherit' });
15
+ }
16
+ } catch (e) {
17
+ process.exit(e.status || 1);
18
+ }
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ powershell -ExecutionPolicy Bypass -File "%USERPROFILE%\claude-accounts\claude-menu.ps1"