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 +0 -10
- package/package.json +2 -2
- package/src/utils/welcome.js +52 -23
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.
|
|
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 -
|
|
13
|
+
"postinstall": "node ./bin/vibe-audit.js"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"adm-zip": "^0.5.17",
|
package/src/utils/welcome.js
CHANGED
|
@@ -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(
|
|
46
|
+
console.log(colors.brand(line));
|
|
20
47
|
});
|
|
21
48
|
console.log('');
|
|
22
49
|
|
|
23
50
|
const welcomeContent = `
|
|
24
|
-
${
|
|
25
|
-
${
|
|
51
|
+
${colors.brandBold('Vibe Audit')}${colors.muted(' v1.2.6 | Terminal-First Security')}
|
|
52
|
+
${colors.muted('-'.repeat(50))}
|
|
26
53
|
|
|
27
|
-
${
|
|
54
|
+
${colors.textBold('š Ready to secure your code?')}
|
|
28
55
|
|
|
29
|
-
${
|
|
30
|
-
${
|
|
31
|
-
${
|
|
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
|
-
${
|
|
34
|
-
${
|
|
35
|
-
${
|
|
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:
|
|
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
|
-
${
|
|
78
|
+
${colors.brandBold('Vibe Audit Command Cheatsheet')}
|
|
50
79
|
|
|
51
|
-
${
|
|
52
|
-
${
|
|
53
|
-
${
|
|
54
|
-
${
|
|
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
|
-
${
|
|
57
|
-
${
|
|
58
|
-
${
|
|
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
|
-
${
|
|
61
|
-
${
|
|
62
|
-
${
|
|
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:
|
|
98
|
+
borderColor: colors.border
|
|
70
99
|
}));
|
|
71
100
|
}
|