Profiles and multiple accounts
How to split and share your setup when you run Claude Code with several accounts, such as personal and work.
One profile, one config folder
Claude Code can switch its config folder with the CLAUDE_CONFIG_DIR environment variable, and each folder has its own login and usage. An aisync profile maps to one such folder.
| Profile | Config folder | MCP server file |
|---|---|---|
default |
~/.claude |
~/.claude.json |
work |
~/.claude-work |
~/.claude-work/.claude.json |
Use --config-dir to choose the folder yourself.
Create a profile
aisync new work --extends default
aisync pull work
--extends default lays the default profile underneath and puts work's own content on top: files by path, MCP servers and environment variables by name. Inheritance is one level deep.
If only the rules differ for work, edit ~/.claude-work/CLAUDE.md and push:
aisync push work
A push writes each file back to the profile it came from. If the file you changed in work was inherited from default, default changes, and so does every other machine using default. Files that exist only in work are added to work with push work --add PATH.
There is no command yet to override an inherited file for work only. For now, add a file at the same path under
profiles/work/files/in the repo by hand.
Run it
aisync run work
Starts claude with CLAUDE_CONFIG_DIR=~/.claude-work and the profile's env. The first time, sign in to your work account with /login there. After that the two accounts run side by side, one per terminal.
Arguments for claude go after --:
aisync run work -- --continue
When you use several accounts
- Each account keeps its own login, and aisync never moves it.
- Running many sessions of the same account at once has been reported to log sessions out when Claude Code refreshes its token. Separate accounts avoid clashes between accounts.
- Splitting accounts to get around usage limits can break the terms of service. Use this for accounts with different purposes, such as personal and work.
These docs describe aisync 0.1.