@synth1s/cloak 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +26 -1
  2. package/package.json +1 -1
  3. package/src/cli.js +4 -0
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  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.
11
11
 
12
- Sessions, tokens, MCP servers, and settings fully preserved. Concurrent sessions across terminals. [181+ developers asked for this.](https://github.com/anthropics/claude-code/issues/18435)
12
+ No file swapping. No token juggling. Each account is a fully isolated directory — safe for concurrent sessions across terminals. [195+ developers asked for this.](https://github.com/anthropics/claude-code/issues/18435)
13
13
 
14
14
  ![demo](cloak-demo.svg)
15
15
 
@@ -63,6 +63,8 @@ claude -a home # in another terminal, at the same time
63
63
  | `cloak whoami` | Which cloak are you wearing? |
64
64
  | `cloak delete <name>` | Discard a cloak |
65
65
  | `cloak rename <old> <new>` | Rename a cloak |
66
+ | `cloak bind <name>` | Bind this directory to a cloak |
67
+ | `cloak unbind` | Remove directory binding |
66
68
 
67
69
  With shell integration (`eval "$(cloak init)"`):
68
70
 
@@ -85,6 +87,20 @@ claude -a home
85
87
 
86
88
  Each account is a completely isolated directory. No file overlap, no token conflicts.
87
89
 
90
+ ## Auto-switch by directory
91
+
92
+ Bind a cloak to a project directory. Claude automatically uses the right account.
93
+
94
+ ```bash
95
+ cd ~/projects/company
96
+ cloak bind work
97
+
98
+ cd ~/projects/personal
99
+ cloak bind home
100
+ ```
101
+
102
+ From now on, `claude` in those directories uses the bound account — no manual switch needed.
103
+
88
104
  ## Context bar
89
105
 
90
106
  Every command shows which identity is active:
@@ -98,6 +114,15 @@ Your Cloaks
98
114
  home — filipe@personal.com
99
115
  ```
100
116
 
117
+ ## Why Cloak
118
+
119
+ - **No file swapping** — each account is its own directory, not a copy of shared files
120
+ - **Concurrent sessions** — different terminals, different accounts, at the same time
121
+ - **Auto-switch by directory** — bind a project to a cloak, forget about it
122
+ - **One command** — `claude -a work` switches and launches in one step
123
+ - **Nothing is lost** — tokens, MCP servers, settings, all preserved per account
124
+ - **Secure** — credentials stored with restrictive permissions (0o600), never transmitted
125
+
101
126
  ## How it works
102
127
 
103
128
  Cloak uses Claude Code's official [`CLAUDE_CONFIG_DIR`](https://code.claude.com/docs/en/env-vars) environment variable. Each account gets its own directory:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synth1s/cloak",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Cloak your Claude. Switch identities in seconds.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -37,6 +37,10 @@ Quick start:
37
37
  cloak switch work Switch to a cloak
38
38
  cloak list See all your cloaks
39
39
 
40
+ Auto-switch by directory:
41
+ cloak bind work Bind current directory to a cloak
42
+ cd ~/project && claude Auto-uses the bound cloak
43
+
40
44
  Shell integration (recommended):
41
45
  eval "$(cloak init)" Add to .bashrc/.zshrc for:
42
46
  claude -a work Switch and launch Claude in one step