Run multiple Claude Desktop and Claude Code accounts side by side on macOS without repeatedly logging out.
Claude split is a small shell utility. It does not copy, inspect, or store your passwords or OAuth tokens. Claude performs authentication normally; the tool only gives each profile isolated local state and routes Desktop OAuth callbacks to the profile that initiated them.
Unofficial community project. Not affiliated with or endorsed by Anthropic.
A second Claude Desktop window is easy to start with a separate Electron user-data-dir, but there is a less obvious problem: browser authentication returns through the system-wide claude:// URL scheme. macOS normally associates that scheme with the stock Claude app, so Chrome can send a named profile's OAuth callback back to the default Claude instance.
This project handles both sides:
- isolated Claude Code config/auth contexts;
- isolated Claude Desktop cookies, local storage, sessions, and app state;
- a tiny per-profile macOS URL-router app;
- temporary
claude://reassignment while a named profile is signing in; - automatic restoration of the stock Claude handler after the callback;
- macOS;
- Claude Desktop installed in
/Applications/Claude.app; - Claude Code installed and available as
claude; dutifor automatic browser OAuth callback routing.
Install duti once:
brew install dutiNamed Desktop profiles can still launch without duti; only automatic browser-login routing requires it.
git clone https://github.com/samrand96/claude-split.git
cd claude-split
./install.shIf ~/.local/bin is not on PATH:
export PATH="$HOME/.local/bin:$PATH"Then:
clp doctorYour existing installation is the special default profile:
clp code default
clp desktop defaultCreate a second account/profile:
clp add workAuthenticate Claude Code into the intended account:
clp login work
clp auth workFor the first Desktop login (or any later browser-based re-login), use:
clp desktop-login workThis is intentionally different from a normal launch. desktop-login temporarily routes the system claude:// scheme to the work profile. Complete sign-in in Chrome and choose Open when Chrome asks to open the app. The OAuth callback is forwarded to the work Desktop instance and the normal Claude URL handler is restored automatically.
After the profile is authenticated, normal launches are simply:
clp desktop work
clp code workYou can run several profiles concurrently:
Terminal 1: clp code default
Terminal 2: clp code work
Desktop 1: clp desktop default
Desktop 2: clp desktop work
clp add <profile> Create an isolated profile
clp list List profiles
clp use <profile> Save the active profile
clp current Show the active profile
clp auth [profile] Show Claude Code auth for the profile
clp login [profile] Log that profile into Claude Code
clp logout [profile] Log that profile out of Claude Code
clp code [profile] [-- args...] Launch Claude Code
clp desktop [profile] Launch an already-authenticated Desktop profile
clp desktop-login [profile] Launch Desktop with browser OAuth routing enabled
clp both [profile] [-- args...] Launch Desktop and Claude Code
clp callback <profile> <claude://URL> Manually forward a deep link to a profile
clp handler Show the current claude:// handler
clp handler reset Restore the stock Claude handler
clp doctor Diagnose the setup
clp path <profile> Show profile storage paths
clp purge <profile> Delete local data for a named profile
Claude Desktop responds to the system-wide claude:// URL scheme. A browser-based login eventually redirects to a URL such as:
claude://login/...
Without routing, macOS gives that URL to its registered Claude handler, normally the default app. That means merely launching two Electron instances with different --user-data-dir values is not sufficient for multi-account login.
For every named profile, clp creates a tiny AppleScript application under:
~/Applications/Claude Split/Claude Split - <profile>.app
The helper contains no credentials. Its only jobs are:
- receive
claude://from LaunchServices; - call
clpwith the profile name and callback URL; - launch the real signed
/Applications/Claude.appexecutable using that profile's Desktop and Code directories; - restore
claude://to the stock Claude bundle after an OAuth callback.
duti is used to switch the URL-scheme handler reliably.
If a browser ever gives you the callback URL but routing does not happen automatically:
clp callback work 'claude://login/...'To force the normal handler back at any time:
clp handler resetEach named profile gets its own config directory:
~/.local/share/claude-split/profiles/<profile>/code/
For that profile, clp launches Claude Code with:
CLAUDE_CONFIG_DIR=<profile code dir>
CLAUDE_SECURESTORAGE_CONFIG_DIR=<profile code dir>
Use this before opening the corresponding Desktop account:
clp auth workThat makes it easy to verify which Claude Code identity is associated with the profile.
A shell can contain old settings from local LLMs, gateways, cloud providers, or development proxies. These can make Claude Code behave differently from Claude Desktop. For every Claude process it launches, clp removes overrides including:
ANTHROPIC_API_KEY
ANTHROPIC_AUTH_TOKEN
ANTHROPIC_BASE_URL
ANTHROPIC_CUSTOM_HEADERS
CLAUDE_CODE_USE_VERTEX
CLAUDE_CODE_USE_BEDROCK
CLAUDE_CODE_USE_FOUNDRY
GOOGLE_APPLICATION_CREDENTIALS
HTTP_PROXY / HTTPS_PROXY / ALL_PROXY
http_proxy / https_proxy / all_proxy
NODE_OPTIONS
This cleanup is process-local. It does not modify your shell, repositories, or project .env files.
Run:
clp doctorif CLI and Desktop behave differently.
~/.local/share/claude-split/
├── active-profile
├── pending-desktop-auth
├── logs/
└── profiles/
├── work/code/
└── client-a/code/
~/Library/Application Support/Claude-Split/
├── work/
└── client-a/
~/Applications/Claude Split/
├── Claude Split - work.app
└── Claude Split - client-a.app
The existing default Claude directories are not moved or rewritten.
# personal/default
clp code default
clp desktop default
# work
clp code work
clp desktop work
# if work Desktop needs to authenticate again
clp desktop-login workSee what macOS currently uses for claude://:
clp handlerRestore normal routing:
clp handler resetSee paths for a profile:
clp path workSee the named Desktop process log:
tail -f ~/.local/share/claude-split/logs/desktop-work.logIf clp desktop-login work says duti is missing:
brew install dutiThen retry.
clp purge workYou must type the profile name to confirm. The utility deliberately does not read or delete secret Keychain values.
./uninstall.shUninstall restores the stock Claude URL handler before removing the launchers and helper apps. Profile data is retained.
No API keys, OAuth tokens, cookies, or passwords are placed in this repository. Profile state remains in local Claude directories and macOS credential storage.
See SECURITY.md.
MIT.