@codebakers/cli 1.4.3 → 1.4.4
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/generate.js +8 -2
- package/dist/commands/init.js +16 -4
- package/dist/commands/scaffold.js +17 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/commands/generate.ts +9 -2
- package/src/commands/init.ts +18 -4
- package/src/commands/scaffold.ts +19 -5
- package/src/index.ts +1 -1
|
@@ -487,13 +487,19 @@ async function generate(options) {
|
|
|
487
487
|
// If type not provided, ask
|
|
488
488
|
if (!type) {
|
|
489
489
|
console.log(chalk_1.default.white(' What would you like to generate?\n'));
|
|
490
|
+
console.log(chalk_1.default.gray(' 0. ') + chalk_1.default.magenta('You Decide') + chalk_1.default.gray(' - Let AI pick based on context'));
|
|
490
491
|
for (const gen of generators) {
|
|
491
492
|
console.log(chalk_1.default.gray(` ${gen.key}. `) + chalk_1.default.cyan(gen.name) + chalk_1.default.gray(` - ${gen.desc}`));
|
|
492
493
|
}
|
|
493
494
|
console.log('');
|
|
494
495
|
let choice = '';
|
|
495
|
-
while (!['1', '2', '3', '4', '5', '6', '7'].includes(choice)) {
|
|
496
|
-
choice = await prompt(' Enter
|
|
496
|
+
while (!['0', '1', '2', '3', '4', '5', '6', '7'].includes(choice)) {
|
|
497
|
+
choice = await prompt(' Enter 0-7: ');
|
|
498
|
+
}
|
|
499
|
+
// "You Decide" defaults to component (most common)
|
|
500
|
+
if (choice === '0') {
|
|
501
|
+
console.log(chalk_1.default.magenta(' → AI chose: component (most common)\n'));
|
|
502
|
+
choice = '1';
|
|
497
503
|
}
|
|
498
504
|
type = generators.find(g => g.key === choice)?.name;
|
|
499
505
|
}
|
package/dist/commands/init.js
CHANGED
|
@@ -259,12 +259,18 @@ async function confirm(question) {
|
|
|
259
259
|
}
|
|
260
260
|
async function selectProjectType() {
|
|
261
261
|
console.log(chalk_1.default.white('\n What kind of project is this?\n'));
|
|
262
|
+
console.log(chalk_1.default.gray(' 0. ') + chalk_1.default.magenta('You Decide') + chalk_1.default.gray(' - Let AI pick the best option'));
|
|
262
263
|
console.log(chalk_1.default.gray(' 1. ') + chalk_1.default.cyan('PERSONAL') + chalk_1.default.gray(' - Just building for myself'));
|
|
263
264
|
console.log(chalk_1.default.gray(' 2. ') + chalk_1.default.cyan('CLIENT') + chalk_1.default.gray(' - Building for someone else'));
|
|
264
265
|
console.log(chalk_1.default.gray(' 3. ') + chalk_1.default.cyan('BUSINESS') + chalk_1.default.gray(' - My own product/startup\n'));
|
|
265
266
|
let typeChoice = '';
|
|
266
|
-
while (!['1', '2', '3'].includes(typeChoice)) {
|
|
267
|
-
typeChoice = await prompt(' Enter 1, 2, or 3: ');
|
|
267
|
+
while (!['0', '1', '2', '3'].includes(typeChoice)) {
|
|
268
|
+
typeChoice = await prompt(' Enter 0, 1, 2, or 3: ');
|
|
269
|
+
}
|
|
270
|
+
// "You Decide" defaults to Personal (most common)
|
|
271
|
+
if (typeChoice === '0') {
|
|
272
|
+
console.log(chalk_1.default.magenta(' → AI chose: Personal (most flexible)\n'));
|
|
273
|
+
typeChoice = '1';
|
|
268
274
|
}
|
|
269
275
|
const typeMap = {
|
|
270
276
|
'1': 'personal',
|
|
@@ -695,12 +701,18 @@ async function init() {
|
|
|
695
701
|
else {
|
|
696
702
|
console.log(chalk_1.default.gray(' A PRD helps the AI understand what you\'re building.\n'));
|
|
697
703
|
console.log(chalk_1.default.white(' How would you like to set up your PRD?\n'));
|
|
704
|
+
console.log(chalk_1.default.gray(' 0. ') + chalk_1.default.magenta('You Decide') + chalk_1.default.gray(' - Let AI pick the best option'));
|
|
698
705
|
console.log(chalk_1.default.gray(' 1. ') + chalk_1.default.cyan('CREATE TEMPLATE') + chalk_1.default.gray(' - I\'ll fill it out'));
|
|
699
706
|
console.log(chalk_1.default.gray(' 2. ') + chalk_1.default.cyan('PASTE CONTENT') + chalk_1.default.gray(' - I have requirements ready'));
|
|
700
707
|
console.log(chalk_1.default.gray(' 3. ') + chalk_1.default.cyan('SKIP FOR NOW') + chalk_1.default.gray(' - I\'ll add it later\n'));
|
|
701
708
|
let prdChoice = '';
|
|
702
|
-
while (!['1', '2', '3'].includes(prdChoice)) {
|
|
703
|
-
prdChoice = await prompt(' Enter 1, 2, or 3: ');
|
|
709
|
+
while (!['0', '1', '2', '3'].includes(prdChoice)) {
|
|
710
|
+
prdChoice = await prompt(' Enter 0, 1, 2, or 3: ');
|
|
711
|
+
}
|
|
712
|
+
// "You Decide" defaults to creating a template (most helpful)
|
|
713
|
+
if (prdChoice === '0') {
|
|
714
|
+
console.log(chalk_1.default.magenta(' → AI chose: Create Template (recommended)\n'));
|
|
715
|
+
prdChoice = '1';
|
|
704
716
|
}
|
|
705
717
|
if (prdChoice === '1') {
|
|
706
718
|
// Create template
|
|
@@ -310,16 +310,23 @@ async function scaffold() {
|
|
|
310
310
|
}
|
|
311
311
|
// Ask about experience level
|
|
312
312
|
console.log(chalk_1.default.white('\n What\'s your experience level?\n'));
|
|
313
|
+
console.log(chalk_1.default.gray(' 0. ') + chalk_1.default.magenta('You Decide') + chalk_1.default.gray(' - Let AI pick the best option'));
|
|
313
314
|
console.log(chalk_1.default.gray(' 1. ') + chalk_1.default.cyan('Beginner') + chalk_1.default.gray(' - New to coding, explain everything'));
|
|
314
315
|
console.log(chalk_1.default.gray(' 2. ') + chalk_1.default.cyan('Intermediate') + chalk_1.default.gray(' - Know some coding, brief explanations'));
|
|
315
316
|
console.log(chalk_1.default.gray(' 3. ') + chalk_1.default.cyan('Advanced') + chalk_1.default.gray(' - Skip explanations, just build\n'));
|
|
316
317
|
let experienceLevel = '';
|
|
317
|
-
while (!['1', '2', '3'].includes(experienceLevel)) {
|
|
318
|
-
experienceLevel = await prompt(' Enter 1, 2, or 3: ');
|
|
318
|
+
while (!['0', '1', '2', '3'].includes(experienceLevel)) {
|
|
319
|
+
experienceLevel = await prompt(' Enter 0, 1, 2, or 3: ');
|
|
320
|
+
}
|
|
321
|
+
// "You Decide" defaults to Intermediate (balanced)
|
|
322
|
+
if (experienceLevel === '0') {
|
|
323
|
+
console.log(chalk_1.default.magenta(' → AI chose: Intermediate (balanced explanations)\n'));
|
|
324
|
+
experienceLevel = '2';
|
|
319
325
|
}
|
|
320
326
|
const isBeginnerMode = experienceLevel === '1';
|
|
321
327
|
// Select stack with explanations for beginners
|
|
322
328
|
console.log(chalk_1.default.white('\n Select your stack:\n'));
|
|
329
|
+
console.log(chalk_1.default.gray(' 0. ') + chalk_1.default.magenta('You Decide') + chalk_1.default.gray(' - Let AI pick the best option'));
|
|
323
330
|
if (isBeginnerMode) {
|
|
324
331
|
console.log(chalk_1.default.gray(' 1. ') + chalk_1.default.cyan('Next.js + Supabase + Drizzle') + chalk_1.default.green(' (Recommended)'));
|
|
325
332
|
console.log(chalk_1.default.gray(' ') + chalk_1.default.dim('Next.js = Framework for building websites with React'));
|
|
@@ -334,13 +341,18 @@ async function scaffold() {
|
|
|
334
341
|
console.log('');
|
|
335
342
|
}
|
|
336
343
|
else {
|
|
337
|
-
console.log(chalk_1.default.gray(' 1. ') + chalk_1.default.cyan('Next.js + Supabase + Drizzle') + chalk_1.default.
|
|
344
|
+
console.log(chalk_1.default.gray(' 1. ') + chalk_1.default.cyan('Next.js + Supabase + Drizzle') + chalk_1.default.green(' (Recommended)'));
|
|
338
345
|
console.log(chalk_1.default.gray(' 2. ') + chalk_1.default.cyan('Next.js + Prisma') + chalk_1.default.gray(' (Coming soon)'));
|
|
339
346
|
console.log(chalk_1.default.gray(' 3. ') + chalk_1.default.cyan('Express API') + chalk_1.default.gray(' (Coming soon)\n'));
|
|
340
347
|
}
|
|
341
348
|
let stackChoice = '';
|
|
342
|
-
while (!['1', '2', '3'].includes(stackChoice)) {
|
|
343
|
-
stackChoice = await prompt(' Enter 1, 2, or 3: ');
|
|
349
|
+
while (!['0', '1', '2', '3'].includes(stackChoice)) {
|
|
350
|
+
stackChoice = await prompt(' Enter 0, 1, 2, or 3: ');
|
|
351
|
+
}
|
|
352
|
+
// "You Decide" defaults to recommended stack
|
|
353
|
+
if (stackChoice === '0') {
|
|
354
|
+
console.log(chalk_1.default.magenta(' → AI chose: Next.js + Supabase + Drizzle (recommended)\n'));
|
|
355
|
+
stackChoice = '1';
|
|
344
356
|
}
|
|
345
357
|
if (stackChoice !== '1') {
|
|
346
358
|
console.log(chalk_1.default.yellow('\n That stack is coming soon! Using Next.js + Supabase + Drizzle.\n'));
|
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.
|
|
56
|
+
.version('1.4.4');
|
|
57
57
|
// Primary command - one-time setup
|
|
58
58
|
program
|
|
59
59
|
.command('setup')
|
package/package.json
CHANGED
package/src/commands/generate.ts
CHANGED
|
@@ -517,14 +517,21 @@ export async function generate(options: GenerateOptions): Promise<void> {
|
|
|
517
517
|
// If type not provided, ask
|
|
518
518
|
if (!type) {
|
|
519
519
|
console.log(chalk.white(' What would you like to generate?\n'));
|
|
520
|
+
console.log(chalk.gray(' 0. ') + chalk.magenta('You Decide') + chalk.gray(' - Let AI pick based on context'));
|
|
520
521
|
for (const gen of generators) {
|
|
521
522
|
console.log(chalk.gray(` ${gen.key}. `) + chalk.cyan(gen.name) + chalk.gray(` - ${gen.desc}`));
|
|
522
523
|
}
|
|
523
524
|
console.log('');
|
|
524
525
|
|
|
525
526
|
let choice = '';
|
|
526
|
-
while (!['1', '2', '3', '4', '5', '6', '7'].includes(choice)) {
|
|
527
|
-
choice = await prompt(' Enter
|
|
527
|
+
while (!['0', '1', '2', '3', '4', '5', '6', '7'].includes(choice)) {
|
|
528
|
+
choice = await prompt(' Enter 0-7: ');
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// "You Decide" defaults to component (most common)
|
|
532
|
+
if (choice === '0') {
|
|
533
|
+
console.log(chalk.magenta(' → AI chose: component (most common)\n'));
|
|
534
|
+
choice = '1';
|
|
528
535
|
}
|
|
529
536
|
|
|
530
537
|
type = generators.find(g => g.key === choice)?.name;
|
package/src/commands/init.ts
CHANGED
|
@@ -271,13 +271,20 @@ async function confirm(question: string): Promise<boolean> {
|
|
|
271
271
|
|
|
272
272
|
async function selectProjectType(): Promise<{ type: ProjectType; name: string }> {
|
|
273
273
|
console.log(chalk.white('\n What kind of project is this?\n'));
|
|
274
|
+
console.log(chalk.gray(' 0. ') + chalk.magenta('You Decide') + chalk.gray(' - Let AI pick the best option'));
|
|
274
275
|
console.log(chalk.gray(' 1. ') + chalk.cyan('PERSONAL') + chalk.gray(' - Just building for myself'));
|
|
275
276
|
console.log(chalk.gray(' 2. ') + chalk.cyan('CLIENT') + chalk.gray(' - Building for someone else'));
|
|
276
277
|
console.log(chalk.gray(' 3. ') + chalk.cyan('BUSINESS') + chalk.gray(' - My own product/startup\n'));
|
|
277
278
|
|
|
278
279
|
let typeChoice = '';
|
|
279
|
-
while (!['1', '2', '3'].includes(typeChoice)) {
|
|
280
|
-
typeChoice = await prompt(' Enter 1, 2, or 3: ');
|
|
280
|
+
while (!['0', '1', '2', '3'].includes(typeChoice)) {
|
|
281
|
+
typeChoice = await prompt(' Enter 0, 1, 2, or 3: ');
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// "You Decide" defaults to Personal (most common)
|
|
285
|
+
if (typeChoice === '0') {
|
|
286
|
+
console.log(chalk.magenta(' → AI chose: Personal (most flexible)\n'));
|
|
287
|
+
typeChoice = '1';
|
|
281
288
|
}
|
|
282
289
|
|
|
283
290
|
const typeMap: Record<string, ProjectType> = {
|
|
@@ -743,13 +750,20 @@ export async function init(): Promise<void> {
|
|
|
743
750
|
} else {
|
|
744
751
|
console.log(chalk.gray(' A PRD helps the AI understand what you\'re building.\n'));
|
|
745
752
|
console.log(chalk.white(' How would you like to set up your PRD?\n'));
|
|
753
|
+
console.log(chalk.gray(' 0. ') + chalk.magenta('You Decide') + chalk.gray(' - Let AI pick the best option'));
|
|
746
754
|
console.log(chalk.gray(' 1. ') + chalk.cyan('CREATE TEMPLATE') + chalk.gray(' - I\'ll fill it out'));
|
|
747
755
|
console.log(chalk.gray(' 2. ') + chalk.cyan('PASTE CONTENT') + chalk.gray(' - I have requirements ready'));
|
|
748
756
|
console.log(chalk.gray(' 3. ') + chalk.cyan('SKIP FOR NOW') + chalk.gray(' - I\'ll add it later\n'));
|
|
749
757
|
|
|
750
758
|
let prdChoice = '';
|
|
751
|
-
while (!['1', '2', '3'].includes(prdChoice)) {
|
|
752
|
-
prdChoice = await prompt(' Enter 1, 2, or 3: ');
|
|
759
|
+
while (!['0', '1', '2', '3'].includes(prdChoice)) {
|
|
760
|
+
prdChoice = await prompt(' Enter 0, 1, 2, or 3: ');
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
// "You Decide" defaults to creating a template (most helpful)
|
|
764
|
+
if (prdChoice === '0') {
|
|
765
|
+
console.log(chalk.magenta(' → AI chose: Create Template (recommended)\n'));
|
|
766
|
+
prdChoice = '1';
|
|
753
767
|
}
|
|
754
768
|
|
|
755
769
|
if (prdChoice === '1') {
|
package/src/commands/scaffold.ts
CHANGED
|
@@ -290,13 +290,20 @@ export async function scaffold(): Promise<void> {
|
|
|
290
290
|
|
|
291
291
|
// Ask about experience level
|
|
292
292
|
console.log(chalk.white('\n What\'s your experience level?\n'));
|
|
293
|
+
console.log(chalk.gray(' 0. ') + chalk.magenta('You Decide') + chalk.gray(' - Let AI pick the best option'));
|
|
293
294
|
console.log(chalk.gray(' 1. ') + chalk.cyan('Beginner') + chalk.gray(' - New to coding, explain everything'));
|
|
294
295
|
console.log(chalk.gray(' 2. ') + chalk.cyan('Intermediate') + chalk.gray(' - Know some coding, brief explanations'));
|
|
295
296
|
console.log(chalk.gray(' 3. ') + chalk.cyan('Advanced') + chalk.gray(' - Skip explanations, just build\n'));
|
|
296
297
|
|
|
297
298
|
let experienceLevel = '';
|
|
298
|
-
while (!['1', '2', '3'].includes(experienceLevel)) {
|
|
299
|
-
experienceLevel = await prompt(' Enter 1, 2, or 3: ');
|
|
299
|
+
while (!['0', '1', '2', '3'].includes(experienceLevel)) {
|
|
300
|
+
experienceLevel = await prompt(' Enter 0, 1, 2, or 3: ');
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// "You Decide" defaults to Intermediate (balanced)
|
|
304
|
+
if (experienceLevel === '0') {
|
|
305
|
+
console.log(chalk.magenta(' → AI chose: Intermediate (balanced explanations)\n'));
|
|
306
|
+
experienceLevel = '2';
|
|
300
307
|
}
|
|
301
308
|
|
|
302
309
|
const isBeginnerMode = experienceLevel === '1';
|
|
@@ -304,6 +311,7 @@ export async function scaffold(): Promise<void> {
|
|
|
304
311
|
// Select stack with explanations for beginners
|
|
305
312
|
console.log(chalk.white('\n Select your stack:\n'));
|
|
306
313
|
|
|
314
|
+
console.log(chalk.gray(' 0. ') + chalk.magenta('You Decide') + chalk.gray(' - Let AI pick the best option'));
|
|
307
315
|
if (isBeginnerMode) {
|
|
308
316
|
console.log(chalk.gray(' 1. ') + chalk.cyan('Next.js + Supabase + Drizzle') + chalk.green(' (Recommended)'));
|
|
309
317
|
console.log(chalk.gray(' ') + chalk.dim('Next.js = Framework for building websites with React'));
|
|
@@ -317,14 +325,20 @@ export async function scaffold(): Promise<void> {
|
|
|
317
325
|
console.log(chalk.gray(' ') + chalk.dim('Express = Lightweight server, good for APIs without a frontend'));
|
|
318
326
|
console.log('');
|
|
319
327
|
} else {
|
|
320
|
-
console.log(chalk.gray(' 1. ') + chalk.cyan('Next.js + Supabase + Drizzle') + chalk.
|
|
328
|
+
console.log(chalk.gray(' 1. ') + chalk.cyan('Next.js + Supabase + Drizzle') + chalk.green(' (Recommended)'));
|
|
321
329
|
console.log(chalk.gray(' 2. ') + chalk.cyan('Next.js + Prisma') + chalk.gray(' (Coming soon)'));
|
|
322
330
|
console.log(chalk.gray(' 3. ') + chalk.cyan('Express API') + chalk.gray(' (Coming soon)\n'));
|
|
323
331
|
}
|
|
324
332
|
|
|
325
333
|
let stackChoice = '';
|
|
326
|
-
while (!['1', '2', '3'].includes(stackChoice)) {
|
|
327
|
-
stackChoice = await prompt(' Enter 1, 2, or 3: ');
|
|
334
|
+
while (!['0', '1', '2', '3'].includes(stackChoice)) {
|
|
335
|
+
stackChoice = await prompt(' Enter 0, 1, 2, or 3: ');
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// "You Decide" defaults to recommended stack
|
|
339
|
+
if (stackChoice === '0') {
|
|
340
|
+
console.log(chalk.magenta(' → AI chose: Next.js + Supabase + Drizzle (recommended)\n'));
|
|
341
|
+
stackChoice = '1';
|
|
328
342
|
}
|
|
329
343
|
|
|
330
344
|
if (stackChoice !== '1') {
|
package/src/index.ts
CHANGED