Back to feed
Dev.to
Dev.to
5/10/2026
Multiple Claude Code Accounts, One Terminal

Multiple Claude Code Accounts, One Terminal

Short summary

Use direnv and CLAUDE_CONFIG_DIR to keep separate Claude Code profiles for personal, work, and client projects. Each folder can choose its own Claude account, GitHub org, MCP credentials, and Slack workspace without manual login switching. This approach narrows the security blast radius when MCPs go wrong and prevents credentials from mixing across trust boundaries.

  • Use direnv + CLAUDE_CONFIG_DIR env var to set folder-level Claude profiles without manual login/logout
  • One profile per trust boundary (personal, work, clients), not per repo
  • Isolates MCP credentials and tool auth to prevent cross-team credential leaks and narrow malicious tool blast radius

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Explore more