Skip to content

Switch between multiple Claude Code accounts (personal/work) in VS Code, Cursor, Windsurf, and Antigravity on Windows. Simple PowerShell scripts for complete account isolation.

License

Notifications You must be signed in to change notification settings

tannyusuf/switch-claude-code-accounts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Claude IDE Switcher for Windows

πŸš€ Seamlessly switch between personal and work Claude Code accounts across multiple IDEs on Windows

Platform PowerShell License

🎯 Problem

Are you tired of manually logging in and out of different Claude Code accounts when switching between personal and work projects? This tool solves that problem by isolating Claude Code configurations for each IDE instance.

✨ Features

  • Complete Account Isolation: Separate Claude Code accounts for personal and work
  • Multiple IDE Support: VS Code, Cursor, Windsurf, and Antigravity
  • Google Account Switching: Special support for Antigravity with Google account isolation
  • Simple Commands: Easy-to-use PowerShell functions
  • Zero Configuration Conflicts: Each profile maintains its own settings

πŸ› οΈ Supported IDEs

IDE Personal Account Work Account Google Account Switching
VS Code βœ… βœ… ❌
Cursor βœ… βœ… ❌
Windsurf βœ… βœ… ❌
Antigravity βœ… βœ… βœ…

πŸ“‹ Prerequisites

  • Windows 10/11
  • PowerShell 5.1 or higher
  • At least one of the supported IDEs installed

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/yourusername/claude-ide-switcher.git
cd claude-ide-switcher

2. Install the Functions

# Open your PowerShell profile
notepad $PROFILE

# Copy the desired switcher scripts from the scripts/ folder
# Paste them into your profile and save

3. Reload Your Profile

. $PROFILE

4. Start Using

# Launch VS Code with personal Claude account
code-personal

# Launch VS Code with work Claude account
code-work

# Launch Antigravity with work Claude AND work Google account
antigravity-work-google

πŸ“– Usage Examples

VS Code

# Personal account (default settings)
code-personal
code-personal C:\MyPersonalProjects

# Work account (isolated profile)
code-work
code-work C:\MyWorkProjects

Cursor

# Personal account
cursor-personal

# Work account
cursor-work

Windsurf

# Personal account
windsurf-personal

# Work account
windsurf-work

Antigravity

# Personal Claude account only
antigravity-personal

# Work Claude account only
antigravity-work

# Work Claude + Work Google account (fully isolated)
antigravity-work-google

πŸ”§ How It Works

The switcher uses environment variables to isolate Claude Code configurations:

  • CLAUDE_CONFIG_DIR: Points to different configuration directories
  • --user-data-dir: (Antigravity only) Isolates browser profile and Google login

Each account maintains:

  • Separate API keys
  • Independent settings
  • Isolated login sessions
  • No cross-contamination

πŸ“‚ Directory Structure

After setup, your home directory will contain:

C:\Users\YourName\
β”œβ”€β”€ .claude-personal\      # Personal Claude config
β”œβ”€β”€ .claude-work\           # Work Claude config
β”œβ”€β”€ .antigravity-work-profile\  # Work Antigravity + Google (optional)
β”œβ”€β”€ .cursor-work-profile\       # Work Cursor profile (optional)
└── .windsurf-work-profile\     # Work Windsurf profile (optional)

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

Special thanks to the developer community for testing and feedback.

⚠️ Important Notes

  • First launch of each profile will require Claude Code login
  • Work profiles are completely isolated from personal profiles
  • GitHub account switching is handled separately by each IDE
  • Google account switching only works with Antigravity using the -google variant

πŸ› Troubleshooting

Functions not found after adding to profile

# Reload your profile
. $PROFILE

IDE not launching

# Check if IDE is in PATH
Get-Command code  # or cursor, windsurf, antigravity

Claude Code not switching

  • Make sure you're logged out before switching profiles
  • Delete the config directory and login again
  • Check if CLAUDE_CONFIG_DIR is set correctly

πŸ’‘ Tips

  • Use descriptive project folders to remember which profile to use
  • Set up keyboard shortcuts for frequently used commands
  • Consider creating aliases for shorter commands
  • Keep your work and personal projects in separate root directories

🌟 Star History

If this project helped you, please consider giving it a star! ⭐

πŸ“§ Contact

Have questions or suggestions? Open an issue on GitHub!

About

Switch between multiple Claude Code accounts (personal/work) in VS Code, Cursor, Windsurf, and Antigravity on Windows. Simple PowerShell scripts for complete account isolation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published