@synth1s/cloak 1.1.0 → 1.1.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synth1s/cloak",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Cloak your Claude. Switch identities in seconds.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -7,7 +7,7 @@ export function getInitScript() {
7
7
  ' if [ "$1" = "account" ]; then',
8
8
  ' local subcmd="$2"',
9
9
  ' shift 2',
10
- ' if [ "$subcmd" = "switch" ] || [ "$subcmd" = "use" ]; then',
10
+ ' if [ "$subcmd" = "switch" ] || [ "$subcmd" = "use" ] || [ "$subcmd" = "launch" ]; then',
11
11
  ' local output',
12
12
  ' output=$(command cloak switch --print-env "$@")',
13
13
  ' local exit_code=$?',
@@ -18,7 +18,15 @@ export function getInitScript() {
18
18
  ' command cloak "$subcmd" "$@"',
19
19
  ' fi',
20
20
  ' elif [ "$1" = "-a" ] && [ -n "$2" ]; then',
21
- ' command cloak launch "${@:2}"',
21
+ ' local name="$2"',
22
+ ' shift 2',
23
+ ' local output',
24
+ ' output=$(command cloak switch --print-env "$name")',
25
+ ' local exit_code=$?',
26
+ ' if [ $exit_code -eq 0 ]; then',
27
+ ' eval "$output"',
28
+ ' command claude "$@"',
29
+ ' fi',
22
30
  ' else',
23
31
  ' command claude "$@"',
24
32
  ' fi',