alt.hn

7/30/2026 at 2:58:59 PM

Show HN: Claude-account – switch Claude Code accounts without logging in again

https://github.com/hamzarehmandeveloper/claude-account

by hamza_rehman

7/30/2026 at 9:19:34 PM

Is it even safe to switch accounts frequently? worried about them imposing a ban

by hassanmehdi98

7/30/2026 at 4:12:18 PM

I use this: https://gist.github.com/KMJ-007/0979814968722051620461ab2aa0...

Simple and works great but requires one alias per account

by pandoro

7/30/2026 at 4:25:42 PM

This is great. My enhancement was to create a .claude-profile file which specifies the account alias. "claude" can be aliased to read the file, set the correct env var, and launch claude.

Another benefit was if no .claude-profile file exists, claude refuses to launch.

by cowlby

7/30/2026 at 4:17:00 PM

simple and easy - thank you

by orliesaurus

7/30/2026 at 5:10:11 PM

appreciate you building this! I have two Claude max accounts. The way I do it is that I have two app launchers (claude desktop). I use the desktop app and a different data directory for each launcher like `open -n -a /Applications/Claude.app --args --user-data-dir="<its profile directory>"`. I got my first Claude to make me two different launchers for the two apps, and it's been working perfectly. wdyt?

The only problem I've noticed is with Claude in Chrome. It seems to not work well in the second account. And this makes sense because it was designed just for one app. Do you find yourself having the same problem with this setup? have you tried the second one with the Claude in Chrome ext?

by carloslfu

7/30/2026 at 4:42:57 PM

Does it share the global ~/.claude/CLAUDE.md file? For some use case I'd like that, for others it could be problematic.

by dotancohen

7/30/2026 at 4:47:04 PM

Do you expect vibe-coded slop to care about such things? Also, there's already another app, https://github.com/realiti4/claude-swap, which is also vibe-coded, but it's maintained and tested.

by cute_boi

7/30/2026 at 5:29:20 PM

  > Do you expect vibe-coded slop to care about such things?
I'm divorced - I no longer have any expectations. I ask.

by dotancohen

7/30/2026 at 5:10:53 PM

thanks for sharing this one!

by carloslfu

7/30/2026 at 6:44:08 PM

I built the same thing for myself, but I like your implementation so much better.

by hmokiguess

7/30/2026 at 4:35:47 PM

Or use https://omp.sh and add multiple accounts. omp tracks usage and when limit is reached it uses the next account.

by bdemirkir

7/30/2026 at 4:45:11 PM

Sadly incompatible with Claude subs.

by AlexErrant

7/30/2026 at 5:37:36 PM

Subs are supported

by bdemirkir

7/30/2026 at 7:28:14 PM

Doesn't this require pi, which CC famously bans you for using?

by AlexErrant

7/30/2026 at 5:36:43 PM

I use the Claude Code desktop app for work, and the CLI for personal, so I'm always logged into both accounts!

by pwython

7/30/2026 at 5:26:12 PM

don't people get banned for doing this kind of thing?

by baron3dl

7/30/2026 at 6:00:29 PM

The threat of account bans and a less than friendly appeal system does make me wary of trying it, even though this would be incredibly useful.

by rew0rk

7/30/2026 at 7:06:08 PM

A lot of them also don’t get banned, right ? There are vibecoders youtubers switching accounts all the time

So what’s the differenve ?

by ttoinou

7/30/2026 at 5:30:16 PM

If it's honestly 'One account is paid for by my employer and used as a tool for my job' and 'One account is for personal use, where I work on passion-projects and the likes' I think it's fine....? Not a lawyer but I'd assume as long as you're not using it to bypass usage limits Anthropic wouldn't even really notice or care.

by dpoloncsak

7/30/2026 at 5:56:32 PM

not sure law matters, anthropic is draconian about bans/appeals.

by baron3dl

7/30/2026 at 4:53:25 PM

Another way for those who use mise. You can auto-switch accounts by directory:

~/development/account1/mise.toml:

[env]

CLAUDE_CONFIG_DIR = "{{ env.HOME }}/.claude-account1"

by brentmitchell25

7/30/2026 at 6:24:41 PM

does this also extend to codex?

by swyx

7/30/2026 at 7:43:19 PM

[dead]

by noobmax