@synth1s/cloak
v2.4.1
Published
Cloak your Claude. Switch identities in seconds.
Downloads
778
Maintainers
Readme
@synth1s/cloak
Stop logging out. Start switching.
Every developer wears a different cloak. One for work, one for personal projects, one for that freelance gig. Cloak lets you dress your Claude Code in the right identity — and switch between them without breaking a sweat.
Sessions, tokens, MCP servers, and settings fully preserved. Concurrent sessions across terminals. 181+ developers asked for this.
Before / After
Before Cloak:
claude → /logout → /login (lose session) → work on project
claude → /logout → /login (lose session) → personal useAfter Cloak:
claude -a work # instant. sessions preserved.
claude -a home # in another terminal. at the same time.Install
npm install -g @synth1s/cloak3 steps to get started
# 1. Save your current Claude session
cloak create work
# 2. Log out, log in with another account in Claude, then:
cloak create home
# 3. Set up shell integration
cloak switch work # follows the guided setup on first runThat's it. From now on:
claude -a work # switch and launch
claude -a home # in another terminal, at the same timeCommands
| Command | Description |
|---------|-------------|
| cloak create [name] | Save current session as a new cloak |
| cloak switch <name> | Wear a different cloak |
| cloak list | See all cloaks in your wardrobe |
| cloak whoami | Which cloak are you wearing? |
| cloak delete <name> | Discard a cloak |
| cloak rename <old> <new> | Rename a cloak |
| cloak bind <name> | Bind this directory to a cloak |
| cloak unbind | Remove directory binding |
With shell integration (eval "$(cloak init)"):
| Command | Description |
|---------|-------------|
| claude -a <name> | Switch and launch Claude |
| claude account <cmd> | All cloak commands via claude |
Concurrent sessions
Different terminal, different identity. No conflicts.
# Terminal A:
claude -a work
# Terminal B (at the same time):
claude -a homeEach account is a completely isolated directory. No file overlap, no token conflicts.
Auto-switch by directory
Bind a cloak to a project directory. Claude automatically uses the right account.
cd ~/projects/company
cloak bind work
cd ~/projects/personal
cloak bind homeFrom now on, claude in those directories uses the bound account — no manual switch needed.
Context bar
Every command shows which identity is active:
cloak > list . work <[email protected]> ────────────────────────────
Your Cloaks
> work (active) — [email protected]
home — [email protected]How it works
Cloak uses Claude Code's official CLAUDE_CONFIG_DIR environment variable. Each account gets its own directory:
~/.cloak/
└── profiles/
├── work/ # complete, isolated config
│ ├── .claude.json
│ ├── settings.json
│ └── ...
└── home/
├── .claude.json
└── ...Switching changes which directory Claude Code reads from. Nothing is copied, moved, or overwritten.
FAQ
No. Each account is a completely isolated directory. Switching only changes which directory Claude Code reads from. Your settings, MCP servers, and preferences for each account stay exactly where they are.
Yes. When Claude Code renews your OAuth token during a session, it writes to the active account's directory. When you switch away and back, the renewed token is still there.
No, as long as each terminal uses a different account. Each has its own directory — no file overlap.
Cloak never transmits, logs, or modifies your tokens. It only copies files during cloak create and changes an environment variable during cloak switch. All data stays local. Credential files are created with restrictive permissions (0o600).
Your account directories remain in ~/.cloak/. Claude Code works normally with its default config. To clean up: rm -rf ~/.cloak
IDE extensions may not respect CLAUDE_CONFIG_DIR (known limitation). Cloak is designed for terminal-based Claude Code.
Requirements
- Node.js >= 18
- bash or zsh (for shell integration)
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md.
Documentation
License
MIT
