@vibecheckai/cli 2.5.4 → 2.5.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAuHH,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;CAoBV,CAAC;AAEF,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;CAkCX,CAAC;AA2KF,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAGpC,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAyDvI;AAgHD,iBAAS,SAAS,SAEjB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAuHH,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;CAoBV,CAAC;AAEF,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;CAkCX,CAAC;AA0KF,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAGpC,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAyDvI;AAgHD,iBAAS,SAAS,SAEjB"}
package/dist/index.js CHANGED
@@ -221,26 +221,25 @@ function frameLines(lines, opts) {
221
221
  framed.push(bottom);
222
222
  return framed;
223
223
  }
224
- function renderGuardrailBanner(params) {
224
+ function renderVibecheckBanner(params) {
225
225
  const subtitle = params.subtitle ?? `${styles.brightMagenta}${styles.bold}${icons.refresh} AI-Native Code Security Platform ${icons.refresh}${styles.reset}`;
226
226
  const art = supportsUnicode ? [
227
- `${styles.brightWhite}${styles.bold} ██████╗ ██╗ ██╗ █████╗ ██████╗ ██████╗ ██████╗ █████╗ ██╗██╗ ${styles.reset}`,
228
- `${styles.brightWhite}${styles.bold} ██╔════╝ ██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██║██║ ${styles.reset}`,
229
- `${styles.brightWhite}${styles.bold} ██║ ███╗██║ ██║███████║██████╔╝██║ ██║██████╔╝███████║██║██║ ${styles.reset}`,
230
- `${styles.brightWhite}${styles.bold} ██║ ██║██║ ██║██╔══██║██╔══██╗██║ ██║██╔══██╗██╔══██║██║██║ ${styles.reset}`,
231
- `${styles.brightWhite}${styles.bold} ╚██████╔╝╚██████╔╝██║ ██║██║ ██║██████╔╝██║ ██║██║ ██║██║███████╗${styles.reset}`,
232
- `${styles.brightWhite}${styles.bold} ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝${styles.reset}`,
227
+ `${styles.brightWhite}${styles.bold}██╗ ██╗██╗██████╗ ███████╗ ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗${styles.reset}`,
228
+ `${styles.brightWhite}${styles.bold}██║ ██║██║██╔══██╗██╔════╝██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝${styles.reset}`,
229
+ `${styles.brightWhite}${styles.bold}██║ ██║██║██████╔╝█████╗ ██║ ███████║█████╗ ██║ █████╔╝ ${styles.reset}`,
230
+ `${styles.brightWhite}${styles.bold}╚██╗ ██╔╝██║██╔══██╗██╔══╝ ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗ ${styles.reset}`,
231
+ `${styles.brightWhite}${styles.bold} ╚████╔╝ ██║██████╔╝███████╗╚██████╗██║ ██║███████╗╚██████╗██║ ██╗${styles.reset}`,
232
+ `${styles.brightWhite}${styles.bold} ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝${styles.reset}`,
233
233
  '',
234
234
  `${styles.dim}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${styles.reset}`,
235
235
  ` ${subtitle}`,
236
236
  `${styles.dim}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${styles.reset}`,
237
237
  ] : [
238
- ' _____ _ _ _ ____ _____ _____ _ ___ _ ',
239
- ' / ____| | | |/ \\ | _ \\| __ \\| __ \\ / \\ |_ _| | ',
240
- '| | __| | | / _ \\| |_) | |__) | |__) / _ \\ | || | ',
241
- '| | |_ | | |/ ___ \\ _ <| _ /| _ / ___ \\| || | ',
242
- '| |__| | |__| / \\ | |_) | | \\ \\| | \\ / ___ \\| || |____ ',
243
- ' \\_____|\\____/_/ \\_\\____/|_| \\_\\_| \\_/_/ \\_\\______|',
238
+ '__ _____ ____ _____ ____ _ _ _____ ____ _ __',
239
+ '\\ \\ / /_ _| __ )| ____/ ___| | | | ____/ ___| |/ /',
240
+ ' \\ \\ / / | || _ \\| _|| | | |_| | _|| | | \' / ',
241
+ ' \\ V / | || |_) | |__| |___| _ | |__| |___| . \\ ',
242
+ ' \\_/ |___|____/|_____\\____|_| |_|_____\\____|_|\\_\\',
244
243
  '',
245
244
  '----------------------------------------------------------------------',
246
245
  ` ${subtitle}`,
@@ -290,7 +289,7 @@ function printMenuHeader() {
290
289
  else {
291
290
  authLine = ` ${styles.brightRed}${icons.dot}${styles.reset} Not authenticated ${styles.dim}(select Auth to login)${styles.reset}`;
292
291
  }
293
- console.log(renderGuardrailBanner({ authLine }));
292
+ console.log(renderVibecheckBanner({ authLine }));
294
293
  }
295
294
  // Print styled divider
296
295
  function printDivider(char = '─', width = 60) {
@@ -453,12 +452,12 @@ const c = {
453
452
  };
454
453
  // ASCII art logo
455
454
  const logo = `
456
- ${colors.cyan}${colors.bold} ██████╗ ██╗ ██╗ █████╗ ██████╗ ██████╗ ██████╗ █████╗ ██╗██╗
457
- ██╔════╝ ██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██║██║
458
- ██║ ███╗██║ ██║███████║██████╔╝██║ ██║██████╔╝███████║██║██║
459
- ██║ ██║██║ ██║██╔══██║██╔══██╗██║ ██║██╔══██╗██╔══██║██║██║
460
- ╚██████╔╝╚██████╔╝██║ ██║██║ ██║██████╔╝██║ ██║██║ ██║██║███████╗
461
- ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝${colors.reset}
455
+ ${colors.cyan}${colors.bold}██╗ ██╗██╗██████╗ ███████╗ ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗
456
+ ██║ ██║██║██╔══██╗██╔════╝██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝
457
+ ██║ ██║██║██████╔╝█████╗ ██║ ███████║█████╗ ██║ █████╔╝
458
+ ╚██╗ ██╔╝██║██╔══██╗██╔══╝ ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗
459
+ ╚████╔╝ ██║██████╔╝███████╗╚██████╗██║ ██║███████╗╚██████╗██║ ██╗
460
+ ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝${colors.reset}
462
461
  ${colors.dim}AI-Native Code Security Platform${colors.reset}
463
462
  `;
464
463
  function printLogo() {
@@ -532,7 +531,22 @@ let cachedAuthState = null;
532
531
  * - Uses cached entitlements if still valid (15 min cache)
533
532
  * - Falls back to offline mode if network unavailable
534
533
  */
534
+ // Check if running in demo/owner mode (env var or CLI flag)
535
+ function isDemoMode() {
536
+ return process.env.VIBECHECK_DEMO === '1' ||
537
+ process.env.VIBECHECK_OWNER === '1' ||
538
+ process.argv.includes('--demo');
539
+ }
535
540
  async function requireAuthAsync(requiredTier) {
541
+ // Demo/owner mode bypasses auth - full access for testing
542
+ if (isDemoMode()) {
543
+ return {
544
+ apiKey: 'demo-mode',
545
+ tier: 'enterprise',
546
+ email: 'owner@vibecheckai.dev',
547
+ authenticatedAt: new Date().toISOString(),
548
+ };
549
+ }
536
550
  // Load state (from keychain + disk)
537
551
  const state = cachedAuthState || await (0, creds_1.loadAuthState)();
538
552
  cachedAuthState = state;
@@ -540,6 +554,7 @@ async function requireAuthAsync(requiredTier) {
540
554
  console.error(`\n${c.critical('ERROR')} Authentication required\n`);
541
555
  console.log(` ${c.dim('Run')} ${c.bold('vibecheck auth --key YOUR_API_KEY')} ${c.dim('to authenticate')}`);
542
556
  console.log(` ${c.dim('Get your API key from')} ${c.info('https://vibecheckai.dev/api-key')}\n`);
557
+ console.log(` ${c.dim('Or use')} ${c.bold('--demo')} ${c.dim('for local testing')}\n`);
543
558
  (0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.AUTH_FAILURE);
544
559
  }
545
560
  // Check if cached entitlements are still valid
@@ -588,11 +603,21 @@ function checkTierAccess(state, requiredTier) {
588
603
  }
589
604
  // Sync wrapper for backward compatibility (commands will be migrated to async)
590
605
  function requireAuth(tier) {
606
+ // Demo/owner mode bypasses auth - full access for testing
607
+ if (isDemoMode()) {
608
+ return {
609
+ apiKey: 'demo-mode',
610
+ tier: 'enterprise',
611
+ email: 'owner@vibecheckai.dev',
612
+ authenticatedAt: new Date().toISOString(),
613
+ };
614
+ }
591
615
  const config = loadConfig();
592
616
  if (!config.apiKey) {
593
617
  console.error(`\n${c.critical('ERROR')} Authentication required\n`);
594
618
  console.log(` ${c.dim('Run')} ${c.bold('vibecheck auth --key YOUR_API_KEY')} ${c.dim('to authenticate')}`);
595
619
  console.log(` ${c.dim('Get your API key from')} ${c.info('https://vibecheckai.dev/api-key')}\n`);
620
+ console.log(` ${c.dim('Or use')} ${c.bold('--demo')} ${c.dim('for local testing')}\n`);
596
621
  (0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.AUTH_FAILURE);
597
622
  }
598
623
  if (tier) {
@@ -611,7 +636,8 @@ function requireAuth(tier) {
611
636
  program
612
637
  .name('vibecheck')
613
638
  .description('vibecheck AI - Security scanning for your codebase')
614
- .version(CLI_VERSION);
639
+ .version(CLI_VERSION)
640
+ .option('--demo', 'Run in demo mode (bypasses authentication for testing)');
615
641
  // Login command
616
642
  program
617
643
  .command('login')