@codebakers/cli 3.9.20 → 3.9.22

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.
@@ -1276,7 +1276,7 @@ async function handleApiKeyLogin(options = {}) {
1276
1276
  }
1277
1277
  }
1278
1278
  /**
1279
- * Show success message with clear next steps
1279
+ * Show success message with clear next steps based on user's editor
1280
1280
  */
1281
1281
  async function showSuccessAndRestart() {
1282
1282
  console.log(chalk_1.default.green(`
@@ -1286,17 +1286,87 @@ async function showSuccessAndRestart() {
1286
1286
  ║ ║
1287
1287
  ╚═══════════════════════════════════════════════════════════╝
1288
1288
  `));
1289
- console.log(chalk_1.default.yellow(' ⚠️ ONE MORE STEP - Restart Required\n'));
1290
- console.log(chalk_1.default.white(' Claude Code needs to restart to load the CodeBakers MCP server.\n'));
1291
- console.log(chalk_1.default.cyan(' How to restart Claude Code:\n'));
1292
- console.log(chalk_1.default.gray(' Option 1: ') + chalk_1.default.white('Close this window and run ') + chalk_1.default.cyan('claude') + chalk_1.default.white(' again'));
1293
- console.log(chalk_1.default.gray(' Option 2: ') + chalk_1.default.white('Press ') + chalk_1.default.cyan('Ctrl+C') + chalk_1.default.white(' and run ') + chalk_1.default.cyan('claude') + chalk_1.default.white(' again'));
1294
- console.log(chalk_1.default.gray(' Option 3: ') + chalk_1.default.white('In VS Code: ') + chalk_1.default.cyan('Cmd/Ctrl+Shift+P') + chalk_1.default.white(' → "Claude Code: Restart"\n'));
1295
- console.log(chalk_1.default.green(' After restart, try saying:\n'));
1296
- console.log(chalk_1.default.white(' "Build me a todo app with authentication"'));
1297
- console.log(chalk_1.default.white(' "Add a login page to my project"'));
1298
- console.log(chalk_1.default.white(' "Review my code and make it production-ready"\n'));
1289
+ // Check if we're in non-interactive mode
1290
+ const isNonInteractive = !process.stdin.isTTY;
1291
+ if (isNonInteractive) {
1292
+ // Non-interactive mode - show generic instructions
1293
+ console.log(chalk_1.default.yellow(' ⚠️ RELOAD REQUIRED\n'));
1294
+ console.log(chalk_1.default.white(' Your editor needs to reload to activate CodeBakers.\n'));
1295
+ console.log(chalk_1.default.cyan(' For Cursor:'));
1296
+ console.log(chalk_1.default.gray(' Press ') + chalk_1.default.cyan('Cmd/Ctrl+Shift+P') + chalk_1.default.gray(' → type ') + chalk_1.default.cyan('"Reload Window"') + chalk_1.default.gray(' → press Enter\n'));
1297
+ console.log(chalk_1.default.cyan(' For VS Code with Claude Code:'));
1298
+ console.log(chalk_1.default.gray(' Press ') + chalk_1.default.cyan('Cmd/Ctrl+Shift+P') + chalk_1.default.gray(' → type ') + chalk_1.default.cyan('"Reload Window"') + chalk_1.default.gray(' press Enter\n'));
1299
+ console.log(chalk_1.default.gray(' ─────────────────────────────────────────────────────────\n'));
1300
+ console.log(chalk_1.default.gray(' Having issues? Run: ') + chalk_1.default.cyan('codebakers doctor') + chalk_1.default.gray(' to diagnose\n'));
1301
+ return;
1302
+ }
1303
+ // Interactive mode - ask which editor they're using
1304
+ console.log(chalk_1.default.white(' Which editor are you using?\n'));
1305
+ console.log(chalk_1.default.gray(' 1. ') + chalk_1.default.cyan('Cursor') + chalk_1.default.gray(' - AI code editor'));
1306
+ console.log(chalk_1.default.gray(' 2. ') + chalk_1.default.cyan('VS Code + Claude Code') + chalk_1.default.gray(' - VS Code with Claude extension\n'));
1307
+ let editorChoice = '';
1308
+ while (!['1', '2'].includes(editorChoice)) {
1309
+ editorChoice = await prompt(' Enter 1 or 2: ');
1310
+ }
1311
+ console.log('');
1312
+ if (editorChoice === '1') {
1313
+ // Cursor instructions
1314
+ await showCursorInstructions();
1315
+ }
1316
+ else {
1317
+ // VS Code + Claude Code instructions
1318
+ await showVSCodeClaudeInstructions();
1319
+ }
1320
+ }
1321
+ /**
1322
+ * Show Cursor-specific instructions
1323
+ */
1324
+ async function showCursorInstructions() {
1325
+ console.log(chalk_1.default.cyan(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
1326
+ console.log(chalk_1.default.white.bold('\n 🎯 CURSOR SETUP - Follow these steps:\n'));
1327
+ console.log(chalk_1.default.cyan(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
1328
+ console.log(chalk_1.default.yellow(' STEP 1: Reload Cursor to activate CodeBakers\n'));
1329
+ console.log(chalk_1.default.gray(' Press ') + chalk_1.default.cyan('Cmd+Shift+P') + chalk_1.default.gray(' (Mac) or ') + chalk_1.default.cyan('Ctrl+Shift+P') + chalk_1.default.gray(' (Windows)'));
1330
+ console.log(chalk_1.default.gray(' Type ') + chalk_1.default.cyan('"Reload Window"') + chalk_1.default.gray(' and press Enter\n'));
1331
+ console.log(chalk_1.default.yellow(' STEP 2: Open the AI Chat\n'));
1332
+ console.log(chalk_1.default.gray(' Press ') + chalk_1.default.cyan('Cmd+L') + chalk_1.default.gray(' (Mac) or ') + chalk_1.default.cyan('Ctrl+L') + chalk_1.default.gray(' (Windows)'));
1333
+ console.log(chalk_1.default.gray(' This opens the Cursor Chat panel on the right side\n'));
1334
+ console.log(chalk_1.default.yellow(' STEP 3: Start building!\n'));
1335
+ console.log(chalk_1.default.gray(' Type your request in the chat. For example:\n'));
1336
+ console.log(chalk_1.default.white(' "Build me a todo app with authentication"'));
1337
+ console.log(chalk_1.default.white(' "Add a login page to my project"'));
1338
+ console.log(chalk_1.default.white(' "Review my code and make it production-ready"\n'));
1339
+ console.log(chalk_1.default.green(' ✅ You are now done with the terminal!\n'));
1340
+ console.log(chalk_1.default.gray(' From now on, use the ') + chalk_1.default.cyan('Cursor Chat') + chalk_1.default.gray(' to talk to AI.'));
1341
+ console.log(chalk_1.default.gray(' The terminal is only needed for running commands like npm.\n'));
1342
+ console.log(chalk_1.default.gray(' ─────────────────────────────────────────────────────────\n'));
1343
+ console.log(chalk_1.default.gray(' Having issues? Run: ') + chalk_1.default.cyan('codebakers doctor') + chalk_1.default.gray(' to diagnose\n'));
1344
+ }
1345
+ /**
1346
+ * Show VS Code + Claude Code specific instructions
1347
+ */
1348
+ async function showVSCodeClaudeInstructions() {
1349
+ console.log(chalk_1.default.cyan(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
1350
+ console.log(chalk_1.default.white.bold('\n 🎯 VS CODE + CLAUDE CODE SETUP - Follow these steps:\n'));
1351
+ console.log(chalk_1.default.cyan(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
1352
+ console.log(chalk_1.default.yellow(' STEP 1: Reload VS Code to activate CodeBakers\n'));
1353
+ console.log(chalk_1.default.gray(' Press ') + chalk_1.default.cyan('Cmd+Shift+P') + chalk_1.default.gray(' (Mac) or ') + chalk_1.default.cyan('Ctrl+Shift+P') + chalk_1.default.gray(' (Windows)'));
1354
+ console.log(chalk_1.default.gray(' Type ') + chalk_1.default.cyan('"Reload Window"') + chalk_1.default.gray(' and press Enter\n'));
1355
+ console.log(chalk_1.default.yellow(' STEP 2: Open Claude Code Chat\n'));
1356
+ console.log(chalk_1.default.gray(' Look for the ') + chalk_1.default.cyan('Claude icon') + chalk_1.default.gray(' in the left sidebar'));
1357
+ console.log(chalk_1.default.gray(' Click it to open the Claude Code chat panel\n'));
1358
+ console.log(chalk_1.default.gray(' Or press ') + chalk_1.default.cyan('Cmd+Shift+P') + chalk_1.default.gray(' → type ') + chalk_1.default.cyan('"Claude Code: Open Chat"') + chalk_1.default.gray('\n'));
1359
+ console.log(chalk_1.default.yellow(' STEP 3: Start building!\n'));
1360
+ console.log(chalk_1.default.gray(' Type your request in the Claude chat. For example:\n'));
1361
+ console.log(chalk_1.default.white(' "Build me a todo app with authentication"'));
1362
+ console.log(chalk_1.default.white(' "Add a login page to my project"'));
1363
+ console.log(chalk_1.default.white(' "Review my code and make it production-ready"\n'));
1364
+ console.log(chalk_1.default.green(' ✅ You are now done with the terminal!\n'));
1365
+ console.log(chalk_1.default.gray(' From now on, use the ') + chalk_1.default.cyan('Claude Code Chat') + chalk_1.default.gray(' panel to talk to AI.'));
1366
+ console.log(chalk_1.default.gray(' The terminal is only needed for running commands like npm.\n'));
1299
1367
  console.log(chalk_1.default.gray(' ─────────────────────────────────────────────────────────\n'));
1368
+ console.log(chalk_1.default.gray(' Tip: ') + chalk_1.default.white('Make sure you have the Claude Code extension installed.'));
1369
+ console.log(chalk_1.default.gray(' Get it from: ') + chalk_1.default.cyan('https://marketplace.visualstudio.com/items?itemName=anthropics.claude-code\n'));
1300
1370
  console.log(chalk_1.default.gray(' Having issues? Run: ') + chalk_1.default.cyan('codebakers doctor') + chalk_1.default.gray(' to diagnose\n'));
1301
1371
  }
1302
1372
  // v6.12 Bootstrap content - minimal files that point to MCP tools
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebakers/cli",
3
- "version": "3.9.20",
3
+ "version": "3.9.22",
4
4
  "description": "CodeBakers CLI - Production patterns for AI-assisted development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1449,7 +1449,7 @@ async function handleApiKeyLogin(options: GoOptions = {}): Promise<void> {
1449
1449
  }
1450
1450
 
1451
1451
  /**
1452
- * Show success message with clear next steps
1452
+ * Show success message with clear next steps based on user's editor
1453
1453
  */
1454
1454
  async function showSuccessAndRestart(): Promise<void> {
1455
1455
  console.log(chalk.green(`
@@ -1460,21 +1460,103 @@ async function showSuccessAndRestart(): Promise<void> {
1460
1460
  ╚═══════════════════════════════════════════════════════════╝
1461
1461
  `));
1462
1462
 
1463
- console.log(chalk.yellow(' ⚠️ ONE MORE STEP - Restart Required\n'));
1463
+ // Check if we're in non-interactive mode
1464
+ const isNonInteractive = !process.stdin.isTTY;
1465
+
1466
+ if (isNonInteractive) {
1467
+ // Non-interactive mode - show generic instructions
1468
+ console.log(chalk.yellow(' ⚠️ RELOAD REQUIRED\n'));
1469
+ console.log(chalk.white(' Your editor needs to reload to activate CodeBakers.\n'));
1470
+ console.log(chalk.cyan(' For Cursor:'));
1471
+ console.log(chalk.gray(' Press ') + chalk.cyan('Cmd/Ctrl+Shift+P') + chalk.gray(' → type ') + chalk.cyan('"Reload Window"') + chalk.gray(' → press Enter\n'));
1472
+ console.log(chalk.cyan(' For VS Code with Claude Code:'));
1473
+ console.log(chalk.gray(' Press ') + chalk.cyan('Cmd/Ctrl+Shift+P') + chalk.gray(' → type ') + chalk.cyan('"Reload Window"') + chalk.gray(' → press Enter\n'));
1474
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────\n'));
1475
+ console.log(chalk.gray(' Having issues? Run: ') + chalk.cyan('codebakers doctor') + chalk.gray(' to diagnose\n'));
1476
+ return;
1477
+ }
1478
+
1479
+ // Interactive mode - ask which editor they're using
1480
+ console.log(chalk.white(' Which editor are you using?\n'));
1481
+ console.log(chalk.gray(' 1. ') + chalk.cyan('Cursor') + chalk.gray(' - AI code editor'));
1482
+ console.log(chalk.gray(' 2. ') + chalk.cyan('VS Code + Claude Code') + chalk.gray(' - VS Code with Claude extension\n'));
1483
+
1484
+ let editorChoice = '';
1485
+ while (!['1', '2'].includes(editorChoice)) {
1486
+ editorChoice = await prompt(' Enter 1 or 2: ');
1487
+ }
1488
+
1489
+ console.log('');
1490
+
1491
+ if (editorChoice === '1') {
1492
+ // Cursor instructions
1493
+ await showCursorInstructions();
1494
+ } else {
1495
+ // VS Code + Claude Code instructions
1496
+ await showVSCodeClaudeInstructions();
1497
+ }
1498
+ }
1499
+
1500
+ /**
1501
+ * Show Cursor-specific instructions
1502
+ */
1503
+ async function showCursorInstructions(): Promise<void> {
1504
+ console.log(chalk.cyan(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
1505
+ console.log(chalk.white.bold('\n 🎯 CURSOR SETUP - Follow these steps:\n'));
1506
+ console.log(chalk.cyan(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
1507
+
1508
+ console.log(chalk.yellow(' STEP 1: Reload Cursor to activate CodeBakers\n'));
1509
+ console.log(chalk.gray(' Press ') + chalk.cyan('Cmd+Shift+P') + chalk.gray(' (Mac) or ') + chalk.cyan('Ctrl+Shift+P') + chalk.gray(' (Windows)'));
1510
+ console.log(chalk.gray(' Type ') + chalk.cyan('"Reload Window"') + chalk.gray(' and press Enter\n'));
1511
+
1512
+ console.log(chalk.yellow(' STEP 2: Open the AI Chat\n'));
1513
+ console.log(chalk.gray(' Press ') + chalk.cyan('Cmd+L') + chalk.gray(' (Mac) or ') + chalk.cyan('Ctrl+L') + chalk.gray(' (Windows)'));
1514
+ console.log(chalk.gray(' This opens the Cursor Chat panel on the right side\n'));
1464
1515
 
1465
- console.log(chalk.white(' Claude Code needs to restart to load the CodeBakers MCP server.\n'));
1516
+ console.log(chalk.yellow(' STEP 3: Start building!\n'));
1517
+ console.log(chalk.gray(' Type your request in the chat. For example:\n'));
1518
+ console.log(chalk.white(' "Build me a todo app with authentication"'));
1519
+ console.log(chalk.white(' "Add a login page to my project"'));
1520
+ console.log(chalk.white(' "Review my code and make it production-ready"\n'));
1466
1521
 
1467
- console.log(chalk.cyan(' How to restart Claude Code:\n'));
1468
- console.log(chalk.gray(' Option 1: ') + chalk.white('Close this window and run ') + chalk.cyan('claude') + chalk.white(' again'));
1469
- console.log(chalk.gray(' Option 2: ') + chalk.white('Press ') + chalk.cyan('Ctrl+C') + chalk.white(' and run ') + chalk.cyan('claude') + chalk.white(' again'));
1470
- console.log(chalk.gray(' Option 3: ') + chalk.white('In VS Code: ') + chalk.cyan('Cmd/Ctrl+Shift+P') + chalk.white(' → "Claude Code: Restart"\n'));
1522
+ console.log(chalk.green(' You are now done with the terminal!\n'));
1523
+ console.log(chalk.gray(' From now on, use the ') + chalk.cyan('Cursor Chat') + chalk.gray(' to talk to AI.'));
1524
+ console.log(chalk.gray(' The terminal is only needed for running commands like npm.\n'));
1471
1525
 
1472
- console.log(chalk.green(' After restart, try saying:\n'));
1473
- console.log(chalk.white(' "Build me a todo app with authentication"'));
1474
- console.log(chalk.white(' "Add a login page to my project"'));
1475
- console.log(chalk.white(' "Review my code and make it production-ready"\n'));
1526
+ console.log(chalk.gray(' ─────────────────────────────────────────────────────────\n'));
1527
+ console.log(chalk.gray(' Having issues? Run: ') + chalk.cyan('codebakers doctor') + chalk.gray(' to diagnose\n'));
1528
+ }
1529
+
1530
+ /**
1531
+ * Show VS Code + Claude Code specific instructions
1532
+ */
1533
+ async function showVSCodeClaudeInstructions(): Promise<void> {
1534
+ console.log(chalk.cyan(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
1535
+ console.log(chalk.white.bold('\n 🎯 VS CODE + CLAUDE CODE SETUP - Follow these steps:\n'));
1536
+ console.log(chalk.cyan(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
1537
+
1538
+ console.log(chalk.yellow(' STEP 1: Reload VS Code to activate CodeBakers\n'));
1539
+ console.log(chalk.gray(' Press ') + chalk.cyan('Cmd+Shift+P') + chalk.gray(' (Mac) or ') + chalk.cyan('Ctrl+Shift+P') + chalk.gray(' (Windows)'));
1540
+ console.log(chalk.gray(' Type ') + chalk.cyan('"Reload Window"') + chalk.gray(' and press Enter\n'));
1541
+
1542
+ console.log(chalk.yellow(' STEP 2: Open Claude Code Chat\n'));
1543
+ console.log(chalk.gray(' Look for the ') + chalk.cyan('Claude icon') + chalk.gray(' in the left sidebar'));
1544
+ console.log(chalk.gray(' Click it to open the Claude Code chat panel\n'));
1545
+ console.log(chalk.gray(' Or press ') + chalk.cyan('Cmd+Shift+P') + chalk.gray(' → type ') + chalk.cyan('"Claude Code: Open Chat"') + chalk.gray('\n'));
1546
+
1547
+ console.log(chalk.yellow(' STEP 3: Start building!\n'));
1548
+ console.log(chalk.gray(' Type your request in the Claude chat. For example:\n'));
1549
+ console.log(chalk.white(' "Build me a todo app with authentication"'));
1550
+ console.log(chalk.white(' "Add a login page to my project"'));
1551
+ console.log(chalk.white(' "Review my code and make it production-ready"\n'));
1552
+
1553
+ console.log(chalk.green(' ✅ You are now done with the terminal!\n'));
1554
+ console.log(chalk.gray(' From now on, use the ') + chalk.cyan('Claude Code Chat') + chalk.gray(' panel to talk to AI.'));
1555
+ console.log(chalk.gray(' The terminal is only needed for running commands like npm.\n'));
1476
1556
 
1477
1557
  console.log(chalk.gray(' ─────────────────────────────────────────────────────────\n'));
1558
+ console.log(chalk.gray(' Tip: ') + chalk.white('Make sure you have the Claude Code extension installed.'));
1559
+ console.log(chalk.gray(' Get it from: ') + chalk.cyan('https://marketplace.visualstudio.com/items?itemName=anthropics.claude-code\n'));
1478
1560
  console.log(chalk.gray(' Having issues? Run: ') + chalk.cyan('codebakers doctor') + chalk.gray(' to diagnose\n'));
1479
1561
  }
1480
1562