hn.today

I run multiple Claude Code accounts on one Mac

twitter.com8 points3 comments
Screenshot of I run multiple Claude Code accounts on one Mac

The setup addresses the lack of an easy way to switch Claude Code accounts on one Mac. It keeps each Claude.ai account signed in by assigning it a separate configuration directory and launching the CLI through a named shell function. For example, a `claude-b` function sets `CLAUDE_CONFIG_DIR` to `~/.claude-b` before running Claude, while the usual `claude` command continues using the default configuration. After logging in through the new command, users should check `auth status` to confirm the correct email and configuration directory; a separate browser or incognito window may help prevent the login flow from selecting an already active account. The same pattern can add a third account.

The separate directories preserve account-specific settings, session history, and credentials, including macOS Keychain entries. A practical arrangement is to leave the Desktop app signed into one account and use the other through the CLI, even from the Desktop app’s terminal. The author stresses that distinct configurations do not isolate access to files: both sessions run as the same macOS user and can modify the same repositories, so work needs clear coordination. Shared rules, skills, or agents can be linked selectively, but symlinks point to the same files, so edits affect both accounts. The method is tested on macOS, applies to claude.ai logins rather than keyless Console authentication, and requires care to verify the active account before making changes.

Read on twitter.com3 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Aristotle Expands into Rust

Aristotle Expands into Rust

Aristotle has expanded its formal verification platform to Rust, allowing developers to prove code meets specifications and contains no undefined behavior, including in unsafe blocks. It can also verify that Rust rewrites behave like their original C code, targeting critical software such as smart contracts and infrastructure. (harmonic.fun)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.