@codebakers/cli 1.4.5 → 1.4.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.
@@ -100,9 +100,11 @@ async function installHook() {
100
100
  console.log(chalk_1.default.gray(' ✓ Pre-flight checks before writing code'));
101
101
  console.log(chalk_1.default.gray(' ✓ Self-review reminders after code changes'));
102
102
  console.log(chalk_1.default.gray(' ✓ Pattern-based development from .claude/ folder\n'));
103
- console.log(chalk_1.default.yellow(' ⚠️ Next step: Restart required\n'));
104
- console.log(chalk_1.default.white(' Close this terminal and open a new one in your project folder.\n'));
105
- console.log(chalk_1.default.gray(' Then just start chatting - CodeBakers is now active!\n'));
103
+ console.log(chalk_1.default.yellow.bold(' ⚠️ RESTART REQUIRED:\n'));
104
+ console.log(chalk_1.default.gray(' 1. Type ') + chalk_1.default.cyan('exit') + chalk_1.default.gray(' to close this terminal'));
105
+ console.log(chalk_1.default.gray(' 2. Open a NEW terminal window'));
106
+ console.log(chalk_1.default.gray(' 3. Navigate to your project and run ') + chalk_1.default.cyan('claude\n'));
107
+ console.log(chalk_1.default.white(' To verify it\'s working, ask: ') + chalk_1.default.green('"Are you using CodeBakers?"\n'));
106
108
  }
107
109
  catch (error) {
108
110
  spinner.fail('Hook installation failed');
@@ -141,8 +143,8 @@ async function uninstallHook() {
141
143
  }
142
144
  (0, fs_1.writeFileSync)(settingsPath, JSON.stringify(settings, null, 2));
143
145
  spinner.succeed('Hook removed successfully!');
144
- console.log(chalk_1.default.yellow('\n ⚠️ Next step: Restart required\n'));
145
- console.log(chalk_1.default.white(' Close this terminal and open a new one in your project folder.\n'));
146
+ console.log(chalk_1.default.yellow('\n ⚠️ RESTART REQUIRED:\n'));
147
+ console.log(chalk_1.default.gray(' Type ') + chalk_1.default.cyan('exit') + chalk_1.default.gray(' and open a new terminal to apply changes.\n'));
146
148
  }
147
149
  catch (error) {
148
150
  spinner.fail('Hook removal failed');
@@ -132,9 +132,11 @@ function installGlobalConfig() {
132
132
  console.log(chalk_1.default.green(' MCP configuration installed!\n'));
133
133
  console.log(chalk_1.default.gray(' Config written to:'));
134
134
  console.log(chalk_1.default.cyan(` ${configPath}\n`));
135
- console.log(chalk_1.default.yellow(' ⚠️ Next step: Restart required\n'));
136
- console.log(chalk_1.default.white(' Close this terminal and open a new one in your project folder.\n'));
137
- console.log(chalk_1.default.gray(' Then the MCP server will be active!\n'));
135
+ console.log(chalk_1.default.yellow.bold(' ⚠️ RESTART REQUIRED:\n'));
136
+ console.log(chalk_1.default.gray(' 1. Type ') + chalk_1.default.cyan('exit') + chalk_1.default.gray(' to close this terminal'));
137
+ console.log(chalk_1.default.gray(' 2. Open a NEW terminal window'));
138
+ console.log(chalk_1.default.gray(' 3. Navigate to your project and run ') + chalk_1.default.cyan('claude\n'));
139
+ console.log(chalk_1.default.white(' To verify it\'s working, ask: ') + chalk_1.default.green('"Are you using CodeBakers?"\n'));
138
140
  }
139
141
  catch (error) {
140
142
  const message = error instanceof Error ? error.message : 'Unknown error';
@@ -194,8 +196,8 @@ async function mcpUninstall() {
194
196
  delete config.mcpServers.codebakers;
195
197
  (0, fs_1.writeFileSync)(configPath, JSON.stringify(config, null, 2));
196
198
  console.log(chalk_1.default.green(' Removed from global config.\n'));
197
- console.log(chalk_1.default.yellow(' ⚠️ Next step: Restart required\n'));
198
- console.log(chalk_1.default.white(' Close this terminal and open a new one in your project folder.\n'));
199
+ console.log(chalk_1.default.yellow(' ⚠️ RESTART REQUIRED:\n'));
200
+ console.log(chalk_1.default.gray(' Type ') + chalk_1.default.cyan('exit') + chalk_1.default.gray(' and open a new terminal to apply changes.\n'));
199
201
  }
200
202
  else {
201
203
  console.log(chalk_1.default.gray(' CodeBakers not found in global config.\n'));
@@ -103,11 +103,19 @@ function showFinalInstructions() {
103
103
  console.log(chalk_1.default.blue(' ══════════════════════════════════════════════════════════'));
104
104
  console.log(chalk_1.default.white.bold('\n 🎉 Setup Complete!\n'));
105
105
  console.log(chalk_1.default.blue(' ══════════════════════════════════════════════════════════\n'));
106
- console.log(chalk_1.default.white.bold(' 👉 NEXT: Close this terminal and open your AI:\n'));
107
- console.log(chalk_1.default.cyan(' Claude Code') + chalk_1.default.gray(' - Open any project folder'));
108
- console.log(chalk_1.default.cyan(' Cursor') + chalk_1.default.gray(' - Open Composer (Cmd+I / Ctrl+I)\n'));
109
- console.log(chalk_1.default.white(' Then just describe what you want to build:\n'));
110
- console.log(chalk_1.default.green(' "Build me a todo app with user authentication"\n'));
111
- console.log(chalk_1.default.gray(' The AI will use CodeBakers patterns automatically.'));
106
+ console.log(chalk_1.default.yellow.bold(' ⚠️ RESTART REQUIRED - Follow these steps:\n'));
107
+ console.log(chalk_1.default.white(' For Claude Code:\n'));
108
+ console.log(chalk_1.default.gray(' 1. Close this terminal completely (type ') + chalk_1.default.cyan('exit') + chalk_1.default.gray(')'));
109
+ console.log(chalk_1.default.gray(' 2. Open a NEW terminal window'));
110
+ console.log(chalk_1.default.gray(' 3. Navigate to your project folder'));
111
+ console.log(chalk_1.default.gray(' 4. Run ') + chalk_1.default.cyan('claude') + chalk_1.default.gray(' to start Claude Code\n'));
112
+ console.log(chalk_1.default.white(' For Cursor:\n'));
113
+ console.log(chalk_1.default.gray(' 1. Close Cursor completely (Cmd+Q / Alt+F4)'));
114
+ console.log(chalk_1.default.gray(' 2. Reopen Cursor'));
115
+ console.log(chalk_1.default.gray(' 3. Open Composer (Cmd+I / Ctrl+I)\n'));
116
+ console.log(chalk_1.default.blue(' ──────────────────────────────────────────────────────────\n'));
117
+ console.log(chalk_1.default.white(' ✅ To verify CodeBakers is working, ask the AI:\n'));
118
+ console.log(chalk_1.default.green(' "Are you using CodeBakers?"\n'));
119
+ console.log(chalk_1.default.gray(' The AI should respond with its CodeBakers status.'));
112
120
  console.log(chalk_1.default.gray(' Need help? https://codebakers.ai/docs\n'));
113
121
  }
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ const program = new commander_1.Command();
53
53
  program
54
54
  .name('codebakers')
55
55
  .description('CodeBakers CLI - Production patterns for AI-assisted development')
56
- .version('1.4.5');
56
+ .version('1.4.6');
57
57
  // Primary command - one-time setup
58
58
  program
59
59
  .command('setup')
@@ -413,6 +413,14 @@ class CodeBakersServer {
413
413
  properties: {},
414
414
  },
415
415
  },
416
+ {
417
+ name: 'get_status',
418
+ description: 'Check if CodeBakers is active and get current status. Use this when user asks "are you using CodeBakers?" or wants to verify the integration is working. Returns version, connection status, and available features.',
419
+ inputSchema: {
420
+ type: 'object',
421
+ properties: {},
422
+ },
423
+ },
416
424
  ],
417
425
  }));
418
426
  // Handle tool calls
@@ -442,6 +450,8 @@ class CodeBakersServer {
442
450
  return this.handleSetExperienceLevel(args);
443
451
  case 'get_experience_level':
444
452
  return this.handleGetExperienceLevel();
453
+ case 'get_status':
454
+ return this.handleGetStatus();
445
455
  default:
446
456
  throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
447
457
  }
@@ -1113,6 +1123,44 @@ phase: development
1113
1123
  }],
1114
1124
  };
1115
1125
  }
1126
+ handleGetStatus() {
1127
+ const level = (0, config_js_1.getExperienceLevel)();
1128
+ const context = this.gatherProjectContext();
1129
+ const statusText = `# ✅ CodeBakers is Active!
1130
+
1131
+ ## Connection Status
1132
+ - **MCP Server:** Running
1133
+ - **API Connected:** Yes
1134
+ - **Version:** 1.4.6
1135
+
1136
+ ## Current Settings
1137
+ - **Experience Level:** ${level.charAt(0).toUpperCase() + level.slice(1)}
1138
+ - **Project:** ${context.projectName}
1139
+
1140
+ ## Available Features
1141
+ - 🔧 **optimize_and_build** - AI-powered prompt optimization
1142
+ - 📦 **get_pattern** - Fetch production patterns
1143
+ - 🔍 **search_patterns** - Search for specific guidance
1144
+ - 🏗️ **scaffold_project** - Create new projects
1145
+ - ⚙️ **init_project** - Add patterns to existing projects
1146
+
1147
+ ## How to Use
1148
+ Just describe what you want to build! I'll automatically:
1149
+ 1. Analyze your request
1150
+ 2. Find the right patterns
1151
+ 3. Apply production best practices
1152
+
1153
+ **Example:** "Build a login page with email/password"
1154
+
1155
+ ---
1156
+ *CodeBakers is providing AI-assisted development patterns for this project.*`;
1157
+ return {
1158
+ content: [{
1159
+ type: 'text',
1160
+ text: statusText,
1161
+ }],
1162
+ };
1163
+ }
1116
1164
  async run() {
1117
1165
  const transport = new stdio_js_1.StdioServerTransport();
1118
1166
  await this.server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebakers/cli",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "CodeBakers CLI - Production patterns for AI-assisted development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -106,9 +106,11 @@ export async function installHook(): Promise<void> {
106
106
  console.log(chalk.gray(' ✓ Self-review reminders after code changes'));
107
107
  console.log(chalk.gray(' ✓ Pattern-based development from .claude/ folder\n'));
108
108
 
109
- console.log(chalk.yellow(' ⚠️ Next step: Restart required\n'));
110
- console.log(chalk.white(' Close this terminal and open a new one in your project folder.\n'));
111
- console.log(chalk.gray(' Then just start chatting - CodeBakers is now active!\n'));
109
+ console.log(chalk.yellow.bold(' ⚠️ RESTART REQUIRED:\n'));
110
+ console.log(chalk.gray(' 1. Type ') + chalk.cyan('exit') + chalk.gray(' to close this terminal'));
111
+ console.log(chalk.gray(' 2. Open a NEW terminal window'));
112
+ console.log(chalk.gray(' 3. Navigate to your project and run ') + chalk.cyan('claude\n'));
113
+ console.log(chalk.white(' To verify it\'s working, ask: ') + chalk.green('"Are you using CodeBakers?"\n'));
112
114
  } catch (error) {
113
115
  spinner.fail('Hook installation failed');
114
116
  const message = error instanceof Error ? error.message : 'Unknown error';
@@ -156,8 +158,8 @@ export async function uninstallHook(): Promise<void> {
156
158
  writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
157
159
 
158
160
  spinner.succeed('Hook removed successfully!');
159
- console.log(chalk.yellow('\n ⚠️ Next step: Restart required\n'));
160
- console.log(chalk.white(' Close this terminal and open a new one in your project folder.\n'));
161
+ console.log(chalk.yellow('\n ⚠️ RESTART REQUIRED:\n'));
162
+ console.log(chalk.gray(' Type ') + chalk.cyan('exit') + chalk.gray(' and open a new terminal to apply changes.\n'));
161
163
  } catch (error) {
162
164
  spinner.fail('Hook removal failed');
163
165
  const message = error instanceof Error ? error.message : 'Unknown error';
@@ -158,9 +158,11 @@ function installGlobalConfig(): void {
158
158
  console.log(chalk.green(' MCP configuration installed!\n'));
159
159
  console.log(chalk.gray(' Config written to:'));
160
160
  console.log(chalk.cyan(` ${configPath}\n`));
161
- console.log(chalk.yellow(' ⚠️ Next step: Restart required\n'));
162
- console.log(chalk.white(' Close this terminal and open a new one in your project folder.\n'));
163
- console.log(chalk.gray(' Then the MCP server will be active!\n'));
161
+ console.log(chalk.yellow.bold(' ⚠️ RESTART REQUIRED:\n'));
162
+ console.log(chalk.gray(' 1. Type ') + chalk.cyan('exit') + chalk.gray(' to close this terminal'));
163
+ console.log(chalk.gray(' 2. Open a NEW terminal window'));
164
+ console.log(chalk.gray(' 3. Navigate to your project and run ') + chalk.cyan('claude\n'));
165
+ console.log(chalk.white(' To verify it\'s working, ask: ') + chalk.green('"Are you using CodeBakers?"\n'));
164
166
  } catch (error) {
165
167
  const message = error instanceof Error ? error.message : 'Unknown error';
166
168
  console.log(chalk.red(`\n Error: ${message}\n`));
@@ -222,8 +224,8 @@ export async function mcpUninstall(): Promise<void> {
222
224
  delete config.mcpServers.codebakers;
223
225
  writeFileSync(configPath, JSON.stringify(config, null, 2));
224
226
  console.log(chalk.green(' Removed from global config.\n'));
225
- console.log(chalk.yellow(' ⚠️ Next step: Restart required\n'));
226
- console.log(chalk.white(' Close this terminal and open a new one in your project folder.\n'));
227
+ console.log(chalk.yellow(' ⚠️ RESTART REQUIRED:\n'));
228
+ console.log(chalk.gray(' Type ') + chalk.cyan('exit') + chalk.gray(' and open a new terminal to apply changes.\n'));
227
229
  } else {
228
230
  console.log(chalk.gray(' CodeBakers not found in global config.\n'));
229
231
  console.log(chalk.gray(' To remove from Claude Code, run:\n'));
@@ -113,13 +113,24 @@ function showFinalInstructions(): void {
113
113
  console.log(chalk.white.bold('\n 🎉 Setup Complete!\n'));
114
114
  console.log(chalk.blue(' ══════════════════════════════════════════════════════════\n'));
115
115
 
116
- console.log(chalk.white.bold(' 👉 NEXT: Close this terminal and open your AI:\n'));
117
- console.log(chalk.cyan(' • Claude Code') + chalk.gray(' - Open any project folder'));
118
- console.log(chalk.cyan(' • Cursor') + chalk.gray(' - Open Composer (Cmd+I / Ctrl+I)\n'));
116
+ console.log(chalk.yellow.bold(' ⚠️ RESTART REQUIRED - Follow these steps:\n'));
119
117
 
120
- console.log(chalk.white(' Then just describe what you want to build:\n'));
121
- console.log(chalk.green(' "Build me a todo app with user authentication"\n'));
118
+ console.log(chalk.white(' For Claude Code:\n'));
119
+ console.log(chalk.gray(' 1. Close this terminal completely (type ') + chalk.cyan('exit') + chalk.gray(')'));
120
+ console.log(chalk.gray(' 2. Open a NEW terminal window'));
121
+ console.log(chalk.gray(' 3. Navigate to your project folder'));
122
+ console.log(chalk.gray(' 4. Run ') + chalk.cyan('claude') + chalk.gray(' to start Claude Code\n'));
122
123
 
123
- console.log(chalk.gray(' The AI will use CodeBakers patterns automatically.'));
124
+ console.log(chalk.white(' For Cursor:\n'));
125
+ console.log(chalk.gray(' 1. Close Cursor completely (Cmd+Q / Alt+F4)'));
126
+ console.log(chalk.gray(' 2. Reopen Cursor'));
127
+ console.log(chalk.gray(' 3. Open Composer (Cmd+I / Ctrl+I)\n'));
128
+
129
+ console.log(chalk.blue(' ──────────────────────────────────────────────────────────\n'));
130
+
131
+ console.log(chalk.white(' ✅ To verify CodeBakers is working, ask the AI:\n'));
132
+ console.log(chalk.green(' "Are you using CodeBakers?"\n'));
133
+
134
+ console.log(chalk.gray(' The AI should respond with its CodeBakers status.'));
124
135
  console.log(chalk.gray(' Need help? https://codebakers.ai/docs\n'));
125
136
  }
package/src/index.ts CHANGED
@@ -57,7 +57,7 @@ const program = new Command();
57
57
  program
58
58
  .name('codebakers')
59
59
  .description('CodeBakers CLI - Production patterns for AI-assisted development')
60
- .version('1.4.5');
60
+ .version('1.4.6');
61
61
 
62
62
  // Primary command - one-time setup
63
63
  program
package/src/mcp/server.ts CHANGED
@@ -437,6 +437,15 @@ class CodeBakersServer {
437
437
  properties: {},
438
438
  },
439
439
  },
440
+ {
441
+ name: 'get_status',
442
+ description:
443
+ 'Check if CodeBakers is active and get current status. Use this when user asks "are you using CodeBakers?" or wants to verify the integration is working. Returns version, connection status, and available features.',
444
+ inputSchema: {
445
+ type: 'object' as const,
446
+ properties: {},
447
+ },
448
+ },
440
449
  ],
441
450
  }));
442
451
 
@@ -482,6 +491,9 @@ class CodeBakersServer {
482
491
  case 'get_experience_level':
483
492
  return this.handleGetExperienceLevel();
484
493
 
494
+ case 'get_status':
495
+ return this.handleGetStatus();
496
+
485
497
  default:
486
498
  throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
487
499
  }
@@ -1264,6 +1276,47 @@ phase: development
1264
1276
  };
1265
1277
  }
1266
1278
 
1279
+ private handleGetStatus() {
1280
+ const level = getExperienceLevel();
1281
+ const context = this.gatherProjectContext();
1282
+
1283
+ const statusText = `# ✅ CodeBakers is Active!
1284
+
1285
+ ## Connection Status
1286
+ - **MCP Server:** Running
1287
+ - **API Connected:** Yes
1288
+ - **Version:** 1.4.6
1289
+
1290
+ ## Current Settings
1291
+ - **Experience Level:** ${level.charAt(0).toUpperCase() + level.slice(1)}
1292
+ - **Project:** ${context.projectName}
1293
+
1294
+ ## Available Features
1295
+ - 🔧 **optimize_and_build** - AI-powered prompt optimization
1296
+ - 📦 **get_pattern** - Fetch production patterns
1297
+ - 🔍 **search_patterns** - Search for specific guidance
1298
+ - 🏗️ **scaffold_project** - Create new projects
1299
+ - ⚙️ **init_project** - Add patterns to existing projects
1300
+
1301
+ ## How to Use
1302
+ Just describe what you want to build! I'll automatically:
1303
+ 1. Analyze your request
1304
+ 2. Find the right patterns
1305
+ 3. Apply production best practices
1306
+
1307
+ **Example:** "Build a login page with email/password"
1308
+
1309
+ ---
1310
+ *CodeBakers is providing AI-assisted development patterns for this project.*`;
1311
+
1312
+ return {
1313
+ content: [{
1314
+ type: 'text' as const,
1315
+ text: statusText,
1316
+ }],
1317
+ };
1318
+ }
1319
+
1267
1320
  async run(): Promise<void> {
1268
1321
  const transport = new StdioServerTransport();
1269
1322
  await this.server.connect(transport);