Multi-Claude CLI: Switch Between Team and Personal Claude Code Accounts Instantly

Multi-Claude CLI: Switch Between Team and Personal Claude Code Accounts Instantly

A new npm package lets you manage multiple Claude CLI accounts with shared configs and cloud sync, perfect for switching between work and personal projects.

1d ago·3 min read·16 views·via hn_claude_cli
Share:

What It Does

@ghackk/multi-claude is an npm package that extends the official Claude CLI, allowing developers to manage multiple authenticated accounts. The core problem it solves is the friction of switching between different Claude Code contexts—like your personal account, your team's shared account, or a client-specific instance. Instead of manually logging in and out or juggling environment variables, you can switch profiles with a single command.

Key features include:

  • Profile Management: Create, list, and switch between named profiles (e.g., work, personal, client-alpha).
  • Shared Configuration: Profiles can share common MCP server configurations or model preferences, reducing setup duplication.
  • Cloud Sync (Optional): Securely sync your profile configurations (excluding API keys) across machines using your own cloud storage backend.
  • CLI Integration: It wraps the standard claude commands, so your existing workflows with claude code or claude chat remain unchanged once a profile is active.

Setup

Installation is straightforward via npm:

npm install -g @ghackk/multi-claude

After installation, the claude command is enhanced. Initialize your first profile by authenticating with Anthropic:

claude profile create work
# Follow the prompts to log in via browser for the 'work' account

Add a second profile, like for personal use:

claude profile create personal
# Authenticate with your personal Claude account

List all profiles:

claude profile list

Switch your active session:

claude profile use personal
# All subsequent `claude code` commands will use your personal account

When To Use It

This tool is most valuable in specific, real-world Claude Code scenarios:

  1. Separating Work and Personal Contexts: Use your team's Claude Code subscription with shared project context during the day, then seamlessly switch to your personal account for open-source contributions or learning projects in the evening. This prevents accidental use of the wrong API quota or mixing project histories.

  2. Freelancers or Agency Work: Manage separate profiles for different clients. Each profile can have its own set of frequently used MCP servers (like a client-specific database connector) and a dedicated chat history, keeping client work completely isolated and organized.

  3. Collaborative Team Settings: Share a claude.multi.config.json file (without API keys) in your team's repository. This file can define a shared work profile with pre-configured MCP servers for your internal tools (e.g., Jira, internal API docs). New team members just need to authenticate once and instantly have the correct, productive setup.

  4. Testing Different Models or Configurations: Create a beta profile to test commands with Claude 3.5 Sonnet's experimental features or a different set of system instructions in your CLAUDE.md, while keeping a stable main profile for your daily driver.

The cloud sync feature, while optional, is a power-user bonus. By pointing it to a secure directory in Dropbox, iCloud, or a private Git repo, you can ensure your profile configurations (like your curated list of MCP servers) are consistent across your desktop and laptop without manually copying files.

AI Analysis

Claude Code power users should immediately install this to solve account context switching. The primary workflow change is to stop using a single global Claude account. Instead, define profiles aligned with your project boundaries (e.g., `work-main-app`, `work-legacy-system`, `personal`). A key tip is to integrate profile switching into your project's `CLAUDE.md`. Add a comment at the top like `<!-- PROFILE: work-main-app -->` as a reminder. Better yet, create a small shell alias or script in your project root that runs `claude profile use work-main-app && claude code .` to ensure you're always in the right context when you start working. For teams, the shared configuration is the killer feature. Create a team `base` profile configuration that includes your essential MCP servers (e.g., for your internal design system, project management tool, and deployment logs). Document the one-time auth step, and new developers can be fully configured with the team's Claude Code ecosystem in under a minute.
Original sourcenpmjs.com

Trending Now

More in Products & Launches

View all