Live data from Hacker News

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

github.com

1–10 of 36 posts

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

#1
I use separate Claude Code accounts for work and personal projects. Having to log out and go through the login flow every time I switched accounts became annoying, so I built a small CLI to solve it.

The commands are intentionally simple:

claude account add myworkaccount claude account add mypersonalaccount claude account use myworkaccount claude account current

After switching, Claude Code works normally:

claude claude "fix this bug in main.py" Repository: https://github.com/hamzarehmandeveloper/claude-account

Give it a try

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

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

#4
post #2

I use this: https://gist.github.com/KMJ-007/0979814968722051620461ab2aa0... Simple and works great but requires one alias per account

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.

Post reply on HN