@ghackk/multi-claude

中文文档
1.0.35发布于 2026/10/11MIT零依赖近 30 天下载 7840

Run multiple Claude CLI accounts with shared settings, plugins, marketplace sync, and backup/restore

原始使用文档
文档目录29 节
  1. Why?
  2. Automatic application updates (v1.0.29 working branch)
  3. Get Started in 10 Seconds
  4. Features
  5. Install
  6. One-liner (recommended)
  7. npm
  8. pip
  9. Homebrew (macOS / Linux)
  10. Scoop (Windows)
  11. AUR (Arch Linux)
  12. Manual (git clone)
  13. Menu Overview
  14. Main Menu
  15. Shared Settings (Option 8)
  16. Plugins & Marketplace (Option 9)
  17. Export / Import Profile (Options E & I)
  18. Cloud Backup & Restore (Options C & R)
  19. Direct Profile Launch
  20. How It Works
  21. Merge Strategy
  22. Folder Structure
  23. Documentation
  24. Platform Support
  25. Requirements
  26. Contributing
  27. Credits
  28. License
  29. Usage history (v1.0.26)

claude-multi-account

Run multiple Claude CLI accounts with shared settings, plugins, marketplace sync, and backup/restore.

npm PyPI License: MIT Platform GitHub Stars

multi-claude demo

Why?

Automatic application updates (v1.0.29 working branch)

Each menu launch starts a nonblocking check of https://pair.ghackk.com/updates/stable.json. If the server is unavailable, the updater checks the signed stable.json asset on the latest GitHub release. The application keeps running while the check happens. Failed checks back off for 15 minutes; offline operation uses the last working installation.

The manifest is signed with a pinned Ed25519 key and contains a version, expiry, Node requirement, exact archive size and SHA-256 hash. Downloads try the server-hosted archive, then the GitHub release archive. On Windows the transport fallbacks are Node HTTPS, curl, then PowerShell; macOS/Linux use Node HTTPS then curl. All paths require HTTPS. Invalid signatures, expired manifests, corrupt archives and downgrades are rejected.

Updates install application files into ~/.multi-claude-updates/versions/, then atomically switch the selected version after validation. The next menu launch uses that version. The prior installed package and cached version remain available if a cached release is incomplete. Account profiles, credentials, backups and usage history are never part of the update directory. No administrator access, package-manager switching or lifecycle scripts are needed.

This updates the running application, not npm/pip/Homebrew/Scoop's installed-version records. multi-claude --version reports the selected application version. multi-claude --update-status shows the base version, selected version and last result; multi-claude --update-now waits for a check. Set MULTI_CLAUDE_AUTO_UPDATE=0 to disable background checks. Explicit checks remain available.

Versions before 1.0.29 need a one-time upgrade to obtain this updater. A source Git checkout is no longer silently pulled by the pip launcher; application updates follow the signed release feed.

Maintainers publish a normal npm pack --ignore-scripts archive as a GitHub release asset. The release helper local-usage/publish-channels.py VERSION also calls local-usage/publish-update-feed.py VERSION, uploading the archive to the server, checking its hash remotely, atomically activating the manifest, and mirroring the signed manifest on GitHub. Signing credentials stay outside the public repository. Existing versioned archives are immutable. Renew the manifest before its 89-day expiry if no new release is made; clients remain usable offline after expiry.

Before vs After

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.

claude-multi-account fixes this:

  • Isolated profiles — each account gets its own config directory, no conflicts
  • Shared settings — define MCP servers, env vars, plugins, and CLAUDE.md once — auto-applied everywhere
  • Plugin & marketplace management — enable plugins globally or per-account, browse marketplace indexes
  • Direct launch — run claude-work or claude-personal directly from any terminal, no menu needed
  • Cloud backup & restore — securely sync all profiles to the cloud and restore on any machine
  • One command — launch any account instantly from an interactive menu

Get Started in 10 Seconds

Quick Start

Features

Multi-Account Management
Create, launch, rename, and delete independent Claude CLI profiles

Shared MCP & Settings
Define MCP servers, env vars, and preferences once — sync to all accounts

Plugins & Marketplace
Enable/disable plugins globally or per-account, browse and manage marketplace indexes

Global CLAUDE.md
Write instructions and skills that apply across every account

Backup & Restore
Timestamped local archives of all accounts and configs with one click

Export / Import Profiles
Copy a profile between machines as a single base64 token — credentials, settings, and launcher included

Cloud Backup & Restore
Securely sync all profiles to the cloud — restore on any machine with a single command

Direct Profile Launch
Each profile is auto-registered on PATH — run claude-work directly from any terminal

Auto Dependency Detection
Detects and offers to install missing dependencies (curl, jq, etc.) on first run

Run from Repo
Add the repo to your PATH — git pull instantly updates the menu, no manual copying


Install

Install methods

Pick any method — they all give you the claude-menu (or multi-claude) command.

# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/ghackk/claude-multi-account/master/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/ghackk/claude-multi-account/master/install.ps1 | iex

npm

npm install -g @ghackk/multi-claude

pip

pip install multi-claude

Homebrew (macOS / Linux)

brew install ghackk/tap/multi-claude

Scoop (Windows)

scoop bucket add multi-claude https://github.com/ghackk/scoop-multi-claude
scoop install multi-claude

AUR (Arch Linux)

yay -S multi-claude

Manual (git clone)

# Linux / macOS
git clone https://github.com/ghackk/claude-multi-account.git ~/claude-multi-account
bash unix/install.sh
# Windows
git clone https://github.com/ghackk/claude-multi-account.git $HOME\claude-multi-account
[Environment]::SetEnvironmentVariable("PATH", "$HOME\claude-multi-account;" + [Environment]::GetEnvironmentVariable("PATH", "User"), "User")

Then open a new terminal and run claude-menu.


Menu Overview

Main Menu

Main Menu
======================================
       Claude Account Manager
======================================
  Current Accounts:

  1. claude-work     [logged in]   (last used: 02 Mar 2026 10:30 AM)
  2. claude-personal [logged in]   (last used: 01 Mar 2026 08:15 PM)

======================================
  1. List Accounts
  2. Create New Account
  3. Launch Account
  4. Rename Account
  5. Delete Account
  6. Backup Sessions (Local)
  7. Restore Sessions (Local)
  8. Shared Settings (MCP/Skills)
  9. Plugins & Marketplace
  E. Export Profile (Token)
  I. Import Profile (Token)
  C. Cloud Backup
  R. Cloud Restore
  0. Exit
======================================

Shared Settings (Option 8)

Shared Settings

Manage universal settings applied to all accounts on launch:

OptionAction
1Edit MCP + Settings (opens in editor)
2Edit Skills/Instructions (CLAUDE.md)
3View current shared settings
4Sync shared settings to ALL accounts
5Show MCP server list
6Reset shared settings

Plugins & Marketplace (Option 9)

Browse marketplace indexes and manage plugins across accounts:

OptionAction
1Enable plugin for ALL accounts
2Enable plugin for one account
3Disable plugin (shared)
4Disable plugin (one account)
5Browse marketplace plugins
6Marketplace Management (add/remove/sync)

Export / Import Profile (Options E & I)

Export Profile

Transfer a profile between machines using a copy-pasteable base64 token:

OptionAction
EExport a profile — generates a compact token (~5 KB) containing credentials, settings, and launcher
IImport a profile — paste the token to restore the account on any machine

The token bundles only essentials (credentials, settings, CLAUDE.md, launcher) — not cache or conversation history.

Cloud Backup & Restore (Options C & R)

Cloud Backup

Sync all profiles to the cloud and restore on any machine:

OptionAction
CCloud Backup — select profiles and optional folders (shared settings, plugins, etc.) to upload securely
RCloud Restore — enter your route key to download and restore all profiles on a new machine

Profiles are automatically registered on PATH after restore, so you can run claude-work immediately.

Direct Profile Launch

Direct Launch

Every profile you create is automatically available as a command:

# No need to open the menu — just run the profile name directly
claude-work
claude-personal

On Linux/macOS/Termux, symlinks are created in ~/.local/bin/. On Windows, the accounts directory is added to your user PATH. Profiles created, imported, or restored are all registered automatically.


How It Works

How it works
┌─────────────┐      ┌──────────────────┐      ┌─────────────────┐
│  You pick    │ ───> │  Shared settings │ ───> │  Claude CLI     │
│  an account  │      │  + plugins are   │      │  launches with  │
│  from menu   │      │  merged in       │      │  isolated config│
└─────────────┘      └──────────────────┘      └─────────────────┘

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.

Merge Strategy

Settings are deep-merged with shared settings winning on conflict:

ScenarioResult
Key exists only in accountKept
Key exists only in sharedAdded
Key exists in both (simple value)Shared wins
Key exists in both (nested object)Recursively merged

For CLAUDE.md, shared content is inserted between auto-managed markers at the top. Account-specific instructions below the markers are preserved.


Folder Structure

Folder Structure
~/
├── claude-multi-account/      # Git repo (can be added to PATH directly)
│   ├── claude-menu.ps1        # Windows menu script
│   ├── claude-menu.bat        # Windows launcher
│   ├── windows/               # Windows-specific scripts
│   └── unix/                  # Linux/macOS scripts
│
├── claude-accounts/           # Account launchers (auto-created)
│   ├── claude-work.bat/.sh    # Account launcher
│   └── claude-personal.bat/.sh
│
├── claude-shared/             # Shared config (applied to all accounts)
│   ├── settings.json          # MCP servers, env vars, preferences, enabledPlugins, extraKnownMarketplaces
│   ├── CLAUDE.md              # Global instructions & skills
│   └── plugins/               # Shared plugin & marketplace data
│       └── marketplaces/      # Cached marketplace indexes
│
├── claude-backups/            # Timestamped backup archives
│
├── .claude-work/              # Account: work (auto-created)
├── .claude-personal/          # Account: personal (auto-created)
└── .claude-<name>/            # Account: <name>

Documentation


Platform Support

Platform Support

Requirements

  • Claude CLI installed and available in PATH
  • Windows: PowerShell 5.1+ (dependencies auto-detected via winget/scoop)
  • Linux/macOS: Bash 3.2+ (the macOS system Bash works). Dependencies including curl, jq, Python 3, and Node.js are checked on first run.
  • Termux: Supported — dependencies installed via pkg

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.


Credits

Built by Gyanesh Kumar


License

MIT

Usage history (v1.0.26)

Usage reporting is always on. To merge another PC's history, run node ~/claude-accounts/usage/report.js merge /path/to/usage.db. Usage is keyed by normalized email and reply ID: renaming claude-zf to claude-zafff, creating another profile for the same email, or reporting from a laptop with empty history never resets the server's all-time totals. Restored copies are deduplicated.

The menu installs background session hooks, launcher triggers, and a 15-minute Windows scheduled task, macOS LaunchAgent, or Linux cron entry. Requires Node.js 22.13+. The dashboard shows UTC periods, model/month/device totals, account limits, and Claude Code's stats-cache comparison. Usage tracking details.

macOS supports both Apple Silicon and Intel, including profile-specific Keychain credentials for account transfer and usage limits. Account renaming preserves the Keychain login. npm installation does not require lifecycle scripts, including with npm 12's defaults. Run multi-claude after installation to set up launchers and usage history.

版本与发布记录

@ghackk/multi-claude 共发布 32 个版本,首次发布于 2026/03/13;过去 12 个月发布了 32 个版本。

版本发布日期距今
1.0.35latest2026/10/111 个月前
1.0.342026/10/041 个月前
1.0.332026/10/031 个月前
1.0.322026/10/031 个月前
1.0.312026/10/021 个月前
1.0.302026/10/021 个月前

关于 @ghackk/multi-claude 的常见问题

@ghackk/multi-claude 是什么?

Run multiple Claude CLI accounts with shared settings, plugins, marketplace sync, and backup/restore

如何安装 @ghackk/multi-claude?

在项目目录运行 npm install @ghackk/multi-claude,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 multi-claude,可以用 npx multi-claude 直接运行。

@ghackk/multi-claude 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ghackk__multi-claude 是否存在。

@ghackk/multi-claude 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.13。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ghackk/multi-claude 可以商用吗?

@ghackk/multi-claude 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ghackk/multi-claude 的下载量有多少?

根据 npm 官方下载统计,@ghackk/multi-claude 在 2026/10/17 – 2026/11/15 这 30 天内被下载 7,840 次,日均约 261 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ghackk/multi-claude 还在维护吗?

最新版本 1.0.35 发布于 2026/10/11(1 个月前);至今共发布 32 个版本,其中过去 12 个月发布了 32 个;首次发布于 2026/03/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。