I got tired of logging in and out of Claude Code, so I built a one-command account switcher A developer built cc-switch, a one-command CLI tool that lets users switch between multiple Claude Code accounts by exploiting the CLAUDE_CONFIG_DIR environment variable, which Claude Code uses as the root for credentials, settings, and session transcripts. The tool creates separate profile directories for each account and supports a "shared" mode that symlinks chat folders back to the original config so conversation history persists across logins. The developer also documented a Windows/PowerShell hazard: Remove-Item -Recurse follows NTFS junctions and would have deleted the real chat history, fixed by deleting the reparse points before recursing. Quick confession: last week I logged out of my work Claude Code account four times in one afternoon. Nothing was broken. I just have a second account for personal projects, and Claude Code can only be logged into one of them at a time. Sign in with the personal account and the work one is gone. Sign back in with work and personal is gone. Every switch is a browser tab, an OAuth dance and about forty seconds of my life. Multiply that by "I switch contexts a lot" and you get a genuinely annoying week. So I fixed it. The result is cc-switch , and the whole thing is one command: ccp use personal Every claude you launch after that runs under the personal account. ccp use work flips it back. No re-login, no browser, no forty seconds. And ccp list tells you who is who: Claude Code profiles -------------------- default alice@company.com personal shared alice@gmail.com client-x isolated alice@client-x.com I expected to need something hacky with credential files. I didn't. Claude Code reads an environment variable called CLAUDE CONFIG DIR and uses it as the root for everything it stores: credentials, settings, session transcripts, the lot. Point it at a different folder and you get a completely separate identity. So a "profile" in cc-switch is literally a directory: ~/.claude-profiles/ personal/ ← its own login client-x/ ← its own login ~/.claude ← your original account, untouched "default" ccp use