@vibecheck-ai/cli 20.2.0 → 23.0.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/README.md CHANGED
@@ -1,20 +1,114 @@
1
- # vibecheck
1
+ <div align="center">
2
2
 
3
- AI code hallucination detector -- find phantom deps, fake APIs, and ghost routes.
3
+ <br />
4
+
5
+ <img src="https://github.com/guardiavault-oss/Vibecheck/raw/HEAD/packages/vscode-extension/images/vibecheck_logo_transparent_2x.png" alt="VibeCheck CLI" width="80" />
6
+
7
+ <br />
8
+
9
+ # VibeCheck CLI
10
+
11
+ ### The trust layer for AI-generated code.
12
+
13
+ Catches phantom dependencies, ghost API routes, fake SDK methods, credential leaks, and silent failures — before they ship.
14
+
15
+ <br />
16
+
17
+ [![npm version](https://img.shields.io/npm/v/@vibecheck-ai/cli?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/@vibecheck-ai/cli)&nbsp;&nbsp;[![Downloads](https://img.shields.io/npm/dm/@vibecheck-ai/cli?style=for-the-badge&logo=npm&logoColor=white&color=333)](https://www.npmjs.com/package/@vibecheck-ai/cli)&nbsp;&nbsp;[![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](../../LICENSE)
18
+
19
+ </div>
20
+
21
+ <br />
22
+
23
+ <p align="center">
24
+ <img src="https://github.com/guardiavault-oss/Vibecheck/raw/HEAD/docs/assets/cli-scan-demo.gif" alt="VibeCheck CLI scanning a project in real time" width="820" />
25
+ </p>
26
+
27
+ <br />
28
+
29
+ ---
30
+
31
+ <br />
32
+
33
+ ## Why VibeCheck?
34
+
35
+ Every AI coding tool — **Cursor, Copilot, Claude, Windsurf, ChatGPT** — produces code that compiles, passes lint, and looks correct. Then it breaks in production.
36
+
37
+ ```
38
+ fetch('/api/payments/confirm') → Endpoint never implemented. 404 in prod.
39
+ catch (err) { } → Error silently swallowed. Data lost.
40
+ { revenue: 99999 } → Hardcoded mock. Dashboard lies to users.
41
+ STRIPE_SECRET_KEY in client bundle → Credential leaked to every browser.
42
+ ```
43
+
44
+ Your linter says it's fine. TypeScript says it's fine. PR review says it's fine.
45
+
46
+ **VibeCheck catches what they miss.** 17 detection engines. One command. Zero config.
47
+
48
+ <br />
49
+
50
+ ---
51
+
52
+ <br />
4
53
 
5
54
  ## Quick Start
6
55
 
7
56
  ```bash
8
- # Scan your project (no install needed)
9
- npx vibecheck scan .
57
+ # Scan your project (no install required)
58
+ npx @vibecheck-ai/cli scan .
10
59
 
11
60
  # Or install globally
12
- npm install -g vibecheck
61
+ npm install -g @vibecheck-ai/cli
13
62
  vibecheck scan .
63
+
64
+ # Shorthand alias
65
+ vc scan .
14
66
  ```
15
67
 
68
+ That's it. No config files. No API keys. No setup wizard.
69
+
70
+ <br />
71
+
72
+ <p align="center">
73
+ <img src="https://github.com/guardiavault-oss/Vibecheck/raw/HEAD/docs/assets/cli-quickstart.png" alt="VibeCheck CLI quick start output" width="720" />
74
+ </p>
75
+
76
+ <br />
77
+
78
+ ---
79
+
80
+ <br />
81
+
82
+ ## 17 Detection Engines
83
+
84
+ Every engine is purpose-built for a specific failure mode that traditional tools miss.
85
+
86
+ | # | Engine | What it catches |
87
+ |:---:|:---|:---|
88
+ | 1 | **Ghost Routes** | API calls to endpoints that were never implemented |
89
+ | 2 | **Dead UI** | Buttons, forms, and links wired to empty or missing handlers |
90
+ | 3 | **Phantom Imports** | Modules and packages referenced but never installed |
91
+ | 4 | **Silent Failures** | Try/catch blocks that swallow errors without handling them |
92
+ | 5 | **Hardcoded Mocks** | Test data, fake values, and stubs left in production paths |
93
+ | 6 | **Credential Leaks** | API keys, tokens, passwords, and secrets committed to source |
94
+ | 7 | **Env Drift** | Environment variable references that don't exist in `.env` |
95
+ | 8 | **Auth Gaps** | Middleware or guards referencing nonexistent auth providers |
96
+ | 9 | **Type Holes** | `@ts-ignore`, `any` casts, unsafe assertions hiding real bugs |
97
+ | 10 | **Console Pollution** | `console.log`, `console.debug` left in production bundles |
98
+ | 11 | **Version Hallucinations** | API calls that don't exist in the installed package version |
99
+ | 12 | **Slopsquatting** | Misspelled package names that could be typosquat attacks |
100
+ | 13 | **Architectural Drift** | Code that violates your project's structural patterns |
101
+ | 14 | **Dependency Vulnerabilities** | Known CVEs in your dependency tree |
102
+ | 15 | **Performance Anti-patterns** | JSON parsing in loops, sync I/O in async paths |
103
+ | 16 | **Accessibility Violations** | Missing ARIA labels, incorrect roles, keyboard traps |
104
+ | 17 | **Contract Drift** | Code that diverged from its ISL/OpenAPI specification |
105
+
106
+ <br />
107
+
16
108
  ---
17
109
 
110
+ <br />
111
+
18
112
  ## Commands
19
113
 
20
114
  ### `vibecheck scan`
@@ -27,15 +121,14 @@ vibecheck scan src/
27
121
  vibecheck scan src/api.ts
28
122
  ```
29
123
 
30
- **Flags:**
31
-
32
124
  | Flag | Default | Description |
33
- |------|---------|-------------|
125
+ |:---|:---:|:---|
34
126
  | `--json` | — | Output findings as JSON |
35
127
  | `--no-color` | — | Disable ANSI color output |
36
- | `--threshold <n>` | 75 | Minimum confidence to include a finding (0–100) |
128
+ | `--threshold <n>` | `75` | Minimum confidence to include a finding (0–100) |
37
129
 
38
- **Example output:**
130
+ <details>
131
+ <summary><strong>Example output</strong></summary>
39
132
 
40
133
  ```
41
134
  VibeCheck Scan
@@ -60,7 +153,10 @@ vibecheck scan src/api.ts
60
153
  5 findings · 2 critical · 2 high · 1 medium
61
154
  ```
62
155
 
63
- **JSON output (`--json`):**
156
+ </details>
157
+
158
+ <details>
159
+ <summary><strong>JSON output</strong> (<code>--json</code>)</summary>
64
160
 
65
161
  ```json
66
162
  {
@@ -86,18 +182,26 @@ vibecheck scan src/api.ts
86
182
  }
87
183
  ```
88
184
 
89
- ---
185
+ </details>
186
+
187
+ <br />
90
188
 
91
189
  ### `vibecheck score`
92
190
 
93
- Compute and display the trust score for a file or directory.
191
+ Compute a **0–100 trust score** with letter grade and ship/no-ship verdict.
94
192
 
95
193
  ```bash
96
194
  vibecheck score .
97
195
  vibecheck score src/ --json
98
196
  ```
99
197
 
100
- **Example output:**
198
+ | Flag | Default | Description |
199
+ |:---|:---:|:---|
200
+ | `--json` | — | Output score as JSON |
201
+ | `--no-color` | — | Disable color |
202
+
203
+ <details>
204
+ <summary><strong>Example output</strong></summary>
101
205
 
102
206
  ```
103
207
  VibeCheck Trust Score
@@ -131,18 +235,13 @@ vibecheck score src/ --json
131
235
  ▲ Run vibecheck scan to review flagged issues before shipping.
132
236
  ```
133
237
 
134
- **Flags:**
135
-
136
- | Flag | Default | Description |
137
- |------|---------|-------------|
138
- | `--json` | — | Output score as JSON |
139
- | `--no-color` | — | Disable color |
238
+ </details>
140
239
 
141
- ---
240
+ <br />
142
241
 
143
242
  ### `vibecheck guard`
144
243
 
145
- Scan and exit with code 1 if the trust score is below threshold or critical findings exist. Designed for CI pipelines.
244
+ **CI gatekeeper.** Scan and exit with code 1 if the trust score is below threshold or critical findings exist.
146
245
 
147
246
  ```bash
148
247
  vibecheck guard .
@@ -151,41 +250,31 @@ vibecheck guard . --fail-on critical
151
250
  vibecheck guard . --fail-on none # Never fail, just report
152
251
  ```
153
252
 
154
- **Flags:**
155
-
156
253
  | Flag | Default | Description |
157
- |------|---------|-------------|
158
- | `--threshold <n>` | 70 | Minimum score to pass |
254
+ |:---|:---:|:---|
255
+ | `--threshold <n>` | `70` | Minimum score to pass |
159
256
  | `--fail-on <level>` | `critical` | Fail on: `critical`, `high`, `any`, `none` |
160
257
  | `--json` | — | Output report as JSON |
161
258
 
162
- **Exit codes:**
163
-
164
- | Code | Meaning |
165
- |------|---------|
259
+ | Exit Code | Meaning |
260
+ |:---:|:---|
166
261
  | `0` | Passed — score above threshold, no blocking findings |
167
262
  | `1` | Failed — score below threshold or critical finding found |
168
263
  | `2` | Error — invalid arguments or scan error |
169
264
 
170
- **Example CI usage:**
171
-
172
- ```yaml
173
- - name: VibeCheck Guard
174
- run: npx vibecheck guard . --threshold 70
175
- ```
176
-
177
- ---
265
+ <br />
178
266
 
179
267
  ### `vibecheck roast`
180
268
 
181
- Scan and deliver a brutal, opinionated summary of how AI-generated the code looks.
269
+ Scan and deliver a **brutal, opinionated summary** of how AI-generated the code looks.
182
270
 
183
271
  ```bash
184
272
  vibecheck roast .
185
273
  vibecheck roast src/
186
274
  ```
187
275
 
188
- **Example output:**
276
+ <details>
277
+ <summary><strong>Example output</strong></summary>
189
278
 
190
279
  ```
191
280
  VibeCheck Roast
@@ -211,11 +300,13 @@ vibecheck roast src/
211
300
  Run vibecheck scan for the full breakdown.
212
301
  ```
213
302
 
214
- ---
303
+ </details>
304
+
305
+ <br />
215
306
 
216
307
  ### `vibecheck context`
217
308
 
218
- Intent-aware context, evolution from provenance, and proactive hints for focused files.
309
+ **Intent-aware codebase intelligence.** Query your code by natural language, evolve from provenance, and get proactive context hints.
219
310
 
220
311
  ```bash
221
312
  vibecheck context --evolve
@@ -224,24 +315,68 @@ vibecheck context --intent "where do we handle auth" --semantic
224
315
  vibecheck context --proactive --file packages/api/src/routes/auth.ts
225
316
  ```
226
317
 
227
- **Flags:**
228
-
229
318
  | Flag | Description |
230
- |------|-------------|
231
- | `--evolve` | Learn from provenance (edits.jsonl); write co-edits, sequences, outcome scores to learned.json |
319
+ |:---|:---|
320
+ | `--evolve` | Learn from provenance (`edits.jsonl`); write co-edits, sequences, outcome scores to `learned.json` |
232
321
  | `--intent <query>` | Query codebase by natural language → files, symbols |
233
322
  | `--semantic` | Use embeddings for intent query (slower, finds conceptually related code) |
234
323
  | `--proactive` | Proactive context for focused file |
235
324
  | `--file <path>` | Focused file path (required with `--proactive`) |
236
325
  | `--json` | Machine-readable output |
237
326
 
327
+ <br />
328
+
238
329
  ---
239
330
 
331
+ <br />
332
+
333
+ ## CI/CD Integration
334
+
335
+ ### GitHub Actions
336
+
337
+ ```yaml
338
+ # .github/workflows/vibecheck.yml
339
+ name: VibeCheck
340
+ on: [pull_request]
341
+ jobs:
342
+ verify:
343
+ runs-on: ubuntu-latest
344
+ steps:
345
+ - uses: actions/checkout@v4
346
+ - run: npx @vibecheck-ai/cli guard . --threshold 70
347
+ ```
348
+
349
+ ### Pre-commit Hook
350
+
351
+ ```bash
352
+ # .husky/pre-commit
353
+ vibecheck guard . --fail-on critical
354
+ ```
355
+
356
+ ### package.json Scripts
357
+
358
+ ```json
359
+ {
360
+ "scripts": {
361
+ "vibecheck": "vibecheck scan .",
362
+ "vibecheck:guard": "vibecheck guard . --threshold 70",
363
+ "vibecheck:score": "vibecheck score ."
364
+ }
365
+ }
366
+ ```
367
+
368
+ <br />
369
+
370
+ ---
371
+
372
+ <br />
373
+
240
374
  ## Output Formats
241
375
 
242
- All commands that produce findings support `--json` for machine-readable output. The JSON schema is stable across patch versions.
376
+ All commands support `--json` for machine-readable output. The JSON schema is stable across patch versions.
243
377
 
244
- ### Finding schema
378
+ <details>
379
+ <summary><strong>Finding schema</strong></summary>
245
380
 
246
381
  ```ts
247
382
  interface Finding {
@@ -261,13 +396,24 @@ interface Finding {
261
396
  }
262
397
  ```
263
398
 
264
- ### SARIF export
399
+ </details>
400
+
401
+ <details>
402
+ <summary><strong>SARIF export</strong></summary>
265
403
 
266
404
  The underlying `FileRunner` supports SARIF 2.1.0 for GitHub Code Scanning integration. Use `--json` and pipe to a SARIF converter, or use the [GitHub Action](../action) which handles this automatically.
267
405
 
406
+ </details>
407
+
408
+ <br />
409
+
268
410
  ---
269
411
 
270
- ## Ignore Patterns
412
+ <br />
413
+
414
+ ## Configuration
415
+
416
+ ### Ignore Patterns
271
417
 
272
418
  Create `.vibecheckignore` at your project root:
273
419
 
@@ -282,59 +428,74 @@ src/legacy/old-api.ts
282
428
  **/*.test.ts
283
429
  ```
284
430
 
285
- ---
286
-
287
- ## Environment Variables
431
+ ### Environment Variables
288
432
 
289
433
  | Variable | Description |
290
- |----------|-------------|
434
+ |:---|:---|
291
435
  | `NO_COLOR` | Disable color output (same as `--no-color`) |
292
436
  | `VIBECHECK_THRESHOLD` | Default confidence threshold |
293
437
  | `VIBECHECK_WORKSPACE` | Override workspace root detection |
294
438
 
439
+ ### Shell Completion
440
+
441
+ ```bash
442
+ # Bash
443
+ eval "$(vibecheck completion bash)"
444
+
445
+ # Zsh
446
+ eval "$(vibecheck completion zsh)"
447
+ ```
448
+
449
+ <br />
450
+
295
451
  ---
296
452
 
297
- ## Integration
453
+ <br />
298
454
 
299
- ### package.json scripts
455
+ ## Available on 4 Surfaces
300
456
 
301
- ```json
302
- {
303
- "scripts": {
304
- "vibecheck": "vibecheck scan .",
305
- "vibecheck:guard": "vibecheck guard . --threshold 70",
306
- "vibecheck:score": "vibecheck score ."
307
- }
308
- }
309
- ```
457
+ | Surface | Install | Use case |
458
+ |:---|:---|:---|
459
+ | **CLI** (you are here) | `npm i -g @vibecheck-ai/cli` | CI/CD pipelines, terminal workflows, scripting |
460
+ | **VS Code Extension** | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Vibecheck-AI.vibecheck-AI) | Interactive scanning, sidebar dashboard, inline fixes |
461
+ | **MCP Server** | `npx @vibecheck-ai/mcp` | AI agent integration (Cursor, Claude, etc.) |
462
+ | **GitHub Action** | `vibecheck-ai/action@v2` | Pull request verification, deployment gating |
310
463
 
311
- ### Pre-commit hook
464
+ <br />
312
465
 
313
- ```bash
314
- # .husky/pre-commit
315
- vibecheck guard . --fail-on critical
316
- ```
466
+ ---
317
467
 
318
- ### Shell completion
468
+ <br />
319
469
 
320
- Enable tab completion for commands:
470
+ ## Language Support
321
471
 
322
- **Bash:**
323
- ```bash
324
- eval "$(vibecheck completion bash)"
325
- # Or append to ~/.bashrc:
326
- vibecheck completion bash >> ~/.bashrc
327
- ```
472
+ **TypeScript** &nbsp;·&nbsp; **JavaScript** &nbsp;·&nbsp; **React** &nbsp;·&nbsp; **Vue** &nbsp;·&nbsp; **Svelte** &nbsp;·&nbsp; **Next.js** &nbsp;·&nbsp; **Python** &nbsp;·&nbsp; **Go** &nbsp;·&nbsp; **Rust**
328
473
 
329
- **Zsh:**
330
- ```bash
331
- eval "$(vibecheck completion zsh)"
332
- # Or append to ~/.zshrc:
333
- vibecheck completion zsh >> ~/.zshrc
334
- ```
474
+ <br />
475
+
476
+ ## Privacy & Security
477
+
478
+ - All scanning runs **locally on your machine**
479
+ - **Zero code is transmitted** — ever
480
+ - Works **fully offline** and in air-gapped environments
481
+ - [Open source](https://github.com/guardiavault-oss/Vibecheck) — read every line
482
+
483
+ <br />
335
484
 
336
485
  ---
337
486
 
338
- ## License
487
+ <br />
488
+
489
+ <div align="center">
490
+
491
+ ### Build with AI. Ship with proof.
492
+
493
+ <br />
494
+
495
+ [Website](https://vibecheckai.dev) &nbsp;&nbsp;·&nbsp;&nbsp; [Documentation](https://docs.vibecheckai.dev) &nbsp;&nbsp;·&nbsp;&nbsp; [Discord](https://discord.gg/vibecheck) &nbsp;&nbsp;·&nbsp;&nbsp; [GitHub](https://github.com/guardiavault-oss/Vibecheck)
496
+
497
+ <br />
498
+
499
+ <sub>MIT License &nbsp;·&nbsp; Copyright 2024–2026 VibeCheck AI</sub>
339
500
 
340
- MIT — see [LICENSE](../../LICENSE).
501
+ </div>