claude-multiprofile
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Basarisiz
- process.env — Environment variable access in src/cli.js
- fs.rmSync — Destructive file system operation in src/code.js
- fs.rmSync — Destructive file system operation in src/commands/extensions.js
- fs.rmSync — Destructive file system operation in src/commands/remove.js
- fs.rmSync — Destructive file system operation in src/desktop.js
Permissions Gecti
- Permissions — No dangerous permissions requested
This tool allows you to run multiple isolated Claude Desktop and Claude Code accounts side by side on macOS. It automates the creation of distinct profiles, app launchers, and shell aliases so you can easily switch between personal, work, or client environments.
Security Assessment
The overall risk is Medium. The tool uses environment variables to manage isolated configuration directories and relies on hardcoded, destructive file system operations (`fs.rmSync`) in multiple modules to delete profiles, launchers, and extensions. Because it manipulates local file structures and modifies shell configuration files (like `.zshrc` or `.bashrc`), it has the potential to cause accidental data or configuration loss if used incorrectly. However, there are no hardcoded secrets, no dangerous permissions requested, and no unexpected network requests. It simply orchestrates local app flags and directories.
Quality Assessment
The project is licensed under the standard MIT license and was actively updated recently. However, community trust and visibility are currently very low, with only 5 GitHub stars and no published npm package yet. As a young, unofficial community tool, it relies on undocumented environment variables that could break if Claude's underlying architecture changes in the future.
Verdict
Use with caution—review the shell scripts and destructive commands before executing profile removals.
Run multiple Claude Desktop and Claude Code accounts side by side on macOS. Fully isolated profiles for personal, work, and clients.
claude-multiprofile
Run multiple Claude accounts side by side on macOS. Personal and work, multiple clients, separate test accounts. Each profile is fully isolated: its own login, chats, settings, MCP connectors, plugins, and skills. No more signing out of one account to use another.
Works for both Claude Desktop (the GUI app) and Claude Code (the terminal CLI), independently or together.
See it in action: examples/walkthrough.md — a full session showing every prompt and output.
Disclaimer. This is an unofficial community tool. It uses public Electron flags (
--user-data-dir) and a stable but undocumented Claude Code environment variable (CLAUDE_CONFIG_DIR) to keep profiles isolated. Anthropic engineers have engaged on the open feature requests for native multi-account in both apps, so the approach is well known, but it is not officially supported. If a future Claude release changes how profiles work, this tool will need to catch up.
Why this exists
Claude Desktop and Claude Code both assume a single signed-in account. There's no built-in profile switcher today (open feature requests: Desktop, Desktop UI). The standard workaround is a manual setup:
- For Desktop, launch with
open -n -a "Claude" --args --user-data-dir=...against a custom data folder - For Code, set
CLAUDE_CONFIG_DIR=...before runningclaude
Both work. Both are fiddly to set up and easy to mess up. This tool automates the whole thing, including the things people forget:
- Generating a real macOS
.applauncher you can drag to the Dock - Copying the Claude icon onto the launcher so it's visually distinct
- Adding a properly quoted shell alias to the right rc file (zsh, bash, fish)
- Seeding new Code profiles from your existing
~/.claudeso plugins and MCP servers carry over (without leaking auth) - Tracking everything in a registry so you can list, status-check, and cleanly remove profiles
Install
From GitHub (recommended for now)
npm install -g github:jmdarre-v/claude-multiprofile
This installs the latest commit from the main branch. To update, re-run the same command.
From npm
Not yet published. Will be available as a scoped package (@jmdarre-v/claude-multiprofile) once it stabilizes.
Requirements
Node 18 or newer. macOS is required for Claude Desktop profiles. Claude Code profiles work on macOS and Linux.
Quick start
claude-multiprofile add
The wizard walks you through every choice, explains what each step does, and lets you accept defaults if you don't care. A typical first run takes about 30 seconds.
After it finishes, you'll have a new launcher .app on your Dock (for Desktop) and a new shell alias like claude-work (for Code). Sign in once on each, and you're done.
What gets created
For a profile named work, with both Desktop and Code targets, the tool creates:
~/Library/Application Support/Claude-WORK/ ← Desktop data folder
~/Applications/Claude WORK.app ← Desktop launcher (drag to Dock)
~/.claude-work/ ← Code config folder
~/.zshrc ← adds: alias claude-work='...'
~/.config/claude-multiprofile/profiles.json ← registry entry
Nothing about your existing default Claude install changes. Your current login, chats, MCP servers, and skills stay exactly where they are.
How it works
Claude Desktop
Claude Desktop is built on Electron. Electron honors the --user-data-dir command-line flag, which moves the entire app state (auth tokens, chat list, settings, MCP connectors, projects, custom styles) to a directory of your choosing. Two .app launchers pointed at two different data folders give you two fully independent Desktop instances.
The launcher .app is a tiny AppleScript bundle generated by osacompile, a built-in macOS tool. The script is one line: do shell script "open -n -a 'Claude' --args --user-data-dir='/path/to/your/profile'". The -n flag forces a new instance even when Claude is already running, which is what makes side-by-side launches work.
Claude Code
Claude Code (the terminal CLI) honors the CLAUDE_CONFIG_DIR environment variable. Set it to a folder, and Claude Code reads/writes all of its state (project memory, plugins, skills, MCP servers, slash commands) under that folder instead of the default ~/.claude.
Authentication is the interesting bit. Claude Code stores its OAuth token in macOS Keychain, keyed by a SHA-256 hash of the active CLAUDE_CONFIG_DIR. Different config dir, different keychain entry, completely separate session. You can copy a config folder around without leaking auth.
This means you can seed a new Code profile from your existing ~/.claude (carrying over skills, plugins, and MCP servers) and the new profile will still ask you to log in fresh. The wizard offers this by default.
Commands
claude-multiprofile add
Interactive wizard. Walks through:
- Whether to set up Desktop, Code, or both
- The profile name (e.g.
work,work,client-acme) - Where the data/config folders should live
- Where to save the launcher .app (Desktop only)
- Whether to copy the Claude icon onto the launcher (Desktop only)
- The shell alias name (Code only)
- Whether to seed the new Code profile from your existing
~/.claude(Code only)
Then prints a plan, asks for confirmation, and applies.
claude-multiprofile list
Prints every configured profile with its paths and creation date.
claude-multiprofile status
Walks every profile and verifies the directories, .app, and shell aliases still exist. Useful after a machine migration or after manually editing your .zshrc.
claude-multiprofile extensions <profile>
Copy Claude Desktop extensions from your default install into a Desktop profile, interactively.
When you create a profile, it starts empty by design — none of your default install's extensions, settings, or chats follow it over. That isolation is the point. But re-installing every extension on every profile by hand is tedious. This command is the relief valve.
The flow:
- Reads the extension list from your default Claude Desktop data folder (
~/Library/Application Support/Claude/Claude Extensions/) - Shows a multi-select prompt with each extension. Extensions already in the target profile are pre-deselected; new ones are pre-selected
- Copies the selected extension folders AND their matching settings files (
Claude Extensions Settings/<id>.json) into the target profile - If conflicts exist, asks once whether to overwrite (or use
--forceto skip the prompt)
claude-multiprofile extensions work # interactive
claude-multiprofile extensions work --force # overwrite conflicts without asking
Restart Claude Desktop after running this for the new extensions to load.
This command does not apply to Code-only profiles (extensions are a Desktop concept).
claude-multiprofile repair <name>
Re-registers a profile's launcher .app with macOS LaunchServices. Use this if the Dock icon stops responding to double-clicks even though the .app bundle is intact and open path/to/Claude\ Work.app from the terminal still works.
The underlying cause is a stale LaunchServices cache, which can happen after macOS updates, app moves, or sometimes for no clear reason. The command runs lsregister -f on the launcher and touches the bundle to nudge the icon cache. Running it on a healthy profile is harmless.
For Code-only profiles, this command has nothing to repair (there's no .app) and exits cleanly.
claude-multiprofile remove [name]
Tears down a profile. Removes the launcher .app, the shell alias, and the registry entry. By default the data folders are kept (so you can recover your chats if you change your mind). The wizard asks separately about deleting the data folders.
claude-multiprofile help / --version
Self-explanatory.
First-launch checklist
This is the part most guides skip and most users get burned by.
Desktop: signing in for the first time
Claude Desktop's sign-in flow uses a claude:// deep link that macOS hands to whichever Claude instance is running. If two are open at once, the auth token can land on the wrong one and you'll end up with both profiles signed into the same account.
The fix is simple but important:
- Quit any other Claude window with Cmd+Q before doing the very first launch of the new profile.
- Double-click the new launcher (or run
open ~/Applications/Claude\ WORK.app). - Sign in with the account for this profile.
- Quit (Cmd+Q) once you've confirmed it logged in correctly.
From that point on, both profiles can run simultaneously. The auth token is stored in the per-profile data folder and won't get re-routed.
Code: signing in for the first time
source ~/.zshrc # or open a new terminal tab
claude-work # launches Claude Code with CLAUDE_CONFIG_DIR set
Inside the REPL, run /login. A browser tab opens. Sign in with the account for this profile. The OAuth token gets stored in Keychain under a key derived from the profile's config dir, so it's fully separate from your default account.
Common patterns
Per-project default profile
If you always want a specific profile active in a particular repo, drop a .envrc (with direnv) or a .env file:
export CLAUDE_CONFIG_DIR="$HOME/.claude-work"
When you cd into the repo, the variable is set automatically. Plain claude from inside that directory uses the right profile.
Visual disambiguation
By default, all profile launcher .apps share the Claude icon. If you want them visually distinct on the Dock:
- Right-click
~/Applications/Claude WORK.app→ Get Info - Drag any image (PNG, ICNS, JPG) onto the small icon in the top-left of the Info window
- The Dock and Cmd-Tab will pick up the new icon within a few seconds
For the terminal side, you can prefix with a colored slash command:
alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude -e "/color blue"'
/color makes the Claude Code REPL prompt visually distinct so you don't lose track of which account you're in.
Sharing skills between profiles
Profiles are independent, so installing a skill in one doesn't affect the others. If you want one set of skills available to all your profiles, symlink the skills directory:
rm -rf ~/.claude-work/skills
ln -s ~/.claude/skills ~/.claude-work/skills
Same trick works for plugins or any sub-folder you want to share. Be careful with projects/ if you want chat history to stay separate, that's the folder you do not want shared.
Troubleshooting
The new Desktop profile launched already signed into my other account.
You launched it while the other Claude instance was running. The claude:// auth deep link got routed to the wrong app. Fix:
rm -rf ~/Library/Application\ Support/Claude-WORK
Then quit ALL Claude windows (Cmd+Q) and launch the new profile again. It'll start fresh and you can sign in cleanly.
The launcher icon stopped responding to double-clicks but open from terminal still works.
This is a stale macOS LaunchServices cache, often combined with a stale Dock icon cache. Run:
claude-multiprofile repair <profile-name>
The command re-registers the .app with LaunchServices, refreshes the icon cache, and restarts the Dock so it picks up the new registration. The Dock will blink briefly (less than a second) and then come back. If clicking still doesn't work after that, log out and back in to force a full LaunchServices reset.
The shell alias isn't found.
Aliases live in your shell's rc file but they only get loaded when a new shell starts. Either open a new terminal tab or source ~/.zshrc (or whatever your shell's rc file is). Run claude-multiprofile status to confirm the alias is actually in the rc file.
The launcher .app shows the AppleScript icon, not Claude's.
You answered "no" to the icon copy step, or your Claude.app install is in a non-standard location. Either re-run claude-multiprofile add (and remove the old profile first) or copy the icon manually:
cp /Applications/Claude.app/Contents/Resources/*.icns \
~/Applications/Claude\ WORK.app/Contents/Resources/applet.icns
touch ~/Applications/Claude\ WORK.app
I want to see what's in the registry.
cat ~/.config/claude-multiprofile/profiles.json
It's a plain JSON file. You can inspect or hand-edit it, though running the CLI commands is safer.
I'm on Linux.
The Code half works fine on Linux, the Desktop half doesn't (Claude Desktop is macOS-only at the moment). The wizard skips Desktop questions on non-macOS automatically.
Comparison with similar tools
| Tool | Desktop | Code | Mac | Linux | Notes |
|---|---|---|---|---|---|
| claude-multiprofile (this) | yes | yes | yes | partial | Single tool for both, interactive wizard |
| aimux | no | yes | yes | yes | Code only, also handles symlink-sharing |
| aisw | no | yes | yes | yes | Rust binary, also covers Codex CLI and Gemini CLI |
| Jean-Claude | no | yes | yes | yes | Cross-machine sync, opinionated dotfiles |
| Manual setup | yes | yes | yes | yes | Documented in several places |
The pitch for this tool over the others: it's the only one that handles Claude Desktop alongside Claude Code in a single command, and the interactive wizard means you don't have to remember the right flags or know in advance where files should go.
Security notes
The tool reads and writes the following on your machine:
~/Library/Application Support/Claude-{Name}/(creates new folders only)~/Applications/(creates new .app bundles only)~/.claude-{name}/(creates new folders only)~/.zshrc,~/.bash_profile, or~/.config/fish/config.fish(adds a delimited managed block; never touches lines outside the markers)~/.config/claude-multiprofile/profiles.json(the registry)
It does not touch:
- Your default Claude data folder (
~/Library/Application Support/Claude/) - Your default
~/.claude(except to read it for seeding, never to write) - macOS Keychain (Claude Code's auth lives there but the tool never reads or writes Keychain entries)
- Anything else on your filesystem
The single npm dependency is @inquirer/prompts, the standard interactive-prompt library used by npm itself and most modern CLI tools.
Contributing
Issues and PRs welcome. The codebase is small and aggressively commented, so it should be easy to navigate. Run the tests with npm test.
License
MIT
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi