@synth1s/cloak 2.3.0 → 2.3.1
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 +1 -1
- package/src/cli.js +8 -5
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { program
|
|
3
|
+
import { program } from 'commander'
|
|
4
4
|
import { readFileSync } from 'fs'
|
|
5
5
|
import { fileURLToPath } from 'url'
|
|
6
6
|
import { dirname, join } from 'path'
|
|
@@ -20,6 +20,10 @@ const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8'))
|
|
|
20
20
|
|
|
21
21
|
showTipIfNeeded()
|
|
22
22
|
|
|
23
|
+
// Extract --print-env before commander parses (internal flag, not user-facing)
|
|
24
|
+
const _printEnv = process.argv.includes('--print-env')
|
|
25
|
+
const argv = process.argv.filter(a => a !== '--print-env')
|
|
26
|
+
|
|
23
27
|
program
|
|
24
28
|
.name('cloak')
|
|
25
29
|
.description('Cloak your Claude. Switch identities in seconds.')
|
|
@@ -52,9 +56,8 @@ program
|
|
|
52
56
|
.alias('use')
|
|
53
57
|
.description('Wear a different cloak')
|
|
54
58
|
.action((name) => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return switchAccount(name, { printEnv })
|
|
59
|
+
if (!_printEnv) renderContextBar('switch')
|
|
60
|
+
return switchAccount(name, { printEnv: _printEnv })
|
|
58
61
|
})
|
|
59
62
|
|
|
60
63
|
program
|
|
@@ -102,4 +105,4 @@ program
|
|
|
102
105
|
.description('Output shell integration code')
|
|
103
106
|
.action(initShell)
|
|
104
107
|
|
|
105
|
-
program.parse()
|
|
108
|
+
program.parse(argv)
|