codebakers 2.3.8 → 2.5.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/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  prdCommand
4
- } from "./chunk-ND6T4UDY.js";
4
+ } from "./chunk-WZQNFV7Q.js";
5
5
  import {
6
6
  advisorsCommand
7
- } from "./chunk-YUSDTJD6.js";
7
+ } from "./chunk-URNRSXPU.js";
8
8
  import {
9
9
  Config
10
10
  } from "./chunk-ASIJIQYC.js";
@@ -12,7 +12,7 @@ import {
12
12
  // src/index.ts
13
13
  import { Command } from "commander";
14
14
  import * as p21 from "@clack/prompts";
15
- import chalk20 from "chalk";
15
+ import chalk21 from "chalk";
16
16
  import boxen2 from "boxen";
17
17
  import gradient from "gradient-string";
18
18
  import * as path16 from "path";
@@ -1120,51 +1120,92 @@ Domain: ${domain || "Vercel default"}`,
1120
1120
  await createLocalProject(projectPath, projectConfig);
1121
1121
  spinner16.stop("Local project created");
1122
1122
  spinner16.start("Installing dependencies...");
1123
+ let installSuccess = false;
1123
1124
  try {
1124
- await execa3("npm", ["install"], { cwd: projectPath });
1125
+ await execa3("npm", ["install"], { cwd: projectPath, stdio: "inherit" });
1126
+ installSuccess = true;
1125
1127
  } catch {
1126
1128
  try {
1127
- await execa3("pnpm", ["install"], { cwd: projectPath });
1129
+ await execa3("pnpm", ["install"], { cwd: projectPath, stdio: "inherit" });
1130
+ installSuccess = true;
1128
1131
  } catch {
1129
- await execa3("yarn", ["install"], { cwd: projectPath });
1132
+ try {
1133
+ await execa3("yarn", ["install"], { cwd: projectPath, stdio: "inherit" });
1134
+ installSuccess = true;
1135
+ } catch {
1136
+ }
1130
1137
  }
1131
1138
  }
1132
- spinner16.stop("Dependencies installed");
1139
+ if (installSuccess) {
1140
+ spinner16.stop("Dependencies installed");
1141
+ } else {
1142
+ spinner16.stop("Dependencies installation failed");
1143
+ console.log(chalk2.yellow(' \u26A0\uFE0F Run "npm install" manually in the project folder'));
1144
+ }
1133
1145
  if (services.includes("github")) {
1134
1146
  spinner16.start("Creating GitHub repository...");
1135
- const github = new GitHubService(config);
1136
- const repo = await github.createRepo(projectName, { private: true });
1137
- spinner16.stop(`GitHub repo created: ${repo.html_url}`);
1138
- await execa3("git", ["init"], { cwd: projectPath });
1139
- await execa3("git", ["add", "."], { cwd: projectPath });
1140
- await execa3("git", ["commit", "-m", "Initial commit by CodeBakers"], { cwd: projectPath });
1141
- await execa3("git", ["remote", "add", "origin", repo.clone_url], { cwd: projectPath });
1142
- await execa3("git", ["push", "-u", "origin", "main"], { cwd: projectPath });
1147
+ try {
1148
+ const github = new GitHubService(config);
1149
+ const repo = await github.createRepo(projectName, { private: true });
1150
+ spinner16.stop(`GitHub repo created: ${repo.html_url}`);
1151
+ try {
1152
+ await execa3("git", ["init"], { cwd: projectPath });
1153
+ await execa3("git", ["add", "."], { cwd: projectPath });
1154
+ await execa3("git", ["commit", "-m", "Initial commit by CodeBakers"], { cwd: projectPath });
1155
+ await execa3("git", ["remote", "add", "origin", repo.clone_url], { cwd: projectPath });
1156
+ await execa3("git", ["push", "-u", "origin", "main"], { cwd: projectPath });
1157
+ } catch (gitError) {
1158
+ console.log(chalk2.yellow(" \u26A0\uFE0F Git push failed. You can push manually later."));
1159
+ }
1160
+ } catch (error) {
1161
+ spinner16.stop("GitHub setup failed");
1162
+ console.log(chalk2.yellow(" \u26A0\uFE0F Could not create GitHub repo. Check your GitHub token."));
1163
+ }
1143
1164
  }
1144
1165
  if (services.includes("supabase")) {
1145
1166
  spinner16.start("Creating Supabase project...");
1146
- const supabase = new SupabaseService(config);
1147
- const project = await supabase.createProject(projectName);
1148
- spinner16.stop(`Supabase project created: ${project.name}`);
1149
- await fs.writeJson(
1150
- path.join(projectPath, ".codebakers", "supabase.json"),
1151
- { projectId: project.id, projectUrl: project.api_url },
1152
- { spaces: 2 }
1153
- );
1167
+ try {
1168
+ const supabase = new SupabaseService(config);
1169
+ const project = await supabase.createProject(projectName);
1170
+ spinner16.stop(`Supabase project created: ${project.name}`);
1171
+ await fs.writeJson(
1172
+ path.join(projectPath, ".codebakers", "supabase.json"),
1173
+ { projectId: project.id, projectUrl: project.api_url },
1174
+ { spaces: 2 }
1175
+ );
1176
+ } catch (error) {
1177
+ spinner16.stop("Supabase setup failed");
1178
+ console.log(chalk2.yellow(" \u26A0\uFE0F Could not create Supabase project. Check your Supabase token."));
1179
+ }
1154
1180
  }
1155
1181
  if (services.includes("vercel")) {
1156
1182
  spinner16.start("Creating Vercel project...");
1157
- const vercel = new VercelService(config);
1158
- const project = await vercel.createProject(projectName);
1159
- spinner16.stop(`Vercel project created`);
1160
- if (domain) {
1161
- spinner16.start(`Configuring domain: ${domain}...`);
1162
- await vercel.addDomain(projectName, domain);
1163
- spinner16.stop("Domain configured");
1183
+ try {
1184
+ const vercel = new VercelService(config);
1185
+ const project = await vercel.createProject(projectName);
1186
+ spinner16.stop(`Vercel project created`);
1187
+ if (domain) {
1188
+ spinner16.start(`Configuring domain: ${domain}...`);
1189
+ try {
1190
+ await vercel.addDomain(projectName, domain);
1191
+ spinner16.stop("Domain configured");
1192
+ } catch {
1193
+ spinner16.stop("Domain configuration failed");
1194
+ console.log(chalk2.yellow(" \u26A0\uFE0F Could not configure domain. Add it manually in Vercel."));
1195
+ }
1196
+ }
1197
+ spinner16.start("Deploying to Vercel...");
1198
+ try {
1199
+ const deployment = await vercel.deploy(projectPath);
1200
+ spinner16.stop(`Deployed: ${deployment.url}`);
1201
+ } catch {
1202
+ spinner16.stop("Deployment failed");
1203
+ console.log(chalk2.yellow(' \u26A0\uFE0F Could not deploy. Run "vercel" manually later.'));
1204
+ }
1205
+ } catch (error) {
1206
+ spinner16.stop("Vercel setup failed");
1207
+ console.log(chalk2.yellow(" \u26A0\uFE0F Could not create Vercel project. Check your Vercel token."));
1164
1208
  }
1165
- spinner16.start("Deploying to Vercel...");
1166
- const deployment = await vercel.deploy(projectPath);
1167
- spinner16.stop(`Deployed: ${deployment.url}`);
1168
1209
  }
1169
1210
  spinner16.start("Generating CLAUDE.md...");
1170
1211
  const claudeMd = generateClaudeMd(projectConfig);
@@ -2755,7 +2796,7 @@ async function processUserInput(userInput, messages, anthropic, systemPrompt, pr
2755
2796
  try {
2756
2797
  spinner16.start("Thinking...");
2757
2798
  const response = await anthropic.messages.create({
2758
- model: "claude-sonnet-4-20250514",
2799
+ model: "claude-sonnet-4-5-20250929",
2759
2800
  max_tokens: 8192,
2760
2801
  system: systemPrompt,
2761
2802
  messages: messages.map((m) => ({
@@ -3172,7 +3213,7 @@ ${content}
3172
3213
 
3173
3214
  Output only the fixed file content, no explanation.`;
3174
3215
  const response = await anthropic.messages.create({
3175
- model: "claude-sonnet-4-20250514",
3216
+ model: "claude-sonnet-4-5-20250929",
3176
3217
  max_tokens: 8192,
3177
3218
  system: systemPrompt,
3178
3219
  messages: [{ role: "user", content: fixPrompt }]
@@ -3416,7 +3457,7 @@ ${content}
3416
3457
 
3417
3458
  Output ONLY the corrected file content, no explanations. Keep all existing functionality.`;
3418
3459
  const response = await anthropic.messages.create({
3419
- model: "claude-sonnet-4-20250514",
3460
+ model: "claude-sonnet-4-5-20250929",
3420
3461
  max_tokens: 8192,
3421
3462
  messages: [{ role: "user", content: prompt }]
3422
3463
  });
@@ -3463,7 +3504,7 @@ ${content}
3463
3504
 
3464
3505
  Output ONLY the corrected file content, no explanations.`;
3465
3506
  const response = await anthropic.messages.create({
3466
- model: "claude-sonnet-4-20250514",
3507
+ model: "claude-sonnet-4-5-20250929",
3467
3508
  max_tokens: 8192,
3468
3509
  messages: [{ role: "user", content: prompt }]
3469
3510
  });
@@ -3508,7 +3549,7 @@ ${content}
3508
3549
  Output ONLY the corrected file content, no explanations.`;
3509
3550
  try {
3510
3551
  const response = await anthropic.messages.create({
3511
- model: "claude-sonnet-4-20250514",
3552
+ model: "claude-sonnet-4-5-20250929",
3512
3553
  max_tokens: 8192,
3513
3554
  messages: [{ role: "user", content: prompt }]
3514
3555
  });
@@ -5041,10 +5082,10 @@ async function prdMakerCommand() {
5041
5082
  return;
5042
5083
  }
5043
5084
  if (nextStep === "build") {
5044
- const { prdCommand: prdCommand2 } = await import("./prd-AIEY63YY.js");
5085
+ const { prdCommand: prdCommand2 } = await import("./prd-YAUSAL5V.js");
5045
5086
  await prdCommand2(filepath);
5046
5087
  } else if (nextStep === "advisors") {
5047
- const { advisorsCommand: advisorsCommand2 } = await import("./advisors-GGUCFS4E.js");
5088
+ const { advisorsCommand: advisorsCommand2 } = await import("./advisors-3PWAN6UL.js");
5048
5089
  await advisorsCommand2();
5049
5090
  }
5050
5091
  }
@@ -5367,7 +5408,7 @@ async function recordWithLinux2() {
5367
5408
  }
5368
5409
  async function generatePRD(anthropic, input) {
5369
5410
  const response = await anthropic.messages.create({
5370
- model: "claude-sonnet-4-20250514",
5411
+ model: "claude-sonnet-4-5-20250929",
5371
5412
  max_tokens: 8192,
5372
5413
  messages: [{
5373
5414
  role: "user",
@@ -5556,8 +5597,13 @@ async function buildCommand(prdPath, options = {}) {
5556
5597
  }
5557
5598
  await runIntegrationPhase(anthropic, buildPlan, projectPath);
5558
5599
  spinner16.start("Installing dependencies...");
5559
- await execa9("npm", ["install"], { cwd: projectPath, reject: false });
5560
- spinner16.stop("Dependencies installed");
5600
+ try {
5601
+ await execa9("npm", ["install"], { cwd: projectPath, stdio: "inherit" });
5602
+ spinner16.stop("Dependencies installed");
5603
+ } catch (error) {
5604
+ spinner16.stop("Dependencies installation failed");
5605
+ console.log(chalk17.yellow(' \u26A0\uFE0F Run "npm install" manually in the project folder'));
5606
+ }
5561
5607
  const elapsed = Math.round((Date.now() - startTime) / 1e3);
5562
5608
  const minutes = Math.floor(elapsed / 60);
5563
5609
  const seconds = elapsed % 60;
@@ -5579,7 +5625,7 @@ async function buildCommand(prdPath, options = {}) {
5579
5625
  }
5580
5626
  async function analyzePRD(anthropic, prdContent) {
5581
5627
  const response = await anthropic.messages.create({
5582
- model: "claude-sonnet-4-20250514",
5628
+ model: "claude-sonnet-4-5-20250929",
5583
5629
  max_tokens: 4096,
5584
5630
  messages: [{
5585
5631
  role: "user",
@@ -5677,7 +5723,7 @@ async function runSetupPhase(anthropic, plan, projectPath) {
5677
5723
  await fs14.ensureDir(path13.join(projectPath, "src/features"));
5678
5724
  await fs14.ensureDir(path13.join(projectPath, ".codebakers"));
5679
5725
  const setupResponse = await anthropic.messages.create({
5680
- model: "claude-sonnet-4-20250514",
5726
+ model: "claude-sonnet-4-5-20250929",
5681
5727
  max_tokens: 8192,
5682
5728
  messages: [{
5683
5729
  role: "user",
@@ -5869,7 +5915,7 @@ Start with the index.ts that exports everything.`
5869
5915
  while (iteration < maxIterations) {
5870
5916
  iteration++;
5871
5917
  const response = await anthropic.messages.create({
5872
- model: "claude-sonnet-4-20250514",
5918
+ model: "claude-sonnet-4-5-20250929",
5873
5919
  max_tokens: 8192,
5874
5920
  messages
5875
5921
  });
@@ -5950,7 +5996,7 @@ async function askUserQuestion(agent, question, onProgress) {
5950
5996
  }
5951
5997
  async function healerAgent(anthropic, agent, error, projectPath, plan) {
5952
5998
  const response = await anthropic.messages.create({
5953
- model: "claude-sonnet-4-20250514",
5999
+ model: "claude-sonnet-4-5-20250929",
5954
6000
  max_tokens: 4096,
5955
6001
  messages: [{
5956
6002
  role: "user",
@@ -6004,7 +6050,7 @@ async function runIntegrationPhase(anthropic, plan, projectPath) {
6004
6050
  spinner16.start("Running integration...");
6005
6051
  const features = plan.waves.flatMap((w) => w.agents);
6006
6052
  const response = await anthropic.messages.create({
6007
- model: "claude-sonnet-4-20250514",
6053
+ model: "claude-sonnet-4-5-20250929",
6008
6054
  max_tokens: 8192,
6009
6055
  messages: [{
6010
6056
  role: "user",
@@ -6928,11 +6974,238 @@ function sleep2(ms) {
6928
6974
 
6929
6975
  // src/commands/website.ts
6930
6976
  import * as p19 from "@clack/prompts";
6931
- import chalk19 from "chalk";
6977
+ import chalk20 from "chalk";
6932
6978
  import * as fs16 from "fs-extra";
6933
6979
  import * as path15 from "path";
6934
6980
  import Anthropic5 from "@anthropic-ai/sdk";
6935
6981
  import { execa as execa11 } from "execa";
6982
+
6983
+ // src/utils/display.ts
6984
+ import chalk19 from "chalk";
6985
+ var StepTracker = class {
6986
+ steps;
6987
+ currentIndex = -1;
6988
+ startTime = Date.now();
6989
+ constructor(stepNames) {
6990
+ this.steps = stepNames.map((name) => ({ name, status: "pending" }));
6991
+ }
6992
+ start(index) {
6993
+ if (index !== void 0) {
6994
+ this.currentIndex = index;
6995
+ } else {
6996
+ this.currentIndex++;
6997
+ }
6998
+ if (this.currentIndex < this.steps.length) {
6999
+ this.steps[this.currentIndex].status = "running";
7000
+ }
7001
+ this.render();
7002
+ }
7003
+ complete() {
7004
+ if (this.currentIndex >= 0 && this.currentIndex < this.steps.length) {
7005
+ this.steps[this.currentIndex].status = "done";
7006
+ }
7007
+ this.render();
7008
+ }
7009
+ error() {
7010
+ if (this.currentIndex >= 0 && this.currentIndex < this.steps.length) {
7011
+ this.steps[this.currentIndex].status = "error";
7012
+ }
7013
+ this.render();
7014
+ }
7015
+ skip() {
7016
+ if (this.currentIndex >= 0 && this.currentIndex < this.steps.length) {
7017
+ this.steps[this.currentIndex].status = "skipped";
7018
+ }
7019
+ this.render();
7020
+ }
7021
+ render() {
7022
+ const output = [];
7023
+ output.push("");
7024
+ for (let i = 0; i < this.steps.length; i++) {
7025
+ const step = this.steps[i];
7026
+ const icon = this.getIcon(step.status);
7027
+ const color = this.getColor(step.status);
7028
+ const suffix = step.status === "running" ? chalk19.dim(" ...") : "";
7029
+ output.push(` ${icon} ${color(step.name)}${suffix}`);
7030
+ }
7031
+ const completed = this.steps.filter((s) => s.status === "done").length;
7032
+ const total = this.steps.length;
7033
+ const percent = Math.round(completed / total * 100);
7034
+ const barWidth = 30;
7035
+ const filled = Math.round(completed / total * barWidth);
7036
+ const empty = barWidth - filled;
7037
+ output.push("");
7038
+ output.push(` ${chalk19.green("\u2588".repeat(filled))}${chalk19.gray("\u2591".repeat(empty))} ${percent}%`);
7039
+ output.push("");
7040
+ console.log(output.join("\n"));
7041
+ }
7042
+ getIcon(status) {
7043
+ switch (status) {
7044
+ case "pending":
7045
+ return chalk19.gray("\u25CB");
7046
+ case "running":
7047
+ return chalk19.blue("\u25CF");
7048
+ case "done":
7049
+ return chalk19.green("\u2713");
7050
+ case "error":
7051
+ return chalk19.red("\u2717");
7052
+ case "skipped":
7053
+ return chalk19.yellow("\u2298");
7054
+ }
7055
+ }
7056
+ getColor(status) {
7057
+ switch (status) {
7058
+ case "pending":
7059
+ return chalk19.gray;
7060
+ case "running":
7061
+ return chalk19.white;
7062
+ case "done":
7063
+ return chalk19.green;
7064
+ case "error":
7065
+ return chalk19.red;
7066
+ case "skipped":
7067
+ return chalk19.yellow;
7068
+ }
7069
+ }
7070
+ getElapsedTime() {
7071
+ const elapsed = Math.round((Date.now() - this.startTime) / 1e3);
7072
+ const minutes = Math.floor(elapsed / 60);
7073
+ const seconds = elapsed % 60;
7074
+ return minutes > 0 ? `${minutes}m ${seconds}s` : `${seconds}s`;
7075
+ }
7076
+ };
7077
+ function showError(error) {
7078
+ console.log("");
7079
+ console.log(chalk19.red(` \u274C ${error.title}`));
7080
+ console.log("");
7081
+ console.log(chalk19.white(` What went wrong:`));
7082
+ console.log(chalk19.gray(` ${error.message}`));
7083
+ if (error.fixes && error.fixes.length > 0) {
7084
+ console.log("");
7085
+ console.log(chalk19.white(` Possible fixes:`));
7086
+ error.fixes.forEach((fix, i) => {
7087
+ console.log(chalk19.gray(` ${i + 1}. ${fix}`));
7088
+ });
7089
+ }
7090
+ if (error.command) {
7091
+ console.log("");
7092
+ console.log(chalk19.white(` Try running:`));
7093
+ console.log(chalk19.cyan(` ${error.command}`));
7094
+ }
7095
+ if (error.docs) {
7096
+ console.log("");
7097
+ console.log(chalk19.dim(` Docs: ${error.docs}`));
7098
+ }
7099
+ console.log("");
7100
+ }
7101
+ function showSuccess(success) {
7102
+ console.log("");
7103
+ console.log(chalk19.green(` \u2705 ${success.title}`));
7104
+ if (success.message) {
7105
+ console.log(chalk19.gray(` ${success.message}`));
7106
+ }
7107
+ if (success.stats && success.stats.length > 0) {
7108
+ console.log("");
7109
+ console.log(chalk19.white(` \u{1F4CA} Summary:`));
7110
+ success.stats.forEach((stat2) => {
7111
+ console.log(chalk19.gray(` ${stat2.label}: ${chalk19.white(stat2.value)}`));
7112
+ });
7113
+ }
7114
+ if (success.nextSteps && success.nextSteps.length > 0) {
7115
+ console.log("");
7116
+ console.log(chalk19.white(` Next steps:`));
7117
+ success.nextSteps.forEach((step) => {
7118
+ console.log(chalk19.cyan(` ${step}`));
7119
+ });
7120
+ }
7121
+ if (success.command) {
7122
+ console.log("");
7123
+ console.log(chalk19.white(` Quick start:`));
7124
+ console.log(chalk19.cyan(` ${success.command}`));
7125
+ }
7126
+ console.log("");
7127
+ }
7128
+ function showFileList(title, files) {
7129
+ console.log("");
7130
+ console.log(chalk19.white(` \u{1F4C1} ${title}`));
7131
+ files.forEach((file, i) => {
7132
+ const isLast = i === files.length - 1;
7133
+ const prefix = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
7134
+ const icon = getFileIcon(file);
7135
+ console.log(chalk19.gray(` ${prefix} ${icon} ${file}`));
7136
+ });
7137
+ console.log("");
7138
+ }
7139
+ function getFileIcon(filename) {
7140
+ const ext = filename.split(".").pop()?.toLowerCase();
7141
+ const icons = {
7142
+ "tsx": "\u269B\uFE0F",
7143
+ "ts": "\u{1F4D8}",
7144
+ "js": "\u{1F4D2}",
7145
+ "jsx": "\u269B\uFE0F",
7146
+ "css": "\u{1F3A8}",
7147
+ "json": "\u{1F4CB}",
7148
+ "md": "\u{1F4DD}",
7149
+ "html": "\u{1F310}"
7150
+ };
7151
+ return icons[ext || ""] || "\u{1F4C4}";
7152
+ }
7153
+ var ERRORS = {
7154
+ nodeNotInstalled: {
7155
+ title: "Node.js not found",
7156
+ message: "Node.js 18 or higher is required",
7157
+ fixes: [
7158
+ "Install Node.js from https://nodejs.org",
7159
+ "Use nvm to install: nvm install 18",
7160
+ "Restart your terminal after installing"
7161
+ ],
7162
+ docs: "https://nodejs.org/en/download"
7163
+ },
7164
+ npmFailed: {
7165
+ title: "Package installation failed",
7166
+ message: "npm install encountered an error",
7167
+ fixes: [
7168
+ "Check your internet connection",
7169
+ "Clear npm cache: npm cache clean --force",
7170
+ "Delete node_modules and try again",
7171
+ "Try using yarn instead: yarn install"
7172
+ ]
7173
+ },
7174
+ createNextAppFailed: {
7175
+ title: "Project creation failed",
7176
+ message: "create-next-app could not complete",
7177
+ fixes: [
7178
+ "Make sure Node.js 18+ is installed",
7179
+ "Check your internet connection",
7180
+ "Try running manually: npx create-next-app@latest"
7181
+ ]
7182
+ },
7183
+ apiKeyMissing: {
7184
+ title: "API key not configured",
7185
+ message: "Anthropic API key is required for AI features",
7186
+ fixes: [
7187
+ "Run: codebakers setup",
7188
+ "Get an API key at: https://console.anthropic.com"
7189
+ ],
7190
+ command: "codebakers setup"
7191
+ },
7192
+ notConfigured: {
7193
+ title: "CodeBakers not configured",
7194
+ message: "Run setup before using this command",
7195
+ command: "codebakers setup"
7196
+ },
7197
+ notInProject: {
7198
+ title: "Not in a project folder",
7199
+ message: "This command must be run inside a project",
7200
+ fixes: [
7201
+ "Navigate to your project: cd my-project",
7202
+ "Create a new project: codebakers init",
7203
+ "Or build a website: codebakers website"
7204
+ ]
7205
+ }
7206
+ };
7207
+
7208
+ // src/commands/website.ts
6936
7209
  var TEMPLATES = [
6937
7210
  {
6938
7211
  id: "landing",
@@ -7042,30 +7315,30 @@ var TEMPLATES = [
7042
7315
  async function websiteCommand() {
7043
7316
  const config = new Config();
7044
7317
  if (!config.isConfigured()) {
7045
- console.log(chalk19.yellow(`
7318
+ console.log(chalk20.yellow(`
7046
7319
  \u26A0\uFE0F CodeBakers isn't set up yet.
7047
7320
 
7048
7321
  Run this first:
7049
- ${chalk19.cyan("codebakers setup")}
7322
+ ${chalk20.cyan("codebakers setup")}
7050
7323
  `));
7051
7324
  return;
7052
7325
  }
7053
7326
  const anthropicCreds = config.getCredentials("anthropic");
7054
7327
  if (!anthropicCreds?.apiKey) {
7055
- console.log(chalk19.yellow(`
7328
+ console.log(chalk20.yellow(`
7056
7329
  \u26A0\uFE0F Anthropic API key not configured.
7057
7330
 
7058
7331
  The website builder needs Claude AI to generate code.
7059
7332
 
7060
7333
  Run this to add your API key:
7061
- ${chalk19.cyan("codebakers setup")}
7334
+ ${chalk20.cyan("codebakers setup")}
7062
7335
 
7063
7336
  Get an API key at:
7064
- ${chalk19.dim("https://console.anthropic.com/settings/keys")}
7337
+ ${chalk20.dim("https://console.anthropic.com/settings/keys")}
7065
7338
  `));
7066
7339
  return;
7067
7340
  }
7068
- console.log(chalk19.cyan(`
7341
+ console.log(chalk20.cyan(`
7069
7342
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
7070
7343
  \u2551 \u{1F310} WEBSITE BUILDER \u2551
7071
7344
  \u2551 \u2551
@@ -7092,14 +7365,14 @@ async function websiteCommand() {
7092
7365
  websiteSpec = await cloneDesign(anthropic);
7093
7366
  }
7094
7367
  if (!websiteSpec) return;
7095
- console.log(chalk19.cyan(`
7368
+ console.log(chalk20.cyan(`
7096
7369
  \u{1F4CB} Website Plan:
7097
7370
  `));
7098
- console.log(chalk19.bold(` ${websiteSpec.name}`));
7099
- console.log(chalk19.dim(` ${websiteSpec.description}
7371
+ console.log(chalk20.bold(` ${websiteSpec.name}`));
7372
+ console.log(chalk20.dim(` ${websiteSpec.description}
7100
7373
  `));
7101
- console.log(chalk19.dim(` Style: ${websiteSpec.style}`));
7102
- console.log(chalk19.dim(` Sections: ${websiteSpec.sections.join(", ")}
7374
+ console.log(chalk20.dim(` Style: ${websiteSpec.style}`));
7375
+ console.log(chalk20.dim(` Sections: ${websiteSpec.sections.join(", ")}
7103
7376
  `));
7104
7377
  const confirm13 = await p19.confirm({
7105
7378
  message: "Build this website?",
@@ -7109,11 +7382,11 @@ async function websiteCommand() {
7109
7382
  await buildWebsite(anthropic, websiteSpec, config);
7110
7383
  }
7111
7384
  async function describeWebsite(anthropic) {
7112
- console.log(chalk19.dim("\n Describe your website. Be as detailed as you want.\n"));
7113
- console.log(chalk19.dim(" Examples:"));
7114
- console.log(chalk19.dim(' \u2022 "A landing page for my AI writing tool called WriteBot"'));
7115
- console.log(chalk19.dim(' \u2022 "Portfolio site for a photographer, dark theme, minimal"'));
7116
- console.log(chalk19.dim(' \u2022 "Coffee shop website with menu, location, and online ordering"\n'));
7385
+ console.log(chalk20.dim("\n Describe your website. Be as detailed as you want.\n"));
7386
+ console.log(chalk20.dim(" Examples:"));
7387
+ console.log(chalk20.dim(' \u2022 "A landing page for my AI writing tool called WriteBot"'));
7388
+ console.log(chalk20.dim(' \u2022 "Portfolio site for a photographer, dark theme, minimal"'));
7389
+ console.log(chalk20.dim(' \u2022 "Coffee shop website with menu, location, and online ordering"\n'));
7117
7390
  const description = await textWithVoice({
7118
7391
  message: "Describe your website:",
7119
7392
  placeholder: "A landing page for..."
@@ -7122,7 +7395,7 @@ async function describeWebsite(anthropic) {
7122
7395
  const spinner16 = p19.spinner();
7123
7396
  spinner16.start("Understanding your vision...");
7124
7397
  const response = await anthropic.messages.create({
7125
- model: "claude-sonnet-4-20250514",
7398
+ model: "claude-sonnet-4-5-20250929",
7126
7399
  max_tokens: 2048,
7127
7400
  messages: [{
7128
7401
  role: "user",
@@ -7198,7 +7471,7 @@ async function templateWebsite(anthropic) {
7198
7471
  const spinner16 = p19.spinner();
7199
7472
  spinner16.start("Customizing template...");
7200
7473
  const response = await anthropic.messages.create({
7201
- model: "claude-sonnet-4-20250514",
7474
+ model: "claude-sonnet-4-5-20250929",
7202
7475
  max_tokens: 2048,
7203
7476
  messages: [{
7204
7477
  role: "user",
@@ -7244,11 +7517,11 @@ Make the content specific and compelling for this business.`
7244
7517
  return JSON.parse(jsonMatch[0]);
7245
7518
  }
7246
7519
  async function cloneDesign(anthropic) {
7247
- console.log(chalk19.dim("\n Describe a website design you like.\n"));
7248
- console.log(chalk19.dim(" Examples:"));
7249
- console.log(chalk19.dim(' \u2022 "Like Linear.app - minimal, clean, dark mode"'));
7250
- console.log(chalk19.dim(' \u2022 "Like Stripe - professional, lots of gradients"'));
7251
- console.log(chalk19.dim(' \u2022 "Like Notion - simple, friendly, illustrated"\n'));
7520
+ console.log(chalk20.dim("\n Describe a website design you like.\n"));
7521
+ console.log(chalk20.dim(" Examples:"));
7522
+ console.log(chalk20.dim(' \u2022 "Like Linear.app - minimal, clean, dark mode"'));
7523
+ console.log(chalk20.dim(' \u2022 "Like Stripe - professional, lots of gradients"'));
7524
+ console.log(chalk20.dim(' \u2022 "Like Notion - simple, friendly, illustrated"\n'));
7252
7525
  const inspiration = await textWithVoice({
7253
7526
  message: "What site do you want to be inspired by?",
7254
7527
  placeholder: "Like Linear.app but for..."
@@ -7262,7 +7535,7 @@ async function cloneDesign(anthropic) {
7262
7535
  const spinner16 = p19.spinner();
7263
7536
  spinner16.start("Analyzing design inspiration...");
7264
7537
  const response = await anthropic.messages.create({
7265
- model: "claude-sonnet-4-20250514",
7538
+ model: "claude-sonnet-4-5-20250929",
7266
7539
  max_tokens: 2048,
7267
7540
  messages: [{
7268
7541
  role: "user",
@@ -7314,37 +7587,96 @@ async function buildWebsite(anthropic, spec, config) {
7314
7587
  if (!overwrite || p19.isCancel(overwrite)) return;
7315
7588
  await fs16.remove(projectPath);
7316
7589
  }
7317
- console.log(chalk19.cyan(`
7318
- \u{1F3D7}\uFE0F Building ${spec.name}...
7590
+ console.log(chalk20.cyan(`
7591
+ \u{1F3D7}\uFE0F Building ${chalk20.bold(spec.name)}
7319
7592
  `));
7320
- const spinner16 = p19.spinner();
7321
- spinner16.start("Creating Next.js project...");
7322
- await execa11("npx", [
7323
- "create-next-app@latest",
7324
- spec.name,
7325
- "--typescript",
7326
- "--tailwind",
7327
- "--eslint",
7328
- "--app",
7329
- "--src-dir",
7330
- "--import-alias",
7331
- "@/*",
7332
- "--no-git"
7333
- ], { cwd: process.cwd(), reject: false });
7334
- spinner16.stop("Project created");
7335
- spinner16.start("Setting up shadcn/ui...");
7336
- await execa11("npx", ["shadcn@latest", "init", "-y", "-d"], {
7337
- cwd: projectPath,
7338
- reject: false
7339
- });
7340
- await execa11("npx", ["shadcn@latest", "add", "button", "card", "input", "badge", "-y"], {
7341
- cwd: projectPath,
7342
- reject: false
7343
- });
7344
- spinner16.stop("UI components ready");
7345
- spinner16.start("Generating website code...");
7593
+ const steps = new StepTracker([
7594
+ "Create project structure",
7595
+ "Install dependencies",
7596
+ "Set up UI components",
7597
+ "Generate website code",
7598
+ "Create additional pages",
7599
+ "Initialize git repository"
7600
+ ]);
7601
+ const createdFiles = [];
7602
+ steps.start();
7603
+ try {
7604
+ await execa11("npx", [
7605
+ "create-next-app@latest",
7606
+ spec.name,
7607
+ "--typescript",
7608
+ "--tailwind",
7609
+ "--eslint",
7610
+ "--app",
7611
+ "--src-dir",
7612
+ "--import-alias",
7613
+ "@/*",
7614
+ "--no-git",
7615
+ "--yes"
7616
+ ], {
7617
+ cwd: process.cwd(),
7618
+ stdio: "pipe"
7619
+ // Hide output for cleaner display
7620
+ });
7621
+ steps.complete();
7622
+ } catch (error) {
7623
+ steps.error();
7624
+ showError({
7625
+ title: "Project creation failed",
7626
+ message: "create-next-app could not complete",
7627
+ fixes: [
7628
+ "Make sure Node.js 18+ is installed",
7629
+ "Check your internet connection",
7630
+ "Try running manually: npx create-next-app@latest " + spec.name
7631
+ ],
7632
+ command: "npx create-next-app@latest " + spec.name
7633
+ });
7634
+ return;
7635
+ }
7636
+ if (!await fs16.pathExists(projectPath)) {
7637
+ steps.error();
7638
+ showError({
7639
+ title: "Project folder not created",
7640
+ message: "The project directory was not found after creation",
7641
+ fixes: [
7642
+ "Check if you have write permissions in this folder",
7643
+ "Try creating the project in a different location"
7644
+ ]
7645
+ });
7646
+ return;
7647
+ }
7648
+ steps.start();
7649
+ try {
7650
+ await execa11("npm", ["install", "lucide-react"], {
7651
+ cwd: projectPath,
7652
+ stdio: "pipe"
7653
+ });
7654
+ steps.complete();
7655
+ } catch (error) {
7656
+ steps.error();
7657
+ showError({
7658
+ ...ERRORS.npmFailed,
7659
+ command: `cd ${spec.name} && npm install`
7660
+ });
7661
+ return;
7662
+ }
7663
+ steps.start();
7664
+ try {
7665
+ await execa11("npx", ["shadcn@latest", "init", "-y", "-d"], {
7666
+ cwd: projectPath,
7667
+ stdio: "pipe"
7668
+ });
7669
+ await execa11("npx", ["shadcn@latest", "add", "button", "card", "input", "badge", "-y"], {
7670
+ cwd: projectPath,
7671
+ stdio: "pipe"
7672
+ });
7673
+ steps.complete();
7674
+ } catch (error) {
7675
+ steps.skip();
7676
+ }
7677
+ steps.start();
7346
7678
  const response = await anthropic.messages.create({
7347
- model: "claude-sonnet-4-20250514",
7679
+ model: "claude-sonnet-4-5-20250929",
7348
7680
  max_tokens: 16e3,
7349
7681
  messages: [{
7350
7682
  role: "user",
@@ -7399,45 +7731,52 @@ Make it production-quality and visually impressive.`
7399
7731
  const text17 = response.content[0].type === "text" ? response.content[0].text : "";
7400
7732
  const fileRegex = /<<<FILE:\s*(.+?)>>>([\s\S]*?)<<<END_FILE>>>/g;
7401
7733
  let match;
7402
- let fileCount = 0;
7403
7734
  while ((match = fileRegex.exec(text17)) !== null) {
7404
7735
  const filePath = path15.join(projectPath, match[1].trim());
7405
7736
  const content = match[2].trim();
7406
7737
  await fs16.ensureDir(path15.dirname(filePath));
7407
7738
  await fs16.writeFile(filePath, content);
7408
- fileCount++;
7409
- }
7410
- spinner16.stop(`Generated ${fileCount} files`);
7411
- spinner16.start("Initializing git...");
7412
- await execa11("git", ["init"], { cwd: projectPath, reject: false });
7413
- await execa11("git", ["add", "."], { cwd: projectPath, reject: false });
7414
- await execa11("git", ["commit", "-m", "Initial website build by CodeBakers"], { cwd: projectPath, reject: false });
7415
- spinner16.stop("Git initialized");
7416
- console.log(chalk19.green(`
7417
- \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
7418
- \u2551 \u2705 Website built successfully! \u2551
7419
- \u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
7420
- \u2551 \u2551
7421
- \u2551 ${spec.name.padEnd(55)}\u2551
7422
- \u2551 ${spec.description.substring(0, 55).padEnd(55)}\u2551
7423
- \u2551 \u2551
7424
- \u2551 Next steps: \u2551
7425
- \u2551 cd ${spec.name.padEnd(52)}\u2551
7426
- \u2551 npm run dev \u2551
7427
- \u2551 \u2551
7428
- \u2551 Then open http://localhost:3000 \u2551
7429
- \u2551 \u2551
7430
- \u2551 Ready to deploy? \u2551
7431
- \u2551 codebakers deploy \u2551
7432
- \u2551 \u2551
7433
- \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
7434
- `));
7739
+ createdFiles.push(match[1].trim());
7740
+ }
7741
+ steps.complete();
7742
+ steps.start();
7743
+ steps.complete();
7744
+ steps.start();
7745
+ try {
7746
+ await execa11("git", ["init"], { cwd: projectPath, stdio: "pipe" });
7747
+ await execa11("git", ["add", "."], { cwd: projectPath, stdio: "pipe" });
7748
+ await execa11("git", ["commit", "-m", "Initial website build by CodeBakers"], { cwd: projectPath, stdio: "pipe" });
7749
+ steps.complete();
7750
+ } catch (error) {
7751
+ steps.skip();
7752
+ }
7753
+ if (createdFiles.length > 0) {
7754
+ showFileList("Files created", createdFiles.slice(0, 10));
7755
+ if (createdFiles.length > 10) {
7756
+ console.log(chalk20.dim(` ... and ${createdFiles.length - 10} more files`));
7757
+ }
7758
+ }
7759
+ showSuccess({
7760
+ title: "Website built successfully!",
7761
+ message: spec.description,
7762
+ stats: [
7763
+ { label: "Project", value: spec.name },
7764
+ { label: "Files created", value: createdFiles.length.toString() },
7765
+ { label: "Sections", value: spec.sections.length.toString() },
7766
+ { label: "Build time", value: steps.getElapsedTime() }
7767
+ ],
7768
+ nextSteps: [
7769
+ `cd ${spec.name}`,
7770
+ "npm run dev"
7771
+ ],
7772
+ command: `cd ${spec.name} && npm run dev`
7773
+ });
7435
7774
  const openDev = await p19.confirm({
7436
7775
  message: "Start development server now?",
7437
7776
  initialValue: true
7438
7777
  });
7439
7778
  if (openDev && !p19.isCancel(openDev)) {
7440
- console.log(chalk19.dim("\n Starting dev server...\n"));
7779
+ console.log(chalk20.dim("\n Starting dev server...\n"));
7441
7780
  process.chdir(projectPath);
7442
7781
  await execa11("npm", ["run", "dev"], {
7443
7782
  stdio: "inherit",
@@ -7614,7 +7953,7 @@ If unclear between multiple commands, use the most likely one with lower confide
7614
7953
  }
7615
7954
 
7616
7955
  // src/index.ts
7617
- var VERSION = "2.3.8";
7956
+ var VERSION = "2.5.0";
7618
7957
  var logo = `
7619
7958
  \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
7620
7959
  \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D
@@ -7626,12 +7965,12 @@ var logo = `
7626
7965
  async function showMainMenu() {
7627
7966
  const config = new Config();
7628
7967
  console.log(gradient.pastel.multiline(logo));
7629
- console.log(chalk20.dim(` v${VERSION} \u2014 AI dev team that follows the rules
7968
+ console.log(chalk21.dim(` v${VERSION} \u2014 AI dev team that follows the rules
7630
7969
  `));
7631
7970
  const hasAnthropic = !!config.getCredentials("anthropic")?.apiKey;
7632
7971
  if (!hasAnthropic) {
7633
7972
  console.log(boxen2(
7634
- chalk20.yellow("Welcome to CodeBakers!\n\n") + chalk20.white("Let's connect your Anthropic API key so the AI can work.\n") + chalk20.dim("(Takes about 1 minute)"),
7973
+ chalk21.yellow("Welcome to CodeBakers!\n\n") + chalk21.white("Let's connect your Anthropic API key so the AI can work.\n") + chalk21.dim("(Takes about 1 minute)"),
7635
7974
  { padding: 1, borderColor: "yellow", borderStyle: "round" }
7636
7975
  ));
7637
7976
  await setupCommand();
@@ -7644,31 +7983,31 @@ async function showMainMenu() {
7644
7983
  const folderName = path16.basename(cwd);
7645
7984
  if (inProject && projectConfig) {
7646
7985
  const framework = projectConfig.framework || "detected";
7647
- console.log(chalk20.cyan(` \u{1F4C1} Working in: ${chalk20.bold(folderName)}`));
7648
- console.log(chalk20.dim(` ${framework} project
7986
+ console.log(chalk21.cyan(` \u{1F4C1} Working in: ${chalk21.bold(folderName)}`));
7987
+ console.log(chalk21.dim(` ${framework} project
7649
7988
  `));
7650
7989
  await showProjectMenu(config);
7651
7990
  } else {
7652
- console.log(chalk20.cyan(` \u{1F4C1} Current folder: ${chalk20.bold(cwd)}`));
7653
- console.log(chalk20.dim(` Not a project folder
7991
+ console.log(chalk21.cyan(` \u{1F4C1} Current folder: ${chalk21.bold(cwd)}`));
7992
+ console.log(chalk21.dim(` Not a project folder
7654
7993
  `));
7655
7994
  await showStartMenu(config);
7656
7995
  }
7657
7996
  }
7658
7997
  async function showStartMenu(config) {
7659
- console.log(chalk20.cyan("\n \u2139\uFE0F This folder doesn't have a project yet.\n"));
7998
+ console.log(chalk21.cyan("\n \u2139\uFE0F This folder doesn't have a project yet.\n"));
7660
7999
  let keepRunning = true;
7661
8000
  while (keepRunning) {
7662
- console.log(chalk20.white(" What would you like to do?\n"));
7663
- console.log(chalk20.green(" 1.") + " \u{1F310} Build a website " + chalk20.dim("- Describe it, AI builds it"));
7664
- console.log(chalk20.green(" 2.") + " \u{1F195} Create new project " + chalk20.dim("- Start with Next.js, React, etc."));
7665
- console.log(chalk20.green(" 3.") + " \u270F\uFE0F Plan my project " + chalk20.dim("- Create a detailed plan first"));
7666
- console.log(chalk20.green(" 4.") + " \u{1F3D7}\uFE0F Build from plan " + chalk20.dim("- I already have a PRD file"));
7667
- console.log(chalk20.green(" 5.") + " \u{1F31F} Get expert advice " + chalk20.dim("- AI consultants help you decide"));
7668
- console.log(chalk20.green(" 6.") + " \u{1F50C} Add a service " + chalk20.dim("- Stripe, Supabase, Auth, etc."));
7669
- console.log(chalk20.green(" 7.") + " \u2699\uFE0F Settings " + chalk20.dim("- API keys & preferences"));
7670
- console.log(chalk20.green(" 8.") + " \u2753 Help " + chalk20.dim("- Learn how CodeBakers works"));
7671
- console.log(chalk20.green(" 0.") + " \u{1F6AA} Return to terminal " + chalk20.dim("- Go back to command line"));
8001
+ console.log(chalk21.white(" What would you like to do?\n"));
8002
+ console.log(chalk21.green(" 1.") + " \u{1F310} Build a website " + chalk21.dim("- Describe it, AI builds it"));
8003
+ console.log(chalk21.green(" 2.") + " \u{1F195} Create new project " + chalk21.dim("- Start with Next.js, React, etc."));
8004
+ console.log(chalk21.green(" 3.") + " \u270F\uFE0F Plan my project " + chalk21.dim("- Create a detailed plan first"));
8005
+ console.log(chalk21.green(" 4.") + " \u{1F3D7}\uFE0F Build from plan " + chalk21.dim("- I already have a PRD file"));
8006
+ console.log(chalk21.green(" 5.") + " \u{1F31F} Get expert advice " + chalk21.dim("- AI consultants help you decide"));
8007
+ console.log(chalk21.green(" 6.") + " \u{1F50C} Add a service " + chalk21.dim("- Stripe, Supabase, Auth, etc."));
8008
+ console.log(chalk21.green(" 7.") + " \u2699\uFE0F Settings " + chalk21.dim("- API keys & preferences"));
8009
+ console.log(chalk21.green(" 8.") + " \u2753 Help " + chalk21.dim("- Learn how CodeBakers works"));
8010
+ console.log(chalk21.green(" 0.") + " \u{1F6AA} Return to terminal " + chalk21.dim("- Go back to command line"));
7672
8011
  console.log("");
7673
8012
  const choice = await p21.text({
7674
8013
  message: "Enter a number (0-8):",
@@ -7720,34 +8059,34 @@ async function showStartMenu(config) {
7720
8059
  }
7721
8060
  function showExitMessage() {
7722
8061
  console.log("");
7723
- console.log(chalk20.cyan(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
7724
- console.log(chalk20.white(" You're back in the terminal."));
8062
+ console.log(chalk21.cyan(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
8063
+ console.log(chalk21.white(" You're back in the terminal."));
7725
8064
  console.log("");
7726
- console.log(chalk20.dim(" To start CodeBakers again, type:"));
7727
- console.log(chalk20.green(" codebakers"));
8065
+ console.log(chalk21.dim(" To start CodeBakers again, type:"));
8066
+ console.log(chalk21.green(" codebakers"));
7728
8067
  console.log("");
7729
- console.log(chalk20.dim(" Quick commands you can run directly:"));
7730
- console.log(chalk20.dim(" codebakers website") + chalk20.gray(" - Build a website"));
7731
- console.log(chalk20.dim(" codebakers code") + chalk20.gray(" - Code with AI"));
7732
- console.log(chalk20.dim(" codebakers help") + chalk20.gray(" - See all commands"));
7733
- console.log(chalk20.cyan(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
8068
+ console.log(chalk21.dim(" Quick commands you can run directly:"));
8069
+ console.log(chalk21.dim(" codebakers website") + chalk21.gray(" - Build a website"));
8070
+ console.log(chalk21.dim(" codebakers code") + chalk21.gray(" - Code with AI"));
8071
+ console.log(chalk21.dim(" codebakers help") + chalk21.gray(" - See all commands"));
8072
+ console.log(chalk21.cyan(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
7734
8073
  console.log("");
7735
8074
  }
7736
8075
  async function showProjectMenu(config) {
7737
- console.log(chalk20.cyan("\n \u2139\uFE0F I found an existing project in this folder.\n"));
8076
+ console.log(chalk21.cyan("\n \u2139\uFE0F I found an existing project in this folder.\n"));
7738
8077
  let keepRunning = true;
7739
8078
  while (keepRunning) {
7740
- console.log(chalk20.white(" What would you like to do with this project?\n"));
7741
- console.log(chalk20.green(" 1.") + " \u{1F4AC} Code with AI " + chalk20.dim("- Tell AI what to build or fix"));
7742
- console.log(chalk20.green(" 2.") + " \u{1F680} Deploy to production " + chalk20.dim("- Make your site live"));
7743
- console.log(chalk20.green(" 3.") + " \u{1F50D} Check my code " + chalk20.dim("- Find issues & improvements"));
7744
- console.log(chalk20.green(" 4.") + " \u{1F527} Fix errors for me " + chalk20.dim("- AI repairs broken code"));
7745
- console.log(chalk20.green(" 5.") + " \u{1F50C} Add a service " + chalk20.dim("- Stripe, Supabase, Auth, etc."));
7746
- console.log(chalk20.green(" 6.") + " \u26A1 Create new files " + chalk20.dim("- Components, pages, APIs"));
7747
- console.log(chalk20.green(" 7.") + " \u{1F195} Start fresh project " + chalk20.dim("- Begin something new"));
7748
- console.log(chalk20.green(" 8.") + " \u2699\uFE0F Settings " + chalk20.dim("- API keys & preferences"));
7749
- console.log(chalk20.green(" 9.") + " \u2753 Help " + chalk20.dim("- Learn how CodeBakers works"));
7750
- console.log(chalk20.green(" 0.") + " \u{1F6AA} Return to terminal " + chalk20.dim("- Go back to command line"));
8079
+ console.log(chalk21.white(" What would you like to do with this project?\n"));
8080
+ console.log(chalk21.green(" 1.") + " \u{1F4AC} Code with AI " + chalk21.dim("- Tell AI what to build or fix"));
8081
+ console.log(chalk21.green(" 2.") + " \u{1F680} Deploy to production " + chalk21.dim("- Make your site live"));
8082
+ console.log(chalk21.green(" 3.") + " \u{1F50D} Check my code " + chalk21.dim("- Find issues & improvements"));
8083
+ console.log(chalk21.green(" 4.") + " \u{1F527} Fix errors for me " + chalk21.dim("- AI repairs broken code"));
8084
+ console.log(chalk21.green(" 5.") + " \u{1F50C} Add a service " + chalk21.dim("- Stripe, Supabase, Auth, etc."));
8085
+ console.log(chalk21.green(" 6.") + " \u26A1 Create new files " + chalk21.dim("- Components, pages, APIs"));
8086
+ console.log(chalk21.green(" 7.") + " \u{1F195} Start fresh project " + chalk21.dim("- Begin something new"));
8087
+ console.log(chalk21.green(" 8.") + " \u2699\uFE0F Settings " + chalk21.dim("- API keys & preferences"));
8088
+ console.log(chalk21.green(" 9.") + " \u2753 Help " + chalk21.dim("- Learn how CodeBakers works"));
8089
+ console.log(chalk21.green(" 0.") + " \u{1F6AA} Return to terminal " + chalk21.dim("- Go back to command line"));
7751
8090
  console.log("");
7752
8091
  const choice = await p21.text({
7753
8092
  message: "Enter a number (0-9):",
@@ -7851,52 +8190,52 @@ async function handleAction(action, config) {
7851
8190
  showHelp2();
7852
8191
  break;
7853
8192
  default:
7854
- console.log(chalk20.yellow("Coming soon!"));
8193
+ console.log(chalk21.yellow("Coming soon!"));
7855
8194
  }
7856
8195
  }
7857
8196
  function showPostSetupInstructions() {
7858
8197
  console.log(boxen2(
7859
- chalk20.green.bold("\u2713 Setup complete!\n\n") + chalk20.white("What's next?\n\n") + chalk20.cyan("1. ") + "Navigate to where you want to build:\n" + chalk20.dim(" cd C:\\dev\\my-project\n\n") + chalk20.cyan("2. ") + "Run CodeBakers:\n" + chalk20.dim(" codebakers\n\n") + chalk20.white("Or build a website right now:\n") + chalk20.dim(" codebakers website"),
8198
+ chalk21.green.bold("\u2713 Setup complete!\n\n") + chalk21.white("What's next?\n\n") + chalk21.cyan("1. ") + "Navigate to where you want to build:\n" + chalk21.dim(" cd C:\\dev\\my-project\n\n") + chalk21.cyan("2. ") + "Run CodeBakers:\n" + chalk21.dim(" codebakers\n\n") + chalk21.white("Or build a website right now:\n") + chalk21.dim(" codebakers website"),
7860
8199
  { padding: 1, borderColor: "green", borderStyle: "round" }
7861
8200
  ));
7862
8201
  }
7863
8202
  function showPostBuildInstructions(projectName, projectPath) {
7864
8203
  const displayPath = projectPath || projectName;
7865
8204
  console.log(boxen2(
7866
- chalk20.green.bold(`\u2713 ${projectName} created!
8205
+ chalk21.green.bold(`\u2713 ${projectName} created!
7867
8206
 
7868
- `) + chalk20.white("Next steps:\n\n") + chalk20.cyan("1. ") + "Go to your project:\n" + chalk20.dim(` cd ${displayPath}
8207
+ `) + chalk21.white("Next steps:\n\n") + chalk21.cyan("1. ") + "Go to your project:\n" + chalk21.dim(` cd ${displayPath}
7869
8208
 
7870
- `) + chalk20.cyan("2. ") + "Install dependencies:\n" + chalk20.dim(" npm install\n\n") + chalk20.cyan("3. ") + "Start the dev server:\n" + chalk20.dim(" npm run dev\n\n") + chalk20.cyan("4. ") + "Open in browser:\n" + chalk20.dim(" http://localhost:3000\n\n") + chalk20.white("Ready to deploy?\n") + chalk20.dim(" codebakers deploy"),
8209
+ `) + chalk21.cyan("2. ") + "Install dependencies:\n" + chalk21.dim(" npm install\n\n") + chalk21.cyan("3. ") + "Start the dev server:\n" + chalk21.dim(" npm run dev\n\n") + chalk21.cyan("4. ") + "Open in browser:\n" + chalk21.dim(" http://localhost:3000\n\n") + chalk21.white("Ready to deploy?\n") + chalk21.dim(" codebakers deploy"),
7871
8210
  { padding: 1, borderColor: "green", borderStyle: "round" }
7872
8211
  ));
7873
8212
  }
7874
8213
  function showHelp2() {
7875
8214
  console.log(boxen2(`
7876
- ${chalk20.bold("CodeBakers CLI v" + VERSION)} \u2014 AI dev team that follows the rules
7877
-
7878
- ${chalk20.bold.cyan("Getting Started:")}
7879
- ${chalk20.cyan("codebakers")} Interactive menu
7880
- ${chalk20.cyan("codebakers setup")} Connect API keys
7881
- ${chalk20.cyan("codebakers website")} Build website by describing it
7882
- ${chalk20.cyan("codebakers init")} Create new project
7883
-
7884
- ${chalk20.bold.cyan("In a Project:")}
7885
- ${chalk20.cyan("codebakers code")} Chat with AI to build features
7886
- ${chalk20.cyan("codebakers deploy")} Deploy to Vercel
7887
- ${chalk20.cyan("codebakers check")} Check code quality
7888
- ${chalk20.cyan("codebakers fix")} Auto-fix errors
7889
-
7890
- ${chalk20.bold.cyan("Planning:")}
7891
- ${chalk20.cyan("codebakers prd-maker")} Create PRD through interview
7892
- ${chalk20.cyan("codebakers build")} Build from PRD (parallel agents)
7893
- ${chalk20.cyan("codebakers advisors")} Consult AI experts
7894
-
7895
- ${chalk20.bold.cyan("Integrations:")}
7896
- ${chalk20.cyan("codebakers integrate")} 50+ one-click integrations
7897
- ${chalk20.cyan("codebakers gateway")} WhatsApp, Telegram, Discord
7898
-
7899
- ${chalk20.bold("Docs:")} ${chalk20.dim("https://codebakers.dev/docs")}
8215
+ ${chalk21.bold("CodeBakers CLI v" + VERSION)} \u2014 AI dev team that follows the rules
8216
+
8217
+ ${chalk21.bold.cyan("Getting Started:")}
8218
+ ${chalk21.cyan("codebakers")} Interactive menu
8219
+ ${chalk21.cyan("codebakers setup")} Connect API keys
8220
+ ${chalk21.cyan("codebakers website")} Build website by describing it
8221
+ ${chalk21.cyan("codebakers init")} Create new project
8222
+
8223
+ ${chalk21.bold.cyan("In a Project:")}
8224
+ ${chalk21.cyan("codebakers code")} Chat with AI to build features
8225
+ ${chalk21.cyan("codebakers deploy")} Deploy to Vercel
8226
+ ${chalk21.cyan("codebakers check")} Check code quality
8227
+ ${chalk21.cyan("codebakers fix")} Auto-fix errors
8228
+
8229
+ ${chalk21.bold.cyan("Planning:")}
8230
+ ${chalk21.cyan("codebakers prd-maker")} Create PRD through interview
8231
+ ${chalk21.cyan("codebakers build")} Build from PRD (parallel agents)
8232
+ ${chalk21.cyan("codebakers advisors")} Consult AI experts
8233
+
8234
+ ${chalk21.bold.cyan("Integrations:")}
8235
+ ${chalk21.cyan("codebakers integrate")} 50+ one-click integrations
8236
+ ${chalk21.cyan("codebakers gateway")} WhatsApp, Telegram, Discord
8237
+
8238
+ ${chalk21.bold("Docs:")} ${chalk21.dim("https://codebakers.dev/docs")}
7900
8239
  `, { padding: 1, borderColor: "cyan", borderStyle: "round" }));
7901
8240
  }
7902
8241
  var program = new Command();
@@ -7924,7 +8263,7 @@ program.command("website").alias("site").description("Build website by describin
7924
8263
  program.command("help").description("Show help").action(showHelp2);
7925
8264
  async function handleNaturalLanguage(input) {
7926
8265
  const config = new Config();
7927
- console.log(chalk20.dim("\n Understanding your request...\n"));
8266
+ console.log(chalk21.dim("\n Understanding your request...\n"));
7928
8267
  const parsed = await parseNaturalLanguage(input, config);
7929
8268
  if (!parsed) {
7930
8269
  await codeCommand(input);