vibe-audit-scan 1.2.9 → 1.2.11

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/README.md CHANGED
@@ -21,20 +21,10 @@ To use the Vibe Audit CLI, you must first create an account on the platform:
21
21
  - Node.js 22+
22
22
 
23
23
  ## Installation
24
- Once published to npm, you can install the utility globally:
25
24
  ```bash
26
25
  npm install -g vibe-audit-scan
27
26
  ```
28
27
 
29
- For local development setup:
30
- ```bash
31
- # Navigate to the CLI package directory
32
- cd packages/cli
33
-
34
- # Link local CLI binary for testing
35
- npm link
36
- ```
37
-
38
28
  ## Usage
39
29
 
40
30
  ### Run codebase scans
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-audit-scan",
3
- "version": "1.2.9",
3
+ "version": "1.2.11",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Vibe Audit",
@@ -10,7 +10,7 @@
10
10
  "vibe-audit-scan": "./bin/vibe-audit.js"
11
11
  },
12
12
  "scripts": {
13
- "postinstall": "node -e \"console.log('\\n\\nšŸŽ‰ Vibe Audit CLI installed successfully!\\n\\nšŸš€ Run \\\"vibe scan\\\" inside your project folder to start scanning.\\n\\n')\""
13
+ "postinstall": "node ./bin/vibe-audit.js"
14
14
  },
15
15
  "dependencies": {
16
16
  "adm-zip": "^0.5.17",
@@ -12,60 +12,89 @@ const asciiArt = [
12
12
  ' ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ ā–‘ā–‘ā–‘ā–‘ā–‘ '
13
13
  ];
14
14
 
15
+ function getColors() {
16
+ const isLight = (() => {
17
+ if (process.env.COLORFGBG) {
18
+ const parts = process.env.COLORFGBG.split(';');
19
+ if (parts.length > 1) {
20
+ const bg = parseInt(parts[parts.length - 1], 10);
21
+ return bg === 7 || bg === 15 || bg > 10;
22
+ }
23
+ }
24
+ if (process.env.ITERM_PROFILE && process.env.ITERM_PROFILE.toLowerCase().includes('light')) {
25
+ return true;
26
+ }
27
+ return false;
28
+ })();
29
+
30
+ return {
31
+ brand: isLight ? chalk.blue : chalk.cyan,
32
+ brandBold: isLight ? chalk.blue.bold : chalk.cyan.bold,
33
+ text: isLight ? chalk.black : chalk.white,
34
+ textBold: isLight ? chalk.black.bold : chalk.white.bold,
35
+ muted: isLight ? chalk.blue.dim : chalk.gray,
36
+ border: isLight ? 'blue' : 'cyan'
37
+ };
38
+ }
39
+
15
40
  export function printWelcome() {
41
+ const colors = getColors();
42
+
16
43
  // Print ASCII art first
17
44
  console.log('');
18
45
  asciiArt.forEach(line => {
19
- console.log(chalk.cyan(line));
46
+ console.log(colors.brand(line));
20
47
  });
21
48
  console.log('');
22
49
 
23
50
  const welcomeContent = `
24
- ${chalk.cyan.bold('Vibe Audit')}${chalk.gray(' v1.2.6 | Terminal-First Security')}
25
- ${chalk.gray('-'.repeat(50))}
51
+ ${colors.brandBold('Vibe Audit')}${colors.muted(' v1.2.6 | Terminal-First Security')}
52
+ ${colors.muted('-'.repeat(50))}
26
53
 
27
- ${chalk.white.bold('šŸš€ Ready to secure your code?')}
54
+ ${colors.textBold('šŸš€ Ready to secure your code?')}
28
55
 
29
- ${chalk.cyan.bold('Quick Start:')}
30
- ${chalk.gray('$')} ${chalk.white('vibe scan .')}${chalk.gray(' # Scan current directory')}
31
- ${chalk.gray('$')} ${chalk.white('vibe login')}${chalk.gray(' # Authenticate your account')}
56
+ ${colors.brandBold('Quick Start:')}
57
+ ${colors.muted('$')} ${colors.text('vibe scan .')}${colors.muted(' # Scan current directory')}
58
+ ${colors.muted('$')} ${colors.text('vibe login')}${colors.muted(' # Authenticate your account')}
32
59
 
33
- ${chalk.cyan.bold('Need help?')}
34
- ${chalk.gray('$')} ${chalk.white('vibe --help')}${chalk.gray(' # View all available commands')}
35
- ${chalk.gray('$')} ${chalk.white('vibe cheatsheet')}${chalk.gray(' # List shortcuts and status')}
60
+ ${colors.brandBold('Need help?')}
61
+ ${colors.muted('$')} ${colors.text('vibe --help')}${colors.muted(' # View all available commands')}
62
+ ${colors.muted('$')} ${colors.text('vibe cheatsheet')}${colors.muted(' # List shortcuts and status')}
36
63
  `;
37
64
 
38
65
  console.log(boxen(welcomeContent, {
39
66
  padding: 1,
40
67
  margin: 1,
41
68
  borderStyle: 'round',
42
- borderColor: 'cyan',
69
+ borderColor: colors.border,
43
70
  titleAlignment: 'left'
44
71
  }));
45
72
  }
46
73
 
47
74
  export function printHelpCheatsheet() {
75
+ const colors = getColors();
76
+
48
77
  const cheatsheet = `
49
- ${chalk.cyan.bold('Vibe Audit Command Cheatsheet')}
78
+ ${colors.brandBold('Vibe Audit Command Cheatsheet')}
50
79
 
51
- ${chalk.white.bold('Auth Commands:')}
52
- ${chalk.white('vibe login')}${chalk.gray(' - Authenticate your CLI with the Vibe Cloud backend')}
53
- ${chalk.white('vibe whoami')}${chalk.gray(' - Displays the currently logged-in user profile')}
54
- ${chalk.white('vibe logout')}${chalk.gray(' - Revokes your session and clears local tokens')}
80
+ ${colors.textBold('Auth Commands:')}
81
+ ${colors.text('vibe login')}${colors.muted(' - Authenticate your CLI with the Vibe Cloud backend')}
82
+ ${colors.text('vibe whoami')}${colors.muted(' - Displays the currently logged-in user profile')}
83
+ ${colors.text('vibe logout')}${colors.muted(' - Revokes your session and clears local tokens')}
55
84
 
56
- ${chalk.white.bold('Scan Commands:')}
57
- ${chalk.white('vibe scan <dir>')}${chalk.gray(' - Scans a directory and sends results to the AI engine')}
58
- ${chalk.white('vibe status <id>')}${chalk.gray(' - Checks the real-time processing status of an audit')}
85
+ ${colors.textBold('Scan Commands:')}
86
+ ${colors.text('vibe scan <dir>')}${colors.muted(' - Scans a directory and sends results to the AI engine')}
87
+ ${colors.text('vibe status <id>')}${colors.muted(' - Checks the real-time processing status of an audit')}
59
88
 
60
- ${chalk.white.bold('System Commands:')}
61
- ${chalk.white('vibe cheatsheet')}${chalk.gray(' - Lists all commands and current system status')}
62
- ${chalk.white('vibe install-deps')}${chalk.gray(' - Auto-installs/verifies Trivy binary dependencies')}
89
+ ${colors.textBold('System Commands:')}
90
+ ${colors.text('vibe cheatsheet')}${colors.muted(' - Lists all commands and current system status')}
91
+ ${colors.text('vibe install-deps')}${colors.muted(' - Auto-installs/verifies Trivy binary dependencies')}
63
92
  `;
64
93
 
65
94
  console.log(boxen(cheatsheet, {
66
95
  padding: 1,
67
96
  margin: 1,
68
97
  borderStyle: 'round',
69
- borderColor: 'cyan'
98
+ borderColor: colors.border
70
99
  }));
71
100
  }