@codebakers/cli 1.0.9 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +26 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -63,7 +63,13 @@ async function validateApiKey(apiKey) {
63
63
  }
64
64
  });
65
65
  if (response.ok) {
66
- return { valid: true };
66
+ try {
67
+ const data = await response.json();
68
+ const user = data.user;
69
+ return { valid: true, userName: user?.name || void 0 };
70
+ } catch {
71
+ return { valid: true };
72
+ }
67
73
  }
68
74
  try {
69
75
  const data = await response.json();
@@ -172,6 +178,7 @@ Validation failed: ${validation.error || "Unknown error"}`));
172
178
  }
173
179
  process.exit(1);
174
180
  }
181
+ const userName = validation.userName;
175
182
  spinner.succeed("API key validated");
176
183
  setApiKey(apiKey);
177
184
  console.log(chalk.green("\n\u2713 API key saved\n"));
@@ -196,14 +203,26 @@ Validation failed: ${validation.error || "Unknown error"}`));
196
203
  if (ide) {
197
204
  await configureIDE(ide, options.force);
198
205
  }
206
+ const firstName = userName?.split(" ")[0];
207
+ const greeting = firstName ? `${firstName}, you're` : "You're";
199
208
  console.log(chalk.bold.green("\n\u{1F389} Setup complete!\n"));
200
209
  if (ide === "claude-code") {
201
- console.log(chalk.green("\u2713 CodeBakers is ready! Start coding.\n"));
202
- console.log(chalk.bold("Try it now:"));
203
- console.log(chalk.cyan(' "Add a contact form to my app"\n'));
204
- console.log(chalk.dim("What happens:"));
205
- console.log(chalk.dim(" Your prompt \u2192 CodeBakers patterns \u2192 Production-ready code"));
206
- console.log(chalk.dim(" with validation, error handling, loading states, and tests.\n"));
210
+ console.log(chalk.green(`\u2713 ${greeting} ready to build!
211
+ `));
212
+ console.log(chalk.bold("You say:"));
213
+ console.log(chalk.cyan(' "Add a contact form"\n'));
214
+ console.log(chalk.bold("CodeBakers generates:"));
215
+ console.log(chalk.dim(" \u250C\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\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
216
+ console.log(chalk.dim(" \u2502 ") + chalk.white("ContactForm component with:") + chalk.dim(" \u2502"));
217
+ console.log(chalk.dim(" \u2502 ") + chalk.green("\u2713") + chalk.dim(" Zod schema validation (name, email, message) \u2502"));
218
+ console.log(chalk.dim(" \u2502 ") + chalk.green("\u2713") + chalk.dim(" React Hook Form with proper error display \u2502"));
219
+ console.log(chalk.dim(" \u2502 ") + chalk.green("\u2713") + chalk.dim(" Loading spinner during submission \u2502"));
220
+ console.log(chalk.dim(" \u2502 ") + chalk.green("\u2713") + chalk.dim(" Success/error toast notifications \u2502"));
221
+ console.log(chalk.dim(" \u2502 ") + chalk.green("\u2713") + chalk.dim(" API route with rate limiting \u2502"));
222
+ console.log(chalk.dim(" \u2502 ") + chalk.green("\u2713") + chalk.dim(" Email integration (Resend) \u2502"));
223
+ console.log(chalk.dim(" \u2502 ") + chalk.green("\u2713") + chalk.dim(" Accessible, responsive design \u2502"));
224
+ console.log(chalk.dim(" \u2514\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\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"));
225
+ console.log(chalk.dim("Start building: just describe what you need.\n"));
207
226
  } else if (ide) {
208
227
  console.log(chalk.dim(`Pattern file created. Restart ${IDE_CONFIGS[ide].description} to load it.
209
228
  `));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebakers/cli",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "CodeBakers CLI - AI prompt patterns for production-ready code",
5
5
  "main": "dist/index.js",
6
6
  "bin": {