@codebakers/cli 1.4.2 → 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/install-hook.js +5 -2
- package/dist/commands/mcp-config.js +5 -3
- package/dist/commands/scaffold.js +17 -5
- package/dist/commands/setup.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -3
- package/src/commands/generate.ts +9 -2
- package/src/commands/init.ts +18 -4
- package/src/commands/install-hook.ts +5 -2
- package/src/commands/mcp-config.ts +5 -3
- package/src/commands/scaffold.ts +19 -5
- package/src/commands/setup.ts +1 -1
- 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
|
|
@@ -100,7 +100,9 @@ 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(' ⚠️
|
|
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'));
|
|
104
106
|
}
|
|
105
107
|
catch (error) {
|
|
106
108
|
spinner.fail('Hook installation failed');
|
|
@@ -139,7 +141,8 @@ async function uninstallHook() {
|
|
|
139
141
|
}
|
|
140
142
|
(0, fs_1.writeFileSync)(settingsPath, JSON.stringify(settings, null, 2));
|
|
141
143
|
spinner.succeed('Hook removed successfully!');
|
|
142
|
-
console.log(chalk_1.default.yellow('\n ⚠️
|
|
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'));
|
|
143
146
|
}
|
|
144
147
|
catch (error) {
|
|
145
148
|
spinner.fail('Hook removal failed');
|
|
@@ -132,8 +132,9 @@ 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.
|
|
136
|
-
console.log(chalk_1.default.
|
|
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'));
|
|
137
138
|
}
|
|
138
139
|
catch (error) {
|
|
139
140
|
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
@@ -193,7 +194,8 @@ async function mcpUninstall() {
|
|
|
193
194
|
delete config.mcpServers.codebakers;
|
|
194
195
|
(0, fs_1.writeFileSync)(configPath, JSON.stringify(config, null, 2));
|
|
195
196
|
console.log(chalk_1.default.green(' Removed from global config.\n'));
|
|
196
|
-
console.log(chalk_1.default.
|
|
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'));
|
|
197
199
|
}
|
|
198
200
|
else {
|
|
199
201
|
console.log(chalk_1.default.gray(' CodeBakers not found in global config.\n'));
|
|
@@ -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/commands/setup.js
CHANGED
|
@@ -96,7 +96,7 @@ function showFinalInstructions() {
|
|
|
96
96
|
console.log(chalk_1.default.yellow(' ⚠️ Could not auto-install MCP server.\n'));
|
|
97
97
|
console.log(chalk_1.default.white(' Run this command manually in your terminal:\n'));
|
|
98
98
|
console.log(chalk_1.default.bgBlue.white('\n ' + mcpCmd + ' \n'));
|
|
99
|
-
console.log(chalk_1.default.
|
|
99
|
+
console.log(chalk_1.default.yellow('\n ⚠️ Then close this terminal and open a new one in your project.\n'));
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
}
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebakers/cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "CodeBakers CLI - Production patterns for AI-assisted development",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
"chalk": "^5.3.0",
|
|
30
30
|
"commander": "^12.1.0",
|
|
31
31
|
"conf": "^13.0.1",
|
|
32
|
-
"ora": "^8.1.1"
|
|
33
|
-
"openai": "^4.77.0"
|
|
32
|
+
"ora": "^8.1.1"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@types/node": "^20.10.0",
|
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') {
|
|
@@ -106,7 +106,9 @@ 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(' ⚠️
|
|
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'));
|
|
110
112
|
} catch (error) {
|
|
111
113
|
spinner.fail('Hook installation failed');
|
|
112
114
|
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
@@ -154,7 +156,8 @@ export async function uninstallHook(): Promise<void> {
|
|
|
154
156
|
writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
155
157
|
|
|
156
158
|
spinner.succeed('Hook removed successfully!');
|
|
157
|
-
console.log(chalk.yellow('\n ⚠️
|
|
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'));
|
|
158
161
|
} catch (error) {
|
|
159
162
|
spinner.fail('Hook removal failed');
|
|
160
163
|
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
@@ -158,8 +158,9 @@ 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.
|
|
162
|
-
console.log(chalk.
|
|
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'));
|
|
163
164
|
} catch (error) {
|
|
164
165
|
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
165
166
|
console.log(chalk.red(`\n Error: ${message}\n`));
|
|
@@ -221,7 +222,8 @@ export async function mcpUninstall(): Promise<void> {
|
|
|
221
222
|
delete config.mcpServers.codebakers;
|
|
222
223
|
writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
223
224
|
console.log(chalk.green(' Removed from global config.\n'));
|
|
224
|
-
console.log(chalk.
|
|
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'));
|
|
225
227
|
} else {
|
|
226
228
|
console.log(chalk.gray(' CodeBakers not found in global config.\n'));
|
|
227
229
|
console.log(chalk.gray(' To remove from Claude Code, run:\n'));
|
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/commands/setup.ts
CHANGED
|
@@ -104,7 +104,7 @@ function showFinalInstructions(): void {
|
|
|
104
104
|
console.log(chalk.yellow(' ⚠️ Could not auto-install MCP server.\n'));
|
|
105
105
|
console.log(chalk.white(' Run this command manually in your terminal:\n'));
|
|
106
106
|
console.log(chalk.bgBlue.white('\n ' + mcpCmd + ' \n'));
|
|
107
|
-
console.log(chalk.
|
|
107
|
+
console.log(chalk.yellow('\n ⚠️ Then close this terminal and open a new one in your project.\n'));
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
}
|
package/src/index.ts
CHANGED