@synth1s/cloak 1.9.5 → 1.9.7

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.9.5",
3
+ "version": "1.9.7",
4
4
  "description": "Cloak your Claude. Switch identities in seconds.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,20 +1,20 @@
1
1
  import chalk from 'chalk'
2
- import { getActiveProfile } from '../lib/paths.js'
2
+ import { getActiveProfile, getAccountEmail } from '../lib/paths.js'
3
3
 
4
4
  export function showBanner(columns) {
5
5
  const name = getActiveProfile()
6
6
  if (!name) return
7
7
 
8
8
  const cols = columns || process.stderr.columns || process.stdout.columns || 80
9
- const msg = `cloak › ${name}`
9
+ const email = getAccountEmail(name)
10
+ const msg = email ? `cloak › ${name} — ${email}` : `cloak › ${name}`
10
11
  const inner = cols - 2
11
12
  const contentLen = msg.length + 2
12
13
  const pad = Math.max(0, inner - contentLen)
13
14
 
14
- const blue = chalk.blue
15
- const top = blue('' + ''.repeat(inner) + '')
16
- const mid = blue('') + ' ' + chalk.bold(msg) + ' '.repeat(pad) + ' ' + blue('│')
17
- const bot = blue('╰' + '─'.repeat(inner) + '╯')
15
+ const top = '╭' + '─'.repeat(inner) + '╮'
16
+ const mid = '' + chalk.bold(msg) + ' '.repeat(pad) + ''
17
+ const bot = '' + ''.repeat(inner) + ''
18
18
 
19
19
  process.stdout.write(top + '\n' + mid + '\n' + bot + '\n')
20
20
  }
@@ -39,6 +39,7 @@ export function getInitScript() {
39
39
  ' local exit_code=$?',
40
40
  ' if [ $exit_code -eq 0 ]; then',
41
41
  ' eval "$output"',
42
+ ' command cloak banner >&2',
42
43
  ' command claude "$@"',
43
44
  ' fi',
44
45
  ' else',
@@ -30,7 +30,6 @@ export async function switchAccount(name, options = {}) {
30
30
 
31
31
  if (options.printEnv) {
32
32
  process.stdout.write(msg.printEnvExport(dir))
33
- process.stdout.write(msg.printEnvEcho(name))
34
33
  return
35
34
  }
36
35