@codebakers/cli 3.9.9 → 3.9.11
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/dist/commands/go.js +58 -54
- package/dist/index.js +18 -3
- package/package.json +1 -1
- package/src/commands/go.ts +61 -59
- package/src/index.ts +17 -3
package/dist/commands/go.js
CHANGED
|
@@ -936,7 +936,7 @@ function log(message, options) {
|
|
|
936
936
|
}
|
|
937
937
|
}
|
|
938
938
|
// Current CLI version - must match package.json
|
|
939
|
-
const CURRENT_VERSION = '3.9.
|
|
939
|
+
const CURRENT_VERSION = '3.9.10';
|
|
940
940
|
/**
|
|
941
941
|
* Check for updates and install them automatically
|
|
942
942
|
* This makes "codebakers go" the magic phrase that keeps everything updated
|
|
@@ -1035,14 +1035,24 @@ async function go(options = {}) {
|
|
|
1035
1035
|
const existingApiKey = (0, config_js_1.getApiKey)();
|
|
1036
1036
|
const existingTrial = (0, config_js_1.getTrialState)();
|
|
1037
1037
|
if (existingApiKey) {
|
|
1038
|
-
console.log(chalk_1.default.green(' ✓ Authenticated
|
|
1038
|
+
console.log(chalk_1.default.green(' ✓ Authenticated with API key\n'));
|
|
1039
|
+
console.log(chalk_1.default.gray(' You\'re all set! Ask Claude to help you build something.\n'));
|
|
1039
1040
|
}
|
|
1040
1041
|
else if (existingTrial && !(0, config_js_1.isTrialExpired)()) {
|
|
1041
1042
|
const daysRemaining = (0, config_js_1.getTrialDaysRemaining)();
|
|
1042
|
-
console.log(chalk_1.default.green(` ✓ Trial active
|
|
1043
|
+
console.log(chalk_1.default.green(` ✓ Trial active - ${daysRemaining} day${daysRemaining === 1 ? '' : 's'} remaining\n`));
|
|
1044
|
+
console.log(chalk_1.default.gray(' You\'re all set! Ask Claude to help you build something.\n'));
|
|
1043
1045
|
}
|
|
1044
1046
|
else if (existingTrial && (0, config_js_1.isTrialExpired)()) {
|
|
1045
|
-
console.log(chalk_1.default.yellow(' ⚠️ Trial expired
|
|
1047
|
+
console.log(chalk_1.default.yellow(' ⚠️ Trial expired\n'));
|
|
1048
|
+
console.log(chalk_1.default.white(' To continue using CodeBakers:'));
|
|
1049
|
+
console.log(chalk_1.default.cyan(' codebakers extend') + chalk_1.default.gray(' - Get 7 more days (free)'));
|
|
1050
|
+
console.log(chalk_1.default.cyan(' codebakers go') + chalk_1.default.gray(' - Login with API key\n'));
|
|
1051
|
+
}
|
|
1052
|
+
else {
|
|
1053
|
+
console.log(chalk_1.default.yellow(' ⚠️ No active session\n'));
|
|
1054
|
+
console.log(chalk_1.default.white(' To activate CodeBakers:'));
|
|
1055
|
+
console.log(chalk_1.default.cyan(' codebakers go\n'));
|
|
1046
1056
|
}
|
|
1047
1057
|
// Don't run setup again - just show context
|
|
1048
1058
|
return;
|
|
@@ -1053,13 +1063,22 @@ async function go(options = {}) {
|
|
|
1053
1063
|
// Auto-detect non-interactive mode (e.g., running from Claude Code)
|
|
1054
1064
|
const isNonInteractive = !process.stdin.isTTY;
|
|
1055
1065
|
if (isNonInteractive) {
|
|
1056
|
-
console.log(chalk_1.default.
|
|
1066
|
+
console.log(chalk_1.default.blue('\n ───────────────────────────────────────────────────────'));
|
|
1067
|
+
console.log(chalk_1.default.blue(' CodeBakers - Non-Interactive Setup'));
|
|
1068
|
+
console.log(chalk_1.default.blue(' ───────────────────────────────────────────────────────\n'));
|
|
1069
|
+
console.log(chalk_1.default.gray(' Running from Claude Code - installing project files...\n'));
|
|
1057
1070
|
// Just set up the project files without auth
|
|
1058
1071
|
// Auth can be done later via `codebakers go` in terminal or via MCP tools
|
|
1059
1072
|
await setupProject(options);
|
|
1060
|
-
console.log(chalk_1.default.green('\n
|
|
1061
|
-
console.log(chalk_1.default.
|
|
1073
|
+
console.log(chalk_1.default.green('\n ✅ Project files installed successfully!\n'));
|
|
1074
|
+
console.log(chalk_1.default.white(' What was set up:'));
|
|
1075
|
+
console.log(chalk_1.default.gray(' • CLAUDE.md - AI instructions for this project'));
|
|
1076
|
+
console.log(chalk_1.default.gray(' • .codebakers.json - Project configuration'));
|
|
1077
|
+
console.log(chalk_1.default.gray(' • MCP server - Registered with Claude Code\n'));
|
|
1078
|
+
console.log(chalk_1.default.yellow(' ⚠️ To activate your trial or login:\n'));
|
|
1079
|
+
console.log(chalk_1.default.white(' Open a terminal and run:'));
|
|
1062
1080
|
console.log(chalk_1.default.cyan(' codebakers go\n'));
|
|
1081
|
+
console.log(chalk_1.default.gray(' This requires an interactive terminal for authentication.\n'));
|
|
1063
1082
|
return;
|
|
1064
1083
|
}
|
|
1065
1084
|
console.log(chalk_1.default.blue(`
|
|
@@ -1097,25 +1116,34 @@ async function go(options = {}) {
|
|
|
1097
1116
|
}
|
|
1098
1117
|
// Check if trial expired
|
|
1099
1118
|
if (existingTrial && (0, config_js_1.isTrialExpired)()) {
|
|
1100
|
-
console.log(chalk_1.default.yellow(
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1119
|
+
console.log(chalk_1.default.yellow(`
|
|
1120
|
+
╭───────────────────────────────────────────────────────────╮
|
|
1121
|
+
│ ⚠️ Your 7-day trial has expired │
|
|
1122
|
+
╰───────────────────────────────────────────────────────────╯
|
|
1123
|
+
`));
|
|
1124
|
+
console.log(chalk_1.default.white(' You can still use CodeBakers! Choose an option:\n'));
|
|
1125
|
+
console.log(chalk_1.default.cyan(' [1] Login with API key'));
|
|
1126
|
+
console.log(chalk_1.default.gray(' If you purchased a subscription at codebakers.ai\n'));
|
|
1127
|
+
console.log(chalk_1.default.cyan(' [2] Extend trial (+7 days)'));
|
|
1128
|
+
console.log(chalk_1.default.gray(' Connect your GitHub account for more time\n'));
|
|
1105
1129
|
const choice = await prompt(chalk_1.default.gray(' Enter 1 or 2: '));
|
|
1106
1130
|
if (choice === '1') {
|
|
1107
1131
|
await handleApiKeyLogin(options);
|
|
1108
1132
|
return;
|
|
1109
1133
|
}
|
|
1110
1134
|
else {
|
|
1111
|
-
console.log(chalk_1.default.
|
|
1135
|
+
console.log(chalk_1.default.white('\n To extend your trial, run:\n'));
|
|
1136
|
+
console.log(chalk_1.default.cyan(' codebakers extend\n'));
|
|
1137
|
+
console.log(chalk_1.default.gray(' This will open GitHub for authentication.\n'));
|
|
1112
1138
|
return;
|
|
1113
1139
|
}
|
|
1114
1140
|
}
|
|
1115
1141
|
// New user - ask how they want to proceed
|
|
1116
1142
|
console.log(chalk_1.default.white(' How would you like to get started?\n'));
|
|
1117
|
-
console.log(chalk_1.default.cyan(' [1] Start free 7-day trial')
|
|
1118
|
-
console.log(chalk_1.default.
|
|
1143
|
+
console.log(chalk_1.default.cyan(' [1] Start free 7-day trial'));
|
|
1144
|
+
console.log(chalk_1.default.gray(' No credit card needed - just GitHub login\n'));
|
|
1145
|
+
console.log(chalk_1.default.cyan(' [2] Login with API key'));
|
|
1146
|
+
console.log(chalk_1.default.gray(' I already have a CodeBakers account\n'));
|
|
1119
1147
|
const choice = await prompt(chalk_1.default.gray(' Enter 1 or 2: '));
|
|
1120
1148
|
if (choice === '2') {
|
|
1121
1149
|
await handleApiKeyLogin(options);
|
|
@@ -1243,52 +1271,28 @@ async function handleApiKeyLogin(options = {}) {
|
|
|
1243
1271
|
}
|
|
1244
1272
|
}
|
|
1245
1273
|
/**
|
|
1246
|
-
* Show success message
|
|
1274
|
+
* Show success message with clear next steps
|
|
1247
1275
|
*/
|
|
1248
1276
|
async function showSuccessAndRestart() {
|
|
1249
|
-
const cwd = process.cwd();
|
|
1250
1277
|
console.log(chalk_1.default.green(`
|
|
1251
1278
|
╔═══════════════════════════════════════════════════════════╗
|
|
1252
|
-
║ ✅ CodeBakers is ready! ║
|
|
1253
1279
|
║ ║
|
|
1254
|
-
║
|
|
1280
|
+
║ ✅ CodeBakers Setup Complete! ║
|
|
1281
|
+
║ ║
|
|
1255
1282
|
╚═══════════════════════════════════════════════════════════╝
|
|
1256
1283
|
`));
|
|
1257
|
-
console.log(chalk_1.default.yellow(' ⚠️
|
|
1258
|
-
console.log(chalk_1.default.
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
console.log(chalk_1.default.
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
(0, child_process_1.spawn)('cmd', ['/c', 'start', 'claude'], {
|
|
1270
|
-
cwd,
|
|
1271
|
-
detached: true,
|
|
1272
|
-
stdio: 'ignore',
|
|
1273
|
-
shell: true,
|
|
1274
|
-
}).unref();
|
|
1275
|
-
}
|
|
1276
|
-
else {
|
|
1277
|
-
(0, child_process_1.spawn)('claude', [], {
|
|
1278
|
-
cwd,
|
|
1279
|
-
detached: true,
|
|
1280
|
-
stdio: 'ignore',
|
|
1281
|
-
shell: true,
|
|
1282
|
-
}).unref();
|
|
1283
|
-
}
|
|
1284
|
-
console.log(chalk_1.default.green(' ✓ Claude Code is restarting...\n'));
|
|
1285
|
-
console.log(chalk_1.default.gray(' This terminal will close. Claude Code will open in a new window.\n'));
|
|
1286
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
1287
|
-
process.exit(0);
|
|
1288
|
-
}
|
|
1289
|
-
catch {
|
|
1290
|
-
console.log(chalk_1.default.yellow(' Could not auto-restart. Please restart Claude Code manually.\n'));
|
|
1291
|
-
}
|
|
1284
|
+
console.log(chalk_1.default.yellow(' ⚠️ ONE MORE STEP - Restart Required\n'));
|
|
1285
|
+
console.log(chalk_1.default.white(' Claude Code needs to restart to load the CodeBakers MCP server.\n'));
|
|
1286
|
+
console.log(chalk_1.default.cyan(' How to restart Claude Code:\n'));
|
|
1287
|
+
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'));
|
|
1288
|
+
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'));
|
|
1289
|
+
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'));
|
|
1290
|
+
console.log(chalk_1.default.green(' After restart, try saying:\n'));
|
|
1291
|
+
console.log(chalk_1.default.white(' "Build me a todo app with authentication"'));
|
|
1292
|
+
console.log(chalk_1.default.white(' "Add a login page to my project"'));
|
|
1293
|
+
console.log(chalk_1.default.white(' "Review my code and make it production-ready"\n'));
|
|
1294
|
+
console.log(chalk_1.default.gray(' ─────────────────────────────────────────────────────────\n'));
|
|
1295
|
+
console.log(chalk_1.default.gray(' Having issues? Run: ') + chalk_1.default.cyan('codebakers doctor') + chalk_1.default.gray(' to diagnose\n'));
|
|
1292
1296
|
}
|
|
1293
1297
|
// v6.12 Bootstrap content - minimal files that point to MCP tools
|
|
1294
1298
|
const V6_CLAUDE_MD = `# CodeBakers v6.12 - Server-Enforced Patterns
|
package/dist/index.js
CHANGED
|
@@ -34,12 +34,27 @@ const api_js_1 = require("./lib/api.js");
|
|
|
34
34
|
// ============================================
|
|
35
35
|
// Automatic Update Notification
|
|
36
36
|
// ============================================
|
|
37
|
-
const CURRENT_VERSION = '3.9.
|
|
37
|
+
const CURRENT_VERSION = '3.9.11';
|
|
38
|
+
// Simple semver comparison: returns true if v1 > v2
|
|
39
|
+
function isNewerVersion(v1, v2) {
|
|
40
|
+
const parts1 = v1.split('.').map(Number);
|
|
41
|
+
const parts2 = v2.split('.').map(Number);
|
|
42
|
+
for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
|
|
43
|
+
const p1 = parts1[i] || 0;
|
|
44
|
+
const p2 = parts2[i] || 0;
|
|
45
|
+
if (p1 > p2)
|
|
46
|
+
return true;
|
|
47
|
+
if (p1 < p2)
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
38
52
|
async function checkForUpdatesInBackground() {
|
|
39
53
|
// Check if we have a valid cached result first (fast path)
|
|
40
54
|
const cached = (0, config_js_2.getCachedUpdateInfo)();
|
|
41
55
|
if (cached) {
|
|
42
|
-
if
|
|
56
|
+
// Only show banner if cached version is actually NEWER than current
|
|
57
|
+
if (isNewerVersion(cached.latestVersion, CURRENT_VERSION)) {
|
|
43
58
|
showUpdateBanner(CURRENT_VERSION, cached.latestVersion, false);
|
|
44
59
|
}
|
|
45
60
|
return;
|
|
@@ -195,7 +210,7 @@ const program = new commander_1.Command();
|
|
|
195
210
|
program
|
|
196
211
|
.name('codebakers')
|
|
197
212
|
.description('CodeBakers CLI - Production patterns for AI-assisted development')
|
|
198
|
-
.version('3.9.
|
|
213
|
+
.version('3.9.11');
|
|
199
214
|
// Zero-friction trial entry (no signup required)
|
|
200
215
|
program
|
|
201
216
|
.command('go')
|
package/package.json
CHANGED
package/src/commands/go.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import ora from 'ora';
|
|
3
|
-
import { execSync
|
|
3
|
+
import { execSync } from 'child_process';
|
|
4
4
|
import { writeFileSync, existsSync, readFileSync, mkdirSync, readdirSync, statSync, rmSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
import { createInterface } from 'readline';
|
|
@@ -1053,7 +1053,7 @@ function log(message: string, options?: GoOptions): void {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
|
|
1055
1055
|
// Current CLI version - must match package.json
|
|
1056
|
-
const CURRENT_VERSION = '3.9.
|
|
1056
|
+
const CURRENT_VERSION = '3.9.10';
|
|
1057
1057
|
|
|
1058
1058
|
/**
|
|
1059
1059
|
* Check for updates and install them automatically
|
|
@@ -1168,12 +1168,21 @@ export async function go(options: GoOptions = {}): Promise<void> {
|
|
|
1168
1168
|
const existingTrial = getTrialState();
|
|
1169
1169
|
|
|
1170
1170
|
if (existingApiKey) {
|
|
1171
|
-
console.log(chalk.green(' ✓ Authenticated
|
|
1171
|
+
console.log(chalk.green(' ✓ Authenticated with API key\n'));
|
|
1172
|
+
console.log(chalk.gray(' You\'re all set! Ask Claude to help you build something.\n'));
|
|
1172
1173
|
} else if (existingTrial && !isTrialExpired()) {
|
|
1173
1174
|
const daysRemaining = getTrialDaysRemaining();
|
|
1174
|
-
console.log(chalk.green(` ✓ Trial active
|
|
1175
|
+
console.log(chalk.green(` ✓ Trial active - ${daysRemaining} day${daysRemaining === 1 ? '' : 's'} remaining\n`));
|
|
1176
|
+
console.log(chalk.gray(' You\'re all set! Ask Claude to help you build something.\n'));
|
|
1175
1177
|
} else if (existingTrial && isTrialExpired()) {
|
|
1176
|
-
console.log(chalk.yellow(' ⚠️ Trial expired
|
|
1178
|
+
console.log(chalk.yellow(' ⚠️ Trial expired\n'));
|
|
1179
|
+
console.log(chalk.white(' To continue using CodeBakers:'));
|
|
1180
|
+
console.log(chalk.cyan(' codebakers extend') + chalk.gray(' - Get 7 more days (free)'));
|
|
1181
|
+
console.log(chalk.cyan(' codebakers go') + chalk.gray(' - Login with API key\n'));
|
|
1182
|
+
} else {
|
|
1183
|
+
console.log(chalk.yellow(' ⚠️ No active session\n'));
|
|
1184
|
+
console.log(chalk.white(' To activate CodeBakers:'));
|
|
1185
|
+
console.log(chalk.cyan(' codebakers go\n'));
|
|
1177
1186
|
}
|
|
1178
1187
|
|
|
1179
1188
|
// Don't run setup again - just show context
|
|
@@ -1187,15 +1196,26 @@ export async function go(options: GoOptions = {}): Promise<void> {
|
|
|
1187
1196
|
// Auto-detect non-interactive mode (e.g., running from Claude Code)
|
|
1188
1197
|
const isNonInteractive = !process.stdin.isTTY;
|
|
1189
1198
|
if (isNonInteractive) {
|
|
1190
|
-
console.log(chalk.
|
|
1199
|
+
console.log(chalk.blue('\n ───────────────────────────────────────────────────────'));
|
|
1200
|
+
console.log(chalk.blue(' CodeBakers - Non-Interactive Setup'));
|
|
1201
|
+
console.log(chalk.blue(' ───────────────────────────────────────────────────────\n'));
|
|
1202
|
+
|
|
1203
|
+
console.log(chalk.gray(' Running from Claude Code - installing project files...\n'));
|
|
1191
1204
|
|
|
1192
1205
|
// Just set up the project files without auth
|
|
1193
1206
|
// Auth can be done later via `codebakers go` in terminal or via MCP tools
|
|
1194
1207
|
await setupProject(options);
|
|
1195
1208
|
|
|
1196
|
-
console.log(chalk.green('\n
|
|
1197
|
-
console.log(chalk.
|
|
1209
|
+
console.log(chalk.green('\n ✅ Project files installed successfully!\n'));
|
|
1210
|
+
console.log(chalk.white(' What was set up:'));
|
|
1211
|
+
console.log(chalk.gray(' • CLAUDE.md - AI instructions for this project'));
|
|
1212
|
+
console.log(chalk.gray(' • .codebakers.json - Project configuration'));
|
|
1213
|
+
console.log(chalk.gray(' • MCP server - Registered with Claude Code\n'));
|
|
1214
|
+
|
|
1215
|
+
console.log(chalk.yellow(' ⚠️ To activate your trial or login:\n'));
|
|
1216
|
+
console.log(chalk.white(' Open a terminal and run:'));
|
|
1198
1217
|
console.log(chalk.cyan(' codebakers go\n'));
|
|
1218
|
+
console.log(chalk.gray(' This requires an interactive terminal for authentication.\n'));
|
|
1199
1219
|
return;
|
|
1200
1220
|
}
|
|
1201
1221
|
|
|
@@ -1241,12 +1261,17 @@ export async function go(options: GoOptions = {}): Promise<void> {
|
|
|
1241
1261
|
|
|
1242
1262
|
// Check if trial expired
|
|
1243
1263
|
if (existingTrial && isTrialExpired()) {
|
|
1244
|
-
console.log(chalk.yellow(
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1264
|
+
console.log(chalk.yellow(`
|
|
1265
|
+
╭───────────────────────────────────────────────────────────╮
|
|
1266
|
+
│ ⚠️ Your 7-day trial has expired │
|
|
1267
|
+
╰───────────────────────────────────────────────────────────╯
|
|
1268
|
+
`));
|
|
1269
|
+
|
|
1270
|
+
console.log(chalk.white(' You can still use CodeBakers! Choose an option:\n'));
|
|
1271
|
+
console.log(chalk.cyan(' [1] Login with API key'));
|
|
1272
|
+
console.log(chalk.gray(' If you purchased a subscription at codebakers.ai\n'));
|
|
1273
|
+
console.log(chalk.cyan(' [2] Extend trial (+7 days)'));
|
|
1274
|
+
console.log(chalk.gray(' Connect your GitHub account for more time\n'));
|
|
1250
1275
|
|
|
1251
1276
|
const choice = await prompt(chalk.gray(' Enter 1 or 2: '));
|
|
1252
1277
|
|
|
@@ -1254,15 +1279,19 @@ export async function go(options: GoOptions = {}): Promise<void> {
|
|
|
1254
1279
|
await handleApiKeyLogin(options);
|
|
1255
1280
|
return;
|
|
1256
1281
|
} else {
|
|
1257
|
-
console.log(chalk.
|
|
1282
|
+
console.log(chalk.white('\n To extend your trial, run:\n'));
|
|
1283
|
+
console.log(chalk.cyan(' codebakers extend\n'));
|
|
1284
|
+
console.log(chalk.gray(' This will open GitHub for authentication.\n'));
|
|
1258
1285
|
return;
|
|
1259
1286
|
}
|
|
1260
1287
|
}
|
|
1261
1288
|
|
|
1262
1289
|
// New user - ask how they want to proceed
|
|
1263
1290
|
console.log(chalk.white(' How would you like to get started?\n'));
|
|
1264
|
-
console.log(chalk.cyan(' [1] Start free 7-day trial')
|
|
1265
|
-
console.log(chalk.
|
|
1291
|
+
console.log(chalk.cyan(' [1] Start free 7-day trial'));
|
|
1292
|
+
console.log(chalk.gray(' No credit card needed - just GitHub login\n'));
|
|
1293
|
+
console.log(chalk.cyan(' [2] Login with API key'));
|
|
1294
|
+
console.log(chalk.gray(' I already have a CodeBakers account\n'));
|
|
1266
1295
|
|
|
1267
1296
|
const choice = await prompt(chalk.gray(' Enter 1 or 2: '));
|
|
1268
1297
|
|
|
@@ -1413,60 +1442,33 @@ async function handleApiKeyLogin(options: GoOptions = {}): Promise<void> {
|
|
|
1413
1442
|
}
|
|
1414
1443
|
|
|
1415
1444
|
/**
|
|
1416
|
-
* Show success message
|
|
1445
|
+
* Show success message with clear next steps
|
|
1417
1446
|
*/
|
|
1418
1447
|
async function showSuccessAndRestart(): Promise<void> {
|
|
1419
|
-
const cwd = process.cwd();
|
|
1420
|
-
|
|
1421
1448
|
console.log(chalk.green(`
|
|
1422
1449
|
╔═══════════════════════════════════════════════════════════╗
|
|
1423
|
-
║ ✅ CodeBakers is ready! ║
|
|
1424
1450
|
║ ║
|
|
1425
|
-
║
|
|
1451
|
+
║ ✅ CodeBakers Setup Complete! ║
|
|
1452
|
+
║ ║
|
|
1426
1453
|
╚═══════════════════════════════════════════════════════════╝
|
|
1427
1454
|
`));
|
|
1428
1455
|
|
|
1429
|
-
console.log(chalk.yellow(' ⚠️
|
|
1430
|
-
console.log(chalk.gray(' Claude Code needs to restart to load CodeBakers.\n'));
|
|
1456
|
+
console.log(chalk.yellow(' ⚠️ ONE MORE STEP - Restart Required\n'));
|
|
1431
1457
|
|
|
1432
|
-
|
|
1458
|
+
console.log(chalk.white(' Claude Code needs to restart to load the CodeBakers MCP server.\n'));
|
|
1433
1459
|
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1460
|
+
console.log(chalk.cyan(' How to restart Claude Code:\n'));
|
|
1461
|
+
console.log(chalk.gray(' Option 1: ') + chalk.white('Close this window and run ') + chalk.cyan('claude') + chalk.white(' again'));
|
|
1462
|
+
console.log(chalk.gray(' Option 2: ') + chalk.white('Press ') + chalk.cyan('Ctrl+C') + chalk.white(' and run ') + chalk.cyan('claude') + chalk.white(' again'));
|
|
1463
|
+
console.log(chalk.gray(' Option 3: ') + chalk.white('In VS Code: ') + chalk.cyan('Cmd/Ctrl+Shift+P') + chalk.white(' → "Claude Code: Restart"\n'));
|
|
1438
1464
|
|
|
1439
|
-
|
|
1440
|
-
console.log(chalk.
|
|
1465
|
+
console.log(chalk.green(' After restart, try saying:\n'));
|
|
1466
|
+
console.log(chalk.white(' "Build me a todo app with authentication"'));
|
|
1467
|
+
console.log(chalk.white(' "Add a login page to my project"'));
|
|
1468
|
+
console.log(chalk.white(' "Review my code and make it production-ready"\n'));
|
|
1441
1469
|
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
if (isWindows) {
|
|
1446
|
-
spawn('cmd', ['/c', 'start', 'claude'], {
|
|
1447
|
-
cwd,
|
|
1448
|
-
detached: true,
|
|
1449
|
-
stdio: 'ignore',
|
|
1450
|
-
shell: true,
|
|
1451
|
-
}).unref();
|
|
1452
|
-
} else {
|
|
1453
|
-
spawn('claude', [], {
|
|
1454
|
-
cwd,
|
|
1455
|
-
detached: true,
|
|
1456
|
-
stdio: 'ignore',
|
|
1457
|
-
shell: true,
|
|
1458
|
-
}).unref();
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
console.log(chalk.green(' ✓ Claude Code is restarting...\n'));
|
|
1462
|
-
console.log(chalk.gray(' This terminal will close. Claude Code will open in a new window.\n'));
|
|
1463
|
-
|
|
1464
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
1465
|
-
process.exit(0);
|
|
1466
|
-
|
|
1467
|
-
} catch {
|
|
1468
|
-
console.log(chalk.yellow(' Could not auto-restart. Please restart Claude Code manually.\n'));
|
|
1469
|
-
}
|
|
1470
|
+
console.log(chalk.gray(' ─────────────────────────────────────────────────────────\n'));
|
|
1471
|
+
console.log(chalk.gray(' Having issues? Run: ') + chalk.cyan('codebakers doctor') + chalk.gray(' to diagnose\n'));
|
|
1470
1472
|
}
|
|
1471
1473
|
|
|
1472
1474
|
// v6.12 Bootstrap content - minimal files that point to MCP tools
|
package/src/index.ts
CHANGED
|
@@ -34,13 +34,27 @@ import { join } from 'path';
|
|
|
34
34
|
// Automatic Update Notification
|
|
35
35
|
// ============================================
|
|
36
36
|
|
|
37
|
-
const CURRENT_VERSION = '3.9.
|
|
37
|
+
const CURRENT_VERSION = '3.9.11';
|
|
38
|
+
|
|
39
|
+
// Simple semver comparison: returns true if v1 > v2
|
|
40
|
+
function isNewerVersion(v1: string, v2: string): boolean {
|
|
41
|
+
const parts1 = v1.split('.').map(Number);
|
|
42
|
+
const parts2 = v2.split('.').map(Number);
|
|
43
|
+
for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
|
|
44
|
+
const p1 = parts1[i] || 0;
|
|
45
|
+
const p2 = parts2[i] || 0;
|
|
46
|
+
if (p1 > p2) return true;
|
|
47
|
+
if (p1 < p2) return false;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
38
51
|
|
|
39
52
|
async function checkForUpdatesInBackground(): Promise<void> {
|
|
40
53
|
// Check if we have a valid cached result first (fast path)
|
|
41
54
|
const cached = getCachedUpdateInfo();
|
|
42
55
|
if (cached) {
|
|
43
|
-
if
|
|
56
|
+
// Only show banner if cached version is actually NEWER than current
|
|
57
|
+
if (isNewerVersion(cached.latestVersion, CURRENT_VERSION)) {
|
|
44
58
|
showUpdateBanner(CURRENT_VERSION, cached.latestVersion, false);
|
|
45
59
|
}
|
|
46
60
|
return;
|
|
@@ -216,7 +230,7 @@ const program = new Command();
|
|
|
216
230
|
program
|
|
217
231
|
.name('codebakers')
|
|
218
232
|
.description('CodeBakers CLI - Production patterns for AI-assisted development')
|
|
219
|
-
.version('3.9.
|
|
233
|
+
.version('3.9.11');
|
|
220
234
|
|
|
221
235
|
// Zero-friction trial entry (no signup required)
|
|
222
236
|
program
|