@vibecheckai/cli 3.6.1 → 3.8.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 +135 -63
- package/bin/_deprecations.js +447 -19
- package/bin/_router.js +1 -1
- package/bin/registry.js +347 -280
- package/bin/runners/context/generators/cursor-enhanced.js +2439 -0
- package/bin/runners/lib/agent-firewall/enforcement/gateway.js +1059 -0
- package/bin/runners/lib/agent-firewall/enforcement/index.js +98 -0
- package/bin/runners/lib/agent-firewall/enforcement/mode.js +318 -0
- package/bin/runners/lib/agent-firewall/enforcement/orchestrator.js +484 -0
- package/bin/runners/lib/agent-firewall/enforcement/proof-artifact.js +418 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/change-event.schema.json +173 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/intent.schema.json +181 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/verdict.schema.json +222 -0
- package/bin/runners/lib/agent-firewall/enforcement/verdict-v2.js +333 -0
- package/bin/runners/lib/agent-firewall/index.js +200 -0
- package/bin/runners/lib/agent-firewall/integration/index.js +20 -0
- package/bin/runners/lib/agent-firewall/integration/ship-gate.js +437 -0
- package/bin/runners/lib/agent-firewall/intent/alignment-engine.js +622 -0
- package/bin/runners/lib/agent-firewall/intent/auto-detect.js +426 -0
- package/bin/runners/lib/agent-firewall/intent/index.js +102 -0
- package/bin/runners/lib/agent-firewall/intent/schema.js +352 -0
- package/bin/runners/lib/agent-firewall/intent/store.js +283 -0
- package/bin/runners/lib/agent-firewall/interception/fs-interceptor.js +502 -0
- package/bin/runners/lib/agent-firewall/interception/index.js +23 -0
- package/bin/runners/lib/agent-firewall/policy/rules/fake-success.js +31 -38
- package/bin/runners/lib/agent-firewall/policy/rules/ghost-env.js +68 -3
- package/bin/runners/lib/agent-firewall/policy/rules/ghost-route.js +4 -2
- package/bin/runners/lib/agent-firewall/risk/thresholds.js +5 -4
- package/bin/runners/lib/agent-firewall/session/collector.js +451 -0
- package/bin/runners/lib/agent-firewall/session/index.js +26 -0
- package/bin/runners/lib/artifact-envelope.js +540 -0
- package/bin/runners/lib/auth-shared.js +977 -0
- package/bin/runners/lib/checkpoint.js +941 -0
- package/bin/runners/lib/cleanup/engine.js +571 -0
- package/bin/runners/lib/cleanup/index.js +53 -0
- package/bin/runners/lib/cleanup/output.js +375 -0
- package/bin/runners/lib/cleanup/rules.js +1060 -0
- package/bin/runners/lib/doctor/diagnosis-receipt.js +454 -0
- package/bin/runners/lib/doctor/failure-signatures.js +526 -0
- package/bin/runners/lib/doctor/fix-script.js +336 -0
- package/bin/runners/lib/doctor/modules/build-tools.js +453 -0
- package/bin/runners/lib/doctor/modules/index.js +62 -3
- package/bin/runners/lib/doctor/modules/os-quirks.js +706 -0
- package/bin/runners/lib/doctor/modules/repo-integrity.js +485 -0
- package/bin/runners/lib/doctor/safe-repair.js +384 -0
- package/bin/runners/lib/engines/attack-detector.js +1192 -0
- package/bin/runners/lib/entitlements-v2.js +2 -2
- package/bin/runners/lib/error-messages.js +1 -1
- package/bin/runners/lib/missions/briefing.js +427 -0
- package/bin/runners/lib/missions/checkpoint.js +753 -0
- package/bin/runners/lib/missions/hardening.js +851 -0
- package/bin/runners/lib/missions/plan.js +421 -32
- package/bin/runners/lib/missions/safety-gates.js +645 -0
- package/bin/runners/lib/missions/schema.js +478 -0
- package/bin/runners/lib/packs/bundle.js +675 -0
- package/bin/runners/lib/packs/evidence-pack.js +671 -0
- package/bin/runners/lib/packs/pack-factory.js +837 -0
- package/bin/runners/lib/packs/permissions-pack.js +686 -0
- package/bin/runners/lib/packs/proof-graph-pack.js +779 -0
- package/bin/runners/lib/report-output.js +6 -6
- package/bin/runners/lib/safelist/index.js +96 -0
- package/bin/runners/lib/safelist/integration.js +334 -0
- package/bin/runners/lib/safelist/matcher.js +696 -0
- package/bin/runners/lib/safelist/schema.js +948 -0
- package/bin/runners/lib/safelist/store.js +438 -0
- package/bin/runners/lib/schemas/ship-manifest.schema.json +251 -0
- package/bin/runners/lib/ship-gate.js +832 -0
- package/bin/runners/lib/ship-manifest.js +1153 -0
- package/bin/runners/lib/ship-output.js +1 -1
- package/bin/runners/lib/unified-cli-output.js +710 -383
- package/bin/runners/lib/upsell.js +3 -3
- package/bin/runners/lib/why-tree.js +650 -0
- package/bin/runners/runAllowlist.js +33 -4
- package/bin/runners/runApprove.js +240 -1122
- package/bin/runners/runAudit.js +692 -0
- package/bin/runners/runAuth.js +325 -29
- package/bin/runners/runCheckpoint.js +442 -494
- package/bin/runners/runCleanup.js +343 -0
- package/bin/runners/runDoctor.js +269 -19
- package/bin/runners/runFix.js +411 -32
- package/bin/runners/runForge.js +411 -0
- package/bin/runners/runIntent.js +906 -0
- package/bin/runners/runKickoff.js +878 -0
- package/bin/runners/runLaunch.js +2000 -0
- package/bin/runners/runLink.js +785 -0
- package/bin/runners/runMcp.js +1741 -837
- package/bin/runners/runPacks.js +2089 -0
- package/bin/runners/runPolish.js +41 -0
- package/bin/runners/runSafelist.js +1190 -0
- package/bin/runners/runScan.js +21 -9
- package/bin/runners/runShield.js +1282 -0
- package/bin/runners/runShip.js +395 -16
- package/bin/vibecheck.js +34 -6
- package/mcp-server/README.md +117 -158
- package/mcp-server/handlers/tool-handler.ts +3 -3
- package/mcp-server/index.js +16 -0
- package/mcp-server/intent-firewall-interceptor.js +529 -0
- package/mcp-server/manifest.json +473 -0
- package/mcp-server/package.json +1 -1
- package/mcp-server/registry/tool-registry.js +315 -523
- package/mcp-server/registry/tools.json +442 -428
- package/mcp-server/tier-auth.js +164 -16
- package/mcp-server/tools-v3.js +70 -16
- package/package.json +1 -1
- package/bin/runners/runProof.zip +0 -0
package/bin/runners/runDoctor.js
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
* ═══════════════════════════════════════════════════════════════════════════════
|
|
7
7
|
*
|
|
8
8
|
* Comprehensive environment checks with auto-fix capability.
|
|
9
|
+
*
|
|
10
|
+
* Features:
|
|
11
|
+
* - Full environment diagnostics (Node, npm, OS, build tools, etc.)
|
|
12
|
+
* - OS-specific quirk detection (Windows/macOS/Linux)
|
|
13
|
+
* - Known failure signature matching with exact remediation
|
|
14
|
+
* - "Fix Script" generation (copy-paste commands)
|
|
15
|
+
* - "Diagnosis Receipt" JSON export
|
|
16
|
+
* - Safe `--repair` mode for non-destructive fixes
|
|
9
17
|
*/
|
|
10
18
|
|
|
11
19
|
const fs = require("fs");
|
|
@@ -309,6 +317,16 @@ async function runDoctor(args, context = {}) {
|
|
|
309
317
|
printHelp(shouldShowBanner(opts));
|
|
310
318
|
return EXIT.SUCCESS;
|
|
311
319
|
}
|
|
320
|
+
|
|
321
|
+
// Handle --list-actions (list available repair actions)
|
|
322
|
+
if (opts.listActions) {
|
|
323
|
+
return handleListActions(opts);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Handle --analyze (match error text against known signatures)
|
|
327
|
+
if (opts.analyze) {
|
|
328
|
+
return handleAnalyzeError(opts.analyze, opts);
|
|
329
|
+
}
|
|
312
330
|
|
|
313
331
|
const projectPath = path.resolve(opts.path || process.cwd());
|
|
314
332
|
|
|
@@ -336,7 +354,7 @@ async function runDoctor(args, context = {}) {
|
|
|
336
354
|
if (DoctorService.name === 'DoctorService') {
|
|
337
355
|
const doctor = new DoctorService(projectPath, {
|
|
338
356
|
json: opts.json,
|
|
339
|
-
fix: opts.fix,
|
|
357
|
+
fix: opts.fix && !opts.repair, // Don't use old fix if repair mode
|
|
340
358
|
fixDryRun: opts.dryRun,
|
|
341
359
|
quiet: opts.quiet || quiet,
|
|
342
360
|
verbose: opts.verbose,
|
|
@@ -348,9 +366,35 @@ async function runDoctor(args, context = {}) {
|
|
|
348
366
|
});
|
|
349
367
|
|
|
350
368
|
const results = await doctor.run();
|
|
369
|
+
const endTime = new Date().toISOString();
|
|
370
|
+
|
|
371
|
+
// Get diagnostic results for enhanced features
|
|
372
|
+
const diagnostics = doctor.results || results.checks || [];
|
|
373
|
+
|
|
374
|
+
// Handle --repair mode (safe repairs only)
|
|
375
|
+
if (opts.repair) {
|
|
376
|
+
const repairResults = await handleRepairMode(diagnostics, projectPath, opts);
|
|
377
|
+
if (repairResults.needsRecheck) {
|
|
378
|
+
if (!quiet && !json) {
|
|
379
|
+
console.log(`\n ${colors.accent}↻${c.reset} Re-running diagnostics after repairs...\n`);
|
|
380
|
+
}
|
|
381
|
+
return runDoctor(args.filter(a => a !== '--repair'), context);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// Handle --fix-script (generate copy-paste fix commands)
|
|
386
|
+
if (opts.fixScript) {
|
|
387
|
+
handleFixScript(diagnostics, projectPath, opts);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// Handle --receipt (generate diagnosis receipt JSON)
|
|
391
|
+
if (opts.receipt) {
|
|
392
|
+
handleReceipt(diagnostics, projectPath, { startTime, endTime, runId }, opts);
|
|
393
|
+
}
|
|
351
394
|
|
|
352
395
|
// Apply CLI output conventions
|
|
353
396
|
if (opts.json || json) {
|
|
397
|
+
// Enhanced JSON output with receipt format
|
|
354
398
|
const output = createJsonOutput({
|
|
355
399
|
runId,
|
|
356
400
|
command: "doctor",
|
|
@@ -359,13 +403,21 @@ async function runDoctor(args, context = {}) {
|
|
|
359
403
|
verdict: exitCodeToVerdict(results.exitCode || EXIT.SUCCESS),
|
|
360
404
|
result: {
|
|
361
405
|
health: results.health || "unknown",
|
|
362
|
-
checks:
|
|
406
|
+
checks: diagnostics.map(d => ({
|
|
407
|
+
id: d.id,
|
|
408
|
+
name: d.name,
|
|
409
|
+
category: d.category,
|
|
410
|
+
severity: d.severity,
|
|
411
|
+
message: d.message,
|
|
412
|
+
detail: d.detail,
|
|
413
|
+
fixes: d.fixes,
|
|
414
|
+
})),
|
|
363
415
|
fixes: results.fixes || [],
|
|
364
416
|
summary: {
|
|
365
|
-
total: results.totalChecks ||
|
|
366
|
-
passed: results.passedChecks ||
|
|
367
|
-
warnings: results.warnings ||
|
|
368
|
-
errors: results.errors ||
|
|
417
|
+
total: results.totalChecks || diagnostics.length,
|
|
418
|
+
passed: results.passedChecks || diagnostics.filter(d => d.severity === 'pass').length,
|
|
419
|
+
warnings: results.warnings || diagnostics.filter(d => d.severity === 'warning').length,
|
|
420
|
+
errors: results.errors || diagnostics.filter(d => d.severity === 'error' || d.severity === 'critical').length,
|
|
369
421
|
}
|
|
370
422
|
},
|
|
371
423
|
tier: "free",
|
|
@@ -381,8 +433,8 @@ async function runDoctor(args, context = {}) {
|
|
|
381
433
|
}
|
|
382
434
|
|
|
383
435
|
// Save artifacts
|
|
384
|
-
if (
|
|
385
|
-
saveArtifact(runId, "checks",
|
|
436
|
+
if (diagnostics.length > 0) {
|
|
437
|
+
saveArtifact(runId, "checks", diagnostics);
|
|
386
438
|
}
|
|
387
439
|
if (results.fixes) {
|
|
388
440
|
saveArtifact(runId, "fixes", results.fixes);
|
|
@@ -407,6 +459,161 @@ async function runDoctor(args, context = {}) {
|
|
|
407
459
|
}
|
|
408
460
|
}
|
|
409
461
|
|
|
462
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
463
|
+
// ENHANCED FEATURE HANDLERS
|
|
464
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
465
|
+
|
|
466
|
+
function handleListActions(opts) {
|
|
467
|
+
const safeRepair = require('./lib/doctor/safe-repair');
|
|
468
|
+
const actions = safeRepair.listSafeRepairActions();
|
|
469
|
+
|
|
470
|
+
if (opts.json) {
|
|
471
|
+
console.log(JSON.stringify({ actions }, null, 2));
|
|
472
|
+
} else {
|
|
473
|
+
console.log(`\n ${colors.accent}🔧${c.reset} ${c.bold}Available Safe Repair Actions${c.reset}\n`);
|
|
474
|
+
printDivider();
|
|
475
|
+
|
|
476
|
+
for (const action of actions) {
|
|
477
|
+
console.log(` ${colors.healthy}${action.id}${c.reset}`);
|
|
478
|
+
console.log(` ${action.name}`);
|
|
479
|
+
console.log(` ${c.dim}${action.description}${c.reset}`);
|
|
480
|
+
console.log();
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
return EXIT.SUCCESS;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
function handleAnalyzeError(errorText, opts) {
|
|
488
|
+
const failureSignatures = require('./lib/doctor/failure-signatures');
|
|
489
|
+
const matches = failureSignatures.matchFailureSignatures(errorText);
|
|
490
|
+
|
|
491
|
+
if (opts.json) {
|
|
492
|
+
console.log(JSON.stringify({
|
|
493
|
+
analyzed: errorText.slice(0, 200),
|
|
494
|
+
matches: matches.map(m => ({
|
|
495
|
+
id: m.id,
|
|
496
|
+
name: m.name,
|
|
497
|
+
diagnosis: m.diagnosis,
|
|
498
|
+
remediation: m.remediation,
|
|
499
|
+
commands: m.commands,
|
|
500
|
+
})),
|
|
501
|
+
safeCommands: failureSignatures.getSafeCommands(matches),
|
|
502
|
+
}, null, 2));
|
|
503
|
+
} else {
|
|
504
|
+
if (matches.length === 0) {
|
|
505
|
+
console.log(`\n ${colors.warning}⚠${c.reset} No known failure signatures matched.\n`);
|
|
506
|
+
console.log(` ${c.dim}Try running: vibecheck doctor --verbose${c.reset}\n`);
|
|
507
|
+
} else {
|
|
508
|
+
console.log(`\n ${colors.healthy}✓${c.reset} ${c.bold}Matched ${matches.length} known failure signature(s)${c.reset}\n`);
|
|
509
|
+
printDivider();
|
|
510
|
+
|
|
511
|
+
for (const match of matches) {
|
|
512
|
+
console.log(failureSignatures.formatDiagnosis(match));
|
|
513
|
+
console.log();
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
return EXIT.SUCCESS;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
async function handleRepairMode(diagnostics, projectPath, opts) {
|
|
522
|
+
const safeRepair = require('./lib/doctor/safe-repair');
|
|
523
|
+
|
|
524
|
+
const quiet = shouldSuppressOutput(opts);
|
|
525
|
+
const json = isJsonMode(opts);
|
|
526
|
+
|
|
527
|
+
if (!quiet && !json) {
|
|
528
|
+
console.log(`\n ${colors.accent}🔧${c.reset} ${c.bold}Safe Repair Mode${c.reset}`);
|
|
529
|
+
printDivider();
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
const repairResults = await safeRepair.runSafeRepair(diagnostics, projectPath, {
|
|
533
|
+
dryRun: opts.dryRun,
|
|
534
|
+
verbose: opts.verbose,
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
if (json) {
|
|
538
|
+
console.log(JSON.stringify({ repair: repairResults }, null, 2));
|
|
539
|
+
} else if (!quiet) {
|
|
540
|
+
const { summary, results } = repairResults;
|
|
541
|
+
|
|
542
|
+
for (const result of results) {
|
|
543
|
+
const icon = result.status === 'success' ? `${colors.healthy}✓` :
|
|
544
|
+
result.status === 'failed' ? `${colors.error}✗` :
|
|
545
|
+
`${colors.warning}○`;
|
|
546
|
+
console.log(` ${icon}${c.reset} ${result.actionName}`);
|
|
547
|
+
console.log(` ${c.dim}${result.message}${c.reset}`);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
console.log();
|
|
551
|
+
console.log(` ${c.bold}Summary:${c.reset} ${summary.succeeded} succeeded, ${summary.failed} failed, ${summary.skipped} skipped`);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
return repairResults;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
function handleFixScript(diagnostics, projectPath, opts) {
|
|
558
|
+
const fixScript = require('./lib/doctor/fix-script');
|
|
559
|
+
|
|
560
|
+
const quiet = shouldSuppressOutput(opts);
|
|
561
|
+
const json = isJsonMode(opts);
|
|
562
|
+
|
|
563
|
+
const format = opts.json ? 'json' : (opts.output?.endsWith('.md') ? 'markdown' : 'shell');
|
|
564
|
+
const result = fixScript.generateFixScript(diagnostics, {
|
|
565
|
+
projectPath,
|
|
566
|
+
format,
|
|
567
|
+
includeDangerous: false,
|
|
568
|
+
safeOnly: true,
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
if (json || format === 'json') {
|
|
572
|
+
console.log(JSON.stringify(result, null, 2));
|
|
573
|
+
} else if (!quiet) {
|
|
574
|
+
// Save to file if output specified
|
|
575
|
+
if (opts.output) {
|
|
576
|
+
fs.writeFileSync(opts.output, result.script);
|
|
577
|
+
console.log(`\n ${colors.healthy}✓${c.reset} Fix script saved to: ${opts.output}`);
|
|
578
|
+
} else {
|
|
579
|
+
console.log(`\n ${colors.accent}📋${c.reset} ${c.bold}Fix Script${c.reset}`);
|
|
580
|
+
printDivider();
|
|
581
|
+
console.log(result.script);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
console.log(`\n ${c.dim}Safe fixes: ${result.safeFixes}, Dangerous: ${result.dangerousFixes}, Manual: ${result.manualFixes}${c.reset}`);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
function handleReceipt(diagnostics, projectPath, timing, opts) {
|
|
589
|
+
// Lazy load the module
|
|
590
|
+
const diagnosisReceipt = require('./lib/doctor/diagnosis-receipt');
|
|
591
|
+
|
|
592
|
+
const quiet = shouldSuppressOutput(opts);
|
|
593
|
+
const json = isJsonMode(opts);
|
|
594
|
+
|
|
595
|
+
const receipt = diagnosisReceipt.generateDiagnosisReceipt(diagnostics, {
|
|
596
|
+
projectPath,
|
|
597
|
+
startTime: timing.startTime,
|
|
598
|
+
endTime: timing.endTime,
|
|
599
|
+
runId: timing.runId,
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
if (json) {
|
|
603
|
+
console.log(JSON.stringify(receipt, null, 2));
|
|
604
|
+
} else {
|
|
605
|
+
// Save to file
|
|
606
|
+
const outputPath = opts.output || path.join(projectPath, '.vibecheck', 'diagnosis-receipt.json');
|
|
607
|
+
diagnosisReceipt.saveReceipt(receipt, outputPath);
|
|
608
|
+
|
|
609
|
+
if (!quiet) {
|
|
610
|
+
console.log(`\n ${colors.healthy}✓${c.reset} Diagnosis receipt saved to: ${outputPath}`);
|
|
611
|
+
console.log(` ${c.dim}Receipt ID: ${receipt.receiptId}${c.reset}`);
|
|
612
|
+
console.log(` ${c.dim}Health: ${receipt.health.grade} (${receipt.health.score}/100) - ${receipt.health.verdict}${c.reset}`);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
410
617
|
function parseArgs(args) {
|
|
411
618
|
// Parse global flags first
|
|
412
619
|
const { flags: globalFlags, cleanArgs } = parseGlobalFlags(args);
|
|
@@ -421,6 +628,12 @@ function parseArgs(args) {
|
|
|
421
628
|
skipNetwork: false,
|
|
422
629
|
saveReport: true,
|
|
423
630
|
failOnWarn: false,
|
|
631
|
+
// New options for enhanced doctor
|
|
632
|
+
repair: false, // Safe repair mode (--repair)
|
|
633
|
+
fixScript: false, // Generate fix script (--fix-script)
|
|
634
|
+
receipt: false, // Generate diagnosis receipt (--receipt)
|
|
635
|
+
analyze: null, // Analyze error output (--analyze <text>)
|
|
636
|
+
listActions: false, // List available repair actions (--list-actions)
|
|
424
637
|
};
|
|
425
638
|
|
|
426
639
|
// Parse command-specific args from cleanArgs
|
|
@@ -438,9 +651,24 @@ function parseArgs(args) {
|
|
|
438
651
|
case '--fix':
|
|
439
652
|
opts.fix = true;
|
|
440
653
|
break;
|
|
654
|
+
case '--repair':
|
|
655
|
+
opts.repair = true;
|
|
656
|
+
break;
|
|
441
657
|
case '--dry-run':
|
|
442
658
|
opts.dryRun = true;
|
|
443
659
|
break;
|
|
660
|
+
case '--fix-script':
|
|
661
|
+
opts.fixScript = true;
|
|
662
|
+
break;
|
|
663
|
+
case '--receipt':
|
|
664
|
+
opts.receipt = true;
|
|
665
|
+
break;
|
|
666
|
+
case '--analyze':
|
|
667
|
+
opts.analyze = cleanArgs[++i];
|
|
668
|
+
break;
|
|
669
|
+
case '--list-actions':
|
|
670
|
+
opts.listActions = true;
|
|
671
|
+
break;
|
|
444
672
|
case '--category':
|
|
445
673
|
case '-c':
|
|
446
674
|
if (!opts.categories) opts.categories = [];
|
|
@@ -480,8 +708,9 @@ function printHelp(showBanner = true) {
|
|
|
480
708
|
${c.bold}Usage:${c.reset} vibecheck doctor (health, diag) [options] [path]
|
|
481
709
|
|
|
482
710
|
${c.bold}Environment Diagnostics${c.reset} — Comprehensive checks with auto-fix capability.
|
|
711
|
+
World-class diagnostic that gets you unblocked in minutes.
|
|
483
712
|
|
|
484
|
-
${c.bold}Options:${c.reset}
|
|
713
|
+
${c.bold}Core Options:${c.reset}
|
|
485
714
|
${colors.accent}--path, -p <path>${c.reset} Project path ${c.dim}(default: current directory)${c.reset}
|
|
486
715
|
${colors.accent}--json${c.reset} Output JSON report only
|
|
487
716
|
${colors.accent}--fix${c.reset} Auto-fix issues when possible
|
|
@@ -494,30 +723,51 @@ function printHelp(showBanner = true) {
|
|
|
494
723
|
${colors.accent}--fail-on-warn${c.reset} Exit code 2 for warnings ${c.dim}(CI mode)${c.reset}
|
|
495
724
|
${colors.accent}--help, -h${c.reset} Show this help
|
|
496
725
|
|
|
726
|
+
${c.bold}Legendary Features:${c.reset}
|
|
727
|
+
${colors.healthy}--repair${c.reset} Safe repair mode ${c.dim}(clear cache, regen lock, etc.)${c.reset}
|
|
728
|
+
${colors.healthy}--fix-script${c.reset} Generate copy-paste fix commands
|
|
729
|
+
${colors.healthy}--receipt${c.reset} Generate diagnosis receipt JSON
|
|
730
|
+
${colors.healthy}--analyze <error>${c.reset} Match error against known failure signatures
|
|
731
|
+
${colors.healthy}--list-actions${c.reset} List all available safe repair actions
|
|
732
|
+
|
|
497
733
|
${c.bold}Categories:${c.reset}
|
|
498
|
-
${colors.system}${ICONS.cpu}${c.reset} ${c.bold}system${c.reset} ${c.dim}OS, memory, disk, CPU${c.reset}
|
|
499
|
-
${colors.runtime}${ICONS.node}${c.reset} ${c.bold}runtime${c.reset} ${c.dim}Node.js, npm,
|
|
500
|
-
${colors.project}${ICONS.package}${c.reset} ${c.bold}project${c.reset} ${c.dim}package.json,
|
|
734
|
+
${colors.system}${ICONS.cpu}${c.reset} ${c.bold}system${c.reset} ${c.dim}OS, memory, disk, CPU, shell${c.reset}
|
|
735
|
+
${colors.runtime}${ICONS.node}${c.reset} ${c.bold}runtime${c.reset} ${c.dim}Node.js, npm, pnpm, yarn${c.reset}
|
|
736
|
+
${colors.project}${ICONS.package}${c.reset} ${c.bold}project${c.reset} ${c.dim}package.json, tsconfig, git state${c.reset}
|
|
501
737
|
${colors.accent}${ICONS.npm}${c.reset} ${c.bold}dependencies${c.reset} ${c.dim}Outdated packages, vulnerabilities${c.reset}
|
|
502
738
|
${colors.security}${ICONS.shield}${c.reset} ${c.bold}security${c.reset} ${c.dim}Secrets, gitignore, env files${c.reset}
|
|
503
|
-
${colors.network}${ICONS.network}${c.reset} ${c.bold}network${c.reset} ${c.dim}Internet, npm registry, API
|
|
739
|
+
${colors.network}${ICONS.network}${c.reset} ${c.bold}network${c.reset} ${c.dim}Internet, npm registry, API${c.reset}
|
|
504
740
|
${colors.vibecheck}${ICONS.sparkle}${c.reset} ${c.bold}vibecheck${c.reset} ${c.dim}Config, truth pack, scan status${c.reset}
|
|
505
741
|
|
|
742
|
+
${c.bold}OS-Specific Checks:${c.reset}
|
|
743
|
+
${c.dim}Windows:${c.reset} Long paths, PowerShell policy, antivirus, symlinks
|
|
744
|
+
${c.dim}macOS:${c.reset} Xcode CLI tools, Homebrew, Rosetta 2, file limits
|
|
745
|
+
${c.dim}Linux:${c.reset} build-essential, inotify watches, distro detection
|
|
746
|
+
|
|
506
747
|
${c.bold}Exit Codes:${c.reset}
|
|
507
748
|
${colors.healthy}0${c.reset} Healthy ${c.dim}(or warnings without --fail-on-warn)${c.reset}
|
|
508
|
-
${colors.
|
|
509
|
-
${colors.
|
|
749
|
+
${colors.warning}1${c.reset} Warnings found
|
|
750
|
+
${colors.error}2${c.reset} Errors found
|
|
510
751
|
${colors.critical}3${c.reset} Critical issues found
|
|
511
752
|
|
|
512
753
|
${c.bold}Examples:${c.reset}
|
|
513
754
|
${c.dim}# Full diagnostic${c.reset}
|
|
514
755
|
vibecheck doctor
|
|
515
756
|
|
|
516
|
-
${c.dim}#
|
|
517
|
-
vibecheck doctor --
|
|
757
|
+
${c.dim}# Safe repair mode (recommended first step)${c.reset}
|
|
758
|
+
vibecheck doctor --repair
|
|
759
|
+
|
|
760
|
+
${c.dim}# Generate fix script for manual review${c.reset}
|
|
761
|
+
vibecheck doctor --fix-script -o fix.sh
|
|
762
|
+
|
|
763
|
+
${c.dim}# Analyze a specific error message${c.reset}
|
|
764
|
+
vibecheck doctor --analyze "EACCES permission denied"
|
|
518
765
|
|
|
519
|
-
${c.dim}#
|
|
520
|
-
vibecheck doctor --
|
|
766
|
+
${c.dim}# Generate diagnosis receipt for support${c.reset}
|
|
767
|
+
vibecheck doctor --receipt --json > diagnosis.json
|
|
768
|
+
|
|
769
|
+
${c.dim}# JSON output for CI${c.reset}
|
|
770
|
+
vibecheck doctor --json --fail-on-warn
|
|
521
771
|
|
|
522
772
|
${c.dim}# Security checks only${c.reset}
|
|
523
773
|
vibecheck doctor -c security
|