multi-claude-cli 0.6.0__tar.gz → 0.8.0__tar.gz
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.
- {multi_claude_cli-0.6.0/src/multi_claude_cli.egg-info → multi_claude_cli-0.8.0}/PKG-INFO +56 -3
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/README.md +55 -2
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/__init__.py +1 -1
- multi_claude_cli-0.8.0/src/multi_claude/bundle.py +508 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/cli.py +127 -7
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/completion.py +1 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/doctor.py +2 -1
- multi_claude_cli-0.8.0/src/multi_claude/history.py +178 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0/src/multi_claude_cli.egg-info}/PKG-INFO +56 -3
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude_cli.egg-info/SOURCES.txt +4 -0
- multi_claude_cli-0.8.0/tests/test_bundle.py +305 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_help.py +2 -2
- multi_claude_cli-0.8.0/tests/test_history.py +194 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/LICENSE +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/pyproject.toml +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/setup.cfg +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/__main__.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/accounts.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/actions.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/config.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/env.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/fsutil.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/hook.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/identity.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/launcher.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/lock.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/migrate.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/platform.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/restore.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/routes.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/sessions.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/shared.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/shellpath.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/statusline.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude/usage.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude_cli.egg-info/dependency_links.txt +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude_cli.egg-info/entry_points.txt +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/src/multi_claude_cli.egg-info/top_level.txt +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_accounts.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_completion.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_config.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_doctor.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_everyday.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_fsutil.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_handoff.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_identity.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_install.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_mcp.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_migrate.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_onboarding.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_packaging.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_platform.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_rename.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_routes.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_set.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_shared_exclude.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_statusline.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_usability.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_usage.py +0 -0
- {multi_claude_cli-0.6.0 → multi_claude_cli-0.8.0}/tests/test_vscode.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: multi-claude-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Run several Claude Code accounts side by side: separate CLAUDE_CONFIG_DIR directories, launchers, proxies, environment variables and arguments.
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/jakoes-wu/multi-claude
|
|
@@ -37,6 +37,8 @@ Dynamic: license-file
|
|
|
37
37
|
|
|
38
38
|
Use several [Claude Code](https://code.claude.com/docs) accounts on one machine, at the same time. Each account keeps its own login, settings and history and, if you like, its own proxy. No more logging out and in again.
|
|
39
39
|
|
|
40
|
+
It never reads your login, never connects to the network and never edits your shell startup files.
|
|
41
|
+
|
|
40
42
|
```sh
|
|
41
43
|
claude-work # Claude Code with your work account
|
|
42
44
|
claude-personal # Claude Code with your personal account, in another terminal
|
|
@@ -62,6 +64,10 @@ The launchers are plain shell scripts. They keep working even if you uninstall m
|
|
|
62
64
|
|
|
63
65
|
## Features
|
|
64
66
|
|
|
67
|
+
- **Never reads your login** — the only keychain call checks whether an item exists; the contents of keychain items and `.credentials.json` are never opened. `migrate-default` and `restore` move whole account directories, and on Linux the credentials file moves with its directory without being opened.
|
|
68
|
+
- **No network** — multi-claude itself makes no network connections: no telemetry, no usage reporting, no update checks. Only the installer, pipx or Homebrew download the package.
|
|
69
|
+
- **Leaves your shell alone** — when `PATH` needs a change, it prints the line to add instead of editing `~/.zshrc` or `~/.bashrc`.
|
|
70
|
+
- **Changes only what you ask** — it writes its own configuration and state, the launchers, account directories (including the VS Code data that `code` keeps in `<root>/.apps`) and shared links. A Claude Code settings file is changed only by `statusline install` (the file you name, with a backup) and `add --config-from` (the new account's `settings.json`).
|
|
65
71
|
- **Migrate the default account** — move your existing `~/.claude` into the account root without logging out. `claude` keeps working exactly as before.
|
|
66
72
|
- **Add accounts** — create an account directory and a `claude-<name>` launcher, or adopt a directory you already have.
|
|
67
73
|
- **Per-account proxy** — a local port, an HTTP(S) proxy URL, `off`, or `inherit`.
|
|
@@ -69,7 +75,6 @@ The launchers are plain shell scripts. They keep working even if you uninstall m
|
|
|
69
75
|
- **One-step deployment** — `install.sh --config accounts.json` installs the tool and creates every account in the file.
|
|
70
76
|
- **Idempotent** — every command can be re-run safely. Write commands print only what changes (`--verbose` lists everything); conflicts with files multi-claude does not own are reported without changing anything; an interrupted migration resumes where it stopped.
|
|
71
77
|
- **Optional shared resources** — link `CLAUDE.md`, `skills`, `agents` and `commands` from one shared directory into selected accounts.
|
|
72
|
-
- **Hands off your credentials** — multi-claude never reads, copies or deletes logins. Its only keychain call checks whether an item exists.
|
|
73
78
|
|
|
74
79
|
## Requirements
|
|
75
80
|
|
|
@@ -202,6 +207,32 @@ Items that hold one account's own state cannot be shared: `.credentials.json`, `
|
|
|
202
207
|
|
|
203
208
|
**`skills/synced/`.** Claude Code stores skills synced from claude.ai in `skills/synced/`, one bucket per organization and account. If an account's `skills` is a real directory, turning sharing on is a conflict and multi-claude does not move anything. You may move the account's `skills/synced/<bucket>` into the shared directory's `skills/synced/` yourself: buckets of different accounts have different names and do not collide, but from then on that account's synced skills are written to the shared directory.
|
|
204
209
|
|
|
210
|
+
### Exporting and importing settings
|
|
211
|
+
|
|
212
|
+
```sh
|
|
213
|
+
multi-claude export work ~/work-settings.tar.gz # on this machine
|
|
214
|
+
multi-claude import ~/work-settings.tar.gz client # into another (existing) account, here or elsewhere
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
`export` writes `settings.json`, `CLAUDE.md`, `agents`, `commands`, `skills` and `output-styles` of the account, plus the MCP servers from its `.claude.json` (only the `mcpServers` entry), to a `.tar.gz` that only you can read. Logins, the rest of `.claude.json`, sessions, history and the plugin cache are never included. Items that are links (shared items) are skipped. If `settings.json` or the MCP servers contain values under names such as `API_KEY` or `Authorization`, `export` lists those names (not the values): treat the file like a password.
|
|
218
|
+
|
|
219
|
+
`import` copies the items into an account you created with `add`, and adds the MCP servers to its `.claude.json`. An item or MCP server that already exists with different content is a conflict: nothing is changed and the conflicts are listed. With `--force`, each one is first renamed to `<name>.multi-claude-bak.<timestamp>` and then replaced. An item that is a shared link is never replaced; turn sharing off for it first. `--dry-run` shows the plan. Restart running Claude sessions of the account after importing MCP servers; they keep their own copy of `.claude.json` and may overwrite the change.
|
|
220
|
+
|
|
221
|
+
Plugin choices travel in `settings.json` (`enabledPlugins`, `extraKnownMarketplaces`); Claude Code downloads the plugins again in the new account.
|
|
222
|
+
|
|
223
|
+
### Sharing MCP servers, plugins and settings
|
|
224
|
+
|
|
225
|
+
Shared links cover files and directories. For settings and MCP servers that every account should have, pass them on the command line of every launcher instead:
|
|
226
|
+
|
|
227
|
+
```sh
|
|
228
|
+
multi-claude args --defaults -- --mcp-config ~/.claude-shared/mcp.json --settings ~/.claude-shared/settings.json
|
|
229
|
+
multi-claude env --defaults CLAUDE_CODE_PLUGIN_CACHE_DIR=~/.claude-shared/plugins
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
- `--settings` is merged with each account's own `settings.json`: keys in the shared file win, other keys stay. Put `enabledPlugins`, `extraKnownMarketplaces`, `permissions` or `env` there.
|
|
233
|
+
- `--mcp-config` loads MCP servers from a JSON file (`{"mcpServers": {...}}`) in addition to each account's own. It takes several values, so keep another option after it (as `--settings` above); multi-claude warns otherwise.
|
|
234
|
+
- `CLAUDE_CODE_PLUGIN_CACHE_DIR` moves the plugins directory (marketplaces and the plugin cache), so plugins are downloaded once for all accounts.
|
|
235
|
+
|
|
205
236
|
### Choosing an account by directory
|
|
206
237
|
|
|
207
238
|
```sh
|
|
@@ -245,6 +276,23 @@ The command becomes `<path of multi-claude> statusline-hook '<original command>'
|
|
|
245
276
|
- If several settings files define `statusLine`, wrap the one that wins (for example a file passed with `--settings` in the launcher arguments).
|
|
246
277
|
- Run `multi-claude statusline uninstall FILE` before uninstalling multi-claude; otherwise the status line stays empty because the wrapped command cannot be found. Running `install` again after multi-claude moves updates the path.
|
|
247
278
|
|
|
279
|
+
#### Token history
|
|
280
|
+
|
|
281
|
+
```sh
|
|
282
|
+
multi-claude usage --history # tokens per day, last 7 days, every account
|
|
283
|
+
multi-claude usage --history work --days 30 --by model
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
work:
|
|
288
|
+
DATE INPUT OUTPUT CACHE READ CACHE WRITE REPLIES
|
|
289
|
+
2026-10-01 1,246 499,681 273,254,361 5,926,527 612
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
`--history` counts the replies in the account's session files on this machine (`projects/**/*.jsonl`, including subagents): input, output, cache-read and cache-write tokens per day (local time) or per model. Only these counters are read; nothing else from the conversations is printed or stored, and nothing is sent anywhere. Sessions on other machines and deleted sessions are not counted. A session copied with `handoff` appears in both accounts; the `TOTAL` block counts each reply once. `--json` prints the same numbers for scripts.
|
|
293
|
+
|
|
294
|
+
`list` shows when each account was last used (`LAST USED`), from the newest session file or prompt history in its directory; a `handoff` into an account counts as use.
|
|
295
|
+
|
|
248
296
|
### Handing a session over to another account
|
|
249
297
|
|
|
250
298
|
Each account keeps its own sessions, so `claude --resume` in one account cannot see the sessions of another. `handoff` copies one session (its `.jsonl` file and the folder next to it with subagent transcripts and saved tool output) into the same project folder of another account:
|
|
@@ -363,6 +411,8 @@ With pipx, run `pipx upgrade multi-claude-cli`; with Homebrew, `brew upgrade mul
|
|
|
363
411
|
|
|
364
412
|
The one in `~/.claude`, as before: multi-claude does not change it. After [migrating `~/.claude`](#migrating-claude) it is the migrated account. `claude-auto` picks an account by directory instead; see [Choosing an account by directory](#choosing-an-account-by-directory).
|
|
365
413
|
|
|
414
|
+
There is no command that switches which account plain `claude` uses. Besides `~/.claude`, plain `claude` reads the login in the keychain (macOS) and `~/.claude.json`, and neither would follow such a switch, so two accounts would get mixed up. Use the launchers (`claude-work`), or `multi-claude route --default work` and start `claude-auto`.
|
|
415
|
+
|
|
366
416
|
### How do I continue a conversation with another account?
|
|
367
417
|
|
|
368
418
|
Inside the Claude session, run `! multi-claude handoff OTHER`, then run the command it prints in a new terminal. See [Handing a session over to another account](#handing-a-session-over-to-another-account).
|
|
@@ -377,7 +427,7 @@ By default the numbers come from the cache that Claude Code writes in `.claude.j
|
|
|
377
427
|
|
|
378
428
|
### Does multi-claude read or copy my login?
|
|
379
429
|
|
|
380
|
-
|
|
430
|
+
It never reads it: its only keychain call checks whether an item exists, and it never opens `.credentials.json`. It does not export, upload or back up logins. `migrate-default` and `restore` move a whole account directory; on Linux the credentials file is inside it and moves with it (in copy mode it is copied as part of the directory, verified, and the original directory is then removed unless you pass `--keep-backup`), still without being opened. On macOS a login is tied to the account directory's path, which is why `rename` keeps the directory.
|
|
381
431
|
|
|
382
432
|
## Reference
|
|
383
433
|
|
|
@@ -388,6 +438,8 @@ No. It never reads, copies or deletes credentials; its only keychain call checks
|
|
|
388
438
|
| `multi-claude init [--root DIR] [--bin-dir DIR] [--shared-dir DIR] [--shared-items A,B]` | Create or change global settings. |
|
|
389
439
|
| `multi-claude migrate-default [NAME] [--copy] [--keep-backup] [--proxy P] [--skip-process-check]` | Turn `~/.claude` into an account. Without NAME, the email address of its login is used. |
|
|
390
440
|
| `multi-claude restore NAME [--skip-process-check] [--dry-run]` | Undo `migrate-default`: move the account back to `~/.claude` and unregister it. The login is kept. |
|
|
441
|
+
| `multi-claude export NAME FILE` | Write the account's settings, `CLAUDE.md`, agents, commands, skills, output styles and MCP servers to FILE. No logins or sessions. |
|
|
442
|
+
| `multi-claude import FILE NAME [--force] [--dry-run]` | Import such a file into an existing account; conflicts are refused unless `--force` (which backs up first). |
|
|
391
443
|
| `multi-claude add NAME [--proxy P] [--shared [DIR] \| --no-shared] [--adopt] [--shared-exclude ITEM] [--shared-include ITEM] [--config-from OTHER]` | Add an account, adopt an existing directory, or change its options. `--config-from` copies `settings.json` from OTHER once. `--shared DIR` also makes DIR the shared directory for every account (default `~/.claude-shared`). `--shared-exclude` keeps one shared item out of this account; `--shared-include` undoes it. |
|
|
392
444
|
| `multi-claude set NAME [--proxy P] [--shared [DIR] \| --no-shared] [--shared-exclude ITEM] [--shared-include ITEM]` | Change an existing account; same options as `add` without `--adopt`. Returns 1 for an account that is not registered. |
|
|
393
445
|
| `multi-claude proxy NAME PORT\|URL\|off\|inherit` | Set an account's proxy. |
|
|
@@ -397,6 +449,7 @@ No. It never reads, copies or deletes credentials; its only keychain call checks
|
|
|
397
449
|
| `multi-claude apply [-f FILE]` | Converge everything to the configuration (or to `FILE`). |
|
|
398
450
|
| `multi-claude list [--verbose \| --json \| --names]` | Show accounts, launchers and login state. `--json` adds usage and is meant for scripts; `--names` prints only the names. |
|
|
399
451
|
| `multi-claude usage [NAME] [--json]` | Show the last known 5-hour and 7-day usage of each account. |
|
|
452
|
+
| `multi-claude usage --history [NAME] [--days N] [--by day\|model] [--json]` | Token usage per day or model, counted from the session files on this machine (default: 7 days). |
|
|
400
453
|
| `multi-claude doctor [--json] [--verbose]` | Check the configuration, launchers, account directories, shared links, logins and environment. |
|
|
401
454
|
| `multi-claude route DIR NAME`, `route DIR --remove`, `route --default NAME`, `route --no-default` | Choose an account by directory for `claude-auto`. |
|
|
402
455
|
| `multi-claude which [DIR]` | Show which account `claude-auto` would use in `DIR` (default: the current directory). |
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
Use several [Claude Code](https://code.claude.com/docs) accounts on one machine, at the same time. Each account keeps its own login, settings and history and, if you like, its own proxy. No more logging out and in again.
|
|
12
12
|
|
|
13
|
+
It never reads your login, never connects to the network and never edits your shell startup files.
|
|
14
|
+
|
|
13
15
|
```sh
|
|
14
16
|
claude-work # Claude Code with your work account
|
|
15
17
|
claude-personal # Claude Code with your personal account, in another terminal
|
|
@@ -35,6 +37,10 @@ The launchers are plain shell scripts. They keep working even if you uninstall m
|
|
|
35
37
|
|
|
36
38
|
## Features
|
|
37
39
|
|
|
40
|
+
- **Never reads your login** — the only keychain call checks whether an item exists; the contents of keychain items and `.credentials.json` are never opened. `migrate-default` and `restore` move whole account directories, and on Linux the credentials file moves with its directory without being opened.
|
|
41
|
+
- **No network** — multi-claude itself makes no network connections: no telemetry, no usage reporting, no update checks. Only the installer, pipx or Homebrew download the package.
|
|
42
|
+
- **Leaves your shell alone** — when `PATH` needs a change, it prints the line to add instead of editing `~/.zshrc` or `~/.bashrc`.
|
|
43
|
+
- **Changes only what you ask** — it writes its own configuration and state, the launchers, account directories (including the VS Code data that `code` keeps in `<root>/.apps`) and shared links. A Claude Code settings file is changed only by `statusline install` (the file you name, with a backup) and `add --config-from` (the new account's `settings.json`).
|
|
38
44
|
- **Migrate the default account** — move your existing `~/.claude` into the account root without logging out. `claude` keeps working exactly as before.
|
|
39
45
|
- **Add accounts** — create an account directory and a `claude-<name>` launcher, or adopt a directory you already have.
|
|
40
46
|
- **Per-account proxy** — a local port, an HTTP(S) proxy URL, `off`, or `inherit`.
|
|
@@ -42,7 +48,6 @@ The launchers are plain shell scripts. They keep working even if you uninstall m
|
|
|
42
48
|
- **One-step deployment** — `install.sh --config accounts.json` installs the tool and creates every account in the file.
|
|
43
49
|
- **Idempotent** — every command can be re-run safely. Write commands print only what changes (`--verbose` lists everything); conflicts with files multi-claude does not own are reported without changing anything; an interrupted migration resumes where it stopped.
|
|
44
50
|
- **Optional shared resources** — link `CLAUDE.md`, `skills`, `agents` and `commands` from one shared directory into selected accounts.
|
|
45
|
-
- **Hands off your credentials** — multi-claude never reads, copies or deletes logins. Its only keychain call checks whether an item exists.
|
|
46
51
|
|
|
47
52
|
## Requirements
|
|
48
53
|
|
|
@@ -175,6 +180,32 @@ Items that hold one account's own state cannot be shared: `.credentials.json`, `
|
|
|
175
180
|
|
|
176
181
|
**`skills/synced/`.** Claude Code stores skills synced from claude.ai in `skills/synced/`, one bucket per organization and account. If an account's `skills` is a real directory, turning sharing on is a conflict and multi-claude does not move anything. You may move the account's `skills/synced/<bucket>` into the shared directory's `skills/synced/` yourself: buckets of different accounts have different names and do not collide, but from then on that account's synced skills are written to the shared directory.
|
|
177
182
|
|
|
183
|
+
### Exporting and importing settings
|
|
184
|
+
|
|
185
|
+
```sh
|
|
186
|
+
multi-claude export work ~/work-settings.tar.gz # on this machine
|
|
187
|
+
multi-claude import ~/work-settings.tar.gz client # into another (existing) account, here or elsewhere
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
`export` writes `settings.json`, `CLAUDE.md`, `agents`, `commands`, `skills` and `output-styles` of the account, plus the MCP servers from its `.claude.json` (only the `mcpServers` entry), to a `.tar.gz` that only you can read. Logins, the rest of `.claude.json`, sessions, history and the plugin cache are never included. Items that are links (shared items) are skipped. If `settings.json` or the MCP servers contain values under names such as `API_KEY` or `Authorization`, `export` lists those names (not the values): treat the file like a password.
|
|
191
|
+
|
|
192
|
+
`import` copies the items into an account you created with `add`, and adds the MCP servers to its `.claude.json`. An item or MCP server that already exists with different content is a conflict: nothing is changed and the conflicts are listed. With `--force`, each one is first renamed to `<name>.multi-claude-bak.<timestamp>` and then replaced. An item that is a shared link is never replaced; turn sharing off for it first. `--dry-run` shows the plan. Restart running Claude sessions of the account after importing MCP servers; they keep their own copy of `.claude.json` and may overwrite the change.
|
|
193
|
+
|
|
194
|
+
Plugin choices travel in `settings.json` (`enabledPlugins`, `extraKnownMarketplaces`); Claude Code downloads the plugins again in the new account.
|
|
195
|
+
|
|
196
|
+
### Sharing MCP servers, plugins and settings
|
|
197
|
+
|
|
198
|
+
Shared links cover files and directories. For settings and MCP servers that every account should have, pass them on the command line of every launcher instead:
|
|
199
|
+
|
|
200
|
+
```sh
|
|
201
|
+
multi-claude args --defaults -- --mcp-config ~/.claude-shared/mcp.json --settings ~/.claude-shared/settings.json
|
|
202
|
+
multi-claude env --defaults CLAUDE_CODE_PLUGIN_CACHE_DIR=~/.claude-shared/plugins
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
- `--settings` is merged with each account's own `settings.json`: keys in the shared file win, other keys stay. Put `enabledPlugins`, `extraKnownMarketplaces`, `permissions` or `env` there.
|
|
206
|
+
- `--mcp-config` loads MCP servers from a JSON file (`{"mcpServers": {...}}`) in addition to each account's own. It takes several values, so keep another option after it (as `--settings` above); multi-claude warns otherwise.
|
|
207
|
+
- `CLAUDE_CODE_PLUGIN_CACHE_DIR` moves the plugins directory (marketplaces and the plugin cache), so plugins are downloaded once for all accounts.
|
|
208
|
+
|
|
178
209
|
### Choosing an account by directory
|
|
179
210
|
|
|
180
211
|
```sh
|
|
@@ -218,6 +249,23 @@ The command becomes `<path of multi-claude> statusline-hook '<original command>'
|
|
|
218
249
|
- If several settings files define `statusLine`, wrap the one that wins (for example a file passed with `--settings` in the launcher arguments).
|
|
219
250
|
- Run `multi-claude statusline uninstall FILE` before uninstalling multi-claude; otherwise the status line stays empty because the wrapped command cannot be found. Running `install` again after multi-claude moves updates the path.
|
|
220
251
|
|
|
252
|
+
#### Token history
|
|
253
|
+
|
|
254
|
+
```sh
|
|
255
|
+
multi-claude usage --history # tokens per day, last 7 days, every account
|
|
256
|
+
multi-claude usage --history work --days 30 --by model
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
```text
|
|
260
|
+
work:
|
|
261
|
+
DATE INPUT OUTPUT CACHE READ CACHE WRITE REPLIES
|
|
262
|
+
2026-10-01 1,246 499,681 273,254,361 5,926,527 612
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
`--history` counts the replies in the account's session files on this machine (`projects/**/*.jsonl`, including subagents): input, output, cache-read and cache-write tokens per day (local time) or per model. Only these counters are read; nothing else from the conversations is printed or stored, and nothing is sent anywhere. Sessions on other machines and deleted sessions are not counted. A session copied with `handoff` appears in both accounts; the `TOTAL` block counts each reply once. `--json` prints the same numbers for scripts.
|
|
266
|
+
|
|
267
|
+
`list` shows when each account was last used (`LAST USED`), from the newest session file or prompt history in its directory; a `handoff` into an account counts as use.
|
|
268
|
+
|
|
221
269
|
### Handing a session over to another account
|
|
222
270
|
|
|
223
271
|
Each account keeps its own sessions, so `claude --resume` in one account cannot see the sessions of another. `handoff` copies one session (its `.jsonl` file and the folder next to it with subagent transcripts and saved tool output) into the same project folder of another account:
|
|
@@ -336,6 +384,8 @@ With pipx, run `pipx upgrade multi-claude-cli`; with Homebrew, `brew upgrade mul
|
|
|
336
384
|
|
|
337
385
|
The one in `~/.claude`, as before: multi-claude does not change it. After [migrating `~/.claude`](#migrating-claude) it is the migrated account. `claude-auto` picks an account by directory instead; see [Choosing an account by directory](#choosing-an-account-by-directory).
|
|
338
386
|
|
|
387
|
+
There is no command that switches which account plain `claude` uses. Besides `~/.claude`, plain `claude` reads the login in the keychain (macOS) and `~/.claude.json`, and neither would follow such a switch, so two accounts would get mixed up. Use the launchers (`claude-work`), or `multi-claude route --default work` and start `claude-auto`.
|
|
388
|
+
|
|
339
389
|
### How do I continue a conversation with another account?
|
|
340
390
|
|
|
341
391
|
Inside the Claude session, run `! multi-claude handoff OTHER`, then run the command it prints in a new terminal. See [Handing a session over to another account](#handing-a-session-over-to-another-account).
|
|
@@ -350,7 +400,7 @@ By default the numbers come from the cache that Claude Code writes in `.claude.j
|
|
|
350
400
|
|
|
351
401
|
### Does multi-claude read or copy my login?
|
|
352
402
|
|
|
353
|
-
|
|
403
|
+
It never reads it: its only keychain call checks whether an item exists, and it never opens `.credentials.json`. It does not export, upload or back up logins. `migrate-default` and `restore` move a whole account directory; on Linux the credentials file is inside it and moves with it (in copy mode it is copied as part of the directory, verified, and the original directory is then removed unless you pass `--keep-backup`), still without being opened. On macOS a login is tied to the account directory's path, which is why `rename` keeps the directory.
|
|
354
404
|
|
|
355
405
|
## Reference
|
|
356
406
|
|
|
@@ -361,6 +411,8 @@ No. It never reads, copies or deletes credentials; its only keychain call checks
|
|
|
361
411
|
| `multi-claude init [--root DIR] [--bin-dir DIR] [--shared-dir DIR] [--shared-items A,B]` | Create or change global settings. |
|
|
362
412
|
| `multi-claude migrate-default [NAME] [--copy] [--keep-backup] [--proxy P] [--skip-process-check]` | Turn `~/.claude` into an account. Without NAME, the email address of its login is used. |
|
|
363
413
|
| `multi-claude restore NAME [--skip-process-check] [--dry-run]` | Undo `migrate-default`: move the account back to `~/.claude` and unregister it. The login is kept. |
|
|
414
|
+
| `multi-claude export NAME FILE` | Write the account's settings, `CLAUDE.md`, agents, commands, skills, output styles and MCP servers to FILE. No logins or sessions. |
|
|
415
|
+
| `multi-claude import FILE NAME [--force] [--dry-run]` | Import such a file into an existing account; conflicts are refused unless `--force` (which backs up first). |
|
|
364
416
|
| `multi-claude add NAME [--proxy P] [--shared [DIR] \| --no-shared] [--adopt] [--shared-exclude ITEM] [--shared-include ITEM] [--config-from OTHER]` | Add an account, adopt an existing directory, or change its options. `--config-from` copies `settings.json` from OTHER once. `--shared DIR` also makes DIR the shared directory for every account (default `~/.claude-shared`). `--shared-exclude` keeps one shared item out of this account; `--shared-include` undoes it. |
|
|
365
417
|
| `multi-claude set NAME [--proxy P] [--shared [DIR] \| --no-shared] [--shared-exclude ITEM] [--shared-include ITEM]` | Change an existing account; same options as `add` without `--adopt`. Returns 1 for an account that is not registered. |
|
|
366
418
|
| `multi-claude proxy NAME PORT\|URL\|off\|inherit` | Set an account's proxy. |
|
|
@@ -370,6 +422,7 @@ No. It never reads, copies or deletes credentials; its only keychain call checks
|
|
|
370
422
|
| `multi-claude apply [-f FILE]` | Converge everything to the configuration (or to `FILE`). |
|
|
371
423
|
| `multi-claude list [--verbose \| --json \| --names]` | Show accounts, launchers and login state. `--json` adds usage and is meant for scripts; `--names` prints only the names. |
|
|
372
424
|
| `multi-claude usage [NAME] [--json]` | Show the last known 5-hour and 7-day usage of each account. |
|
|
425
|
+
| `multi-claude usage --history [NAME] [--days N] [--by day\|model] [--json]` | Token usage per day or model, counted from the session files on this machine (default: 7 days). |
|
|
373
426
|
| `multi-claude doctor [--json] [--verbose]` | Check the configuration, launchers, account directories, shared links, logins and environment. |
|
|
374
427
|
| `multi-claude route DIR NAME`, `route DIR --remove`, `route --default NAME`, `route --no-default` | Choose an account by directory for `claude-auto`. |
|
|
375
428
|
| `multi-claude which [DIR]` | Show which account `claude-auto` would use in `DIR` (default: the current directory). |
|