@vibecheck-ai/cli 20.2.0 → 23.0.0

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