codebakers 2.3.4 → 2.3.5
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 +33 -33
- package/package.json +1 -1
- package/src/index.ts +41 -39
package/dist/index.js
CHANGED
|
@@ -7632,7 +7632,7 @@ If unclear between multiple commands, use the most likely one with lower confide
|
|
|
7632
7632
|
}
|
|
7633
7633
|
|
|
7634
7634
|
// src/index.ts
|
|
7635
|
-
var VERSION2 = "2.3.
|
|
7635
|
+
var VERSION2 = "2.3.5";
|
|
7636
7636
|
var logo = `
|
|
7637
7637
|
\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
|
|
7638
7638
|
\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
|
|
@@ -7674,21 +7674,22 @@ async function showMainMenu() {
|
|
|
7674
7674
|
}
|
|
7675
7675
|
}
|
|
7676
7676
|
async function showStartMenu(config) {
|
|
7677
|
-
|
|
7677
|
+
console.log(chalk21.cyan("\n \u2139\uFE0F This folder doesn't have a project yet."));
|
|
7678
|
+
console.log(chalk21.dim(" Use the arrow keys to select an option, then press Enter.\n"));
|
|
7679
|
+
let keepRunning = true;
|
|
7680
|
+
while (keepRunning) {
|
|
7678
7681
|
const action = await p21.select({
|
|
7679
7682
|
message: "What would you like to do?",
|
|
7680
7683
|
options: [
|
|
7681
|
-
{ value: "website", label: "\u{1F310} Build a website", hint: "Describe it
|
|
7682
|
-
{ value: "new", label: "\u{1F195} Create new project", hint: "Start
|
|
7683
|
-
{ value: "prd-maker", label: "\u270F\uFE0F
|
|
7684
|
-
{ value: "build", label: "\u{1F3D7}\uFE0F Build from
|
|
7685
|
-
{ value: "advisors", label: "\u{1F31F}
|
|
7686
|
-
{ value: "
|
|
7687
|
-
{ value: "integrate", label: "\u{1F50C} Add integration", hint: "Stripe, Supabase, Twilio, etc." },
|
|
7684
|
+
{ value: "website", label: "\u{1F310} Build a website", hint: "Describe it, AI builds it" },
|
|
7685
|
+
{ value: "new", label: "\u{1F195} Create new project", hint: "Start with Next.js, React, etc." },
|
|
7686
|
+
{ value: "prd-maker", label: "\u270F\uFE0F Plan my project", hint: "Create a detailed plan first" },
|
|
7687
|
+
{ value: "build", label: "\u{1F3D7}\uFE0F Build from plan", hint: "I already have a PRD file" },
|
|
7688
|
+
{ value: "advisors", label: "\u{1F31F} Get expert advice", hint: "AI consultants help you decide" },
|
|
7689
|
+
{ value: "integrate", label: "\u{1F50C} Add a service", hint: "Stripe, Supabase, Auth, etc." },
|
|
7688
7690
|
{ value: "settings", label: "\u2699\uFE0F Settings", hint: "API keys & preferences" },
|
|
7689
|
-
{ value: "help", label: "\u2753 Help", hint: "Learn how
|
|
7690
|
-
{ value: "
|
|
7691
|
-
{ value: "exit", label: "\u{1F6AA} Return to terminal", hint: "Exit CodeBakers" }
|
|
7691
|
+
{ value: "help", label: "\u2753 Help", hint: "Learn how CodeBakers works" },
|
|
7692
|
+
{ value: "exit", label: "\u{1F6AA} Return to terminal", hint: "Go back to command line" }
|
|
7692
7693
|
]
|
|
7693
7694
|
});
|
|
7694
7695
|
if (p21.isCancel(action) || action === "exit") {
|
|
@@ -7705,31 +7706,31 @@ async function showStartMenu(config) {
|
|
|
7705
7706
|
console.log(chalk21.dim(" codebakers help") + chalk21.gray(" - See all commands"));
|
|
7706
7707
|
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"));
|
|
7707
7708
|
console.log("");
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
if (action === "divider1" || action === "divider2") {
|
|
7711
|
-
continue;
|
|
7709
|
+
keepRunning = false;
|
|
7710
|
+
break;
|
|
7712
7711
|
}
|
|
7713
7712
|
await handleAction(action, config);
|
|
7713
|
+
console.log("");
|
|
7714
7714
|
}
|
|
7715
7715
|
}
|
|
7716
7716
|
async function showProjectMenu(config) {
|
|
7717
|
-
|
|
7717
|
+
console.log(chalk21.cyan("\n \u2139\uFE0F I found an existing project in this folder."));
|
|
7718
|
+
console.log(chalk21.dim(" Use the arrow keys to select an option, then press Enter.\n"));
|
|
7719
|
+
let keepRunning = true;
|
|
7720
|
+
while (keepRunning) {
|
|
7718
7721
|
const action = await p21.select({
|
|
7719
|
-
message: "What would you like to do?",
|
|
7722
|
+
message: "What would you like to do with this project?",
|
|
7720
7723
|
options: [
|
|
7721
|
-
{ value: "code", label: "\u{1F4AC} Code with AI", hint: "
|
|
7722
|
-
{ value: "deploy", label: "\u{1F680} Deploy", hint: "
|
|
7723
|
-
{ value: "check", label: "\u{1F50D} Check code", hint: "
|
|
7724
|
-
{ value: "fix", label: "\u{1F527} Fix errors", hint: "AI
|
|
7725
|
-
{ value: "integrate", label: "\u{1F50C} Add
|
|
7726
|
-
{ value: "generate", label: "\u26A1
|
|
7727
|
-
{ value: "
|
|
7728
|
-
{ value: "new", label: "\u{1F195} Start new project", hint: "Create a different project" },
|
|
7724
|
+
{ value: "code", label: "\u{1F4AC} Code with AI", hint: "Tell AI what to build or fix" },
|
|
7725
|
+
{ value: "deploy", label: "\u{1F680} Deploy to production", hint: "Make your site live" },
|
|
7726
|
+
{ value: "check", label: "\u{1F50D} Check my code", hint: "Find issues & improvements" },
|
|
7727
|
+
{ value: "fix", label: "\u{1F527} Fix errors for me", hint: "AI repairs broken code" },
|
|
7728
|
+
{ value: "integrate", label: "\u{1F50C} Add a service", hint: "Stripe, Supabase, Auth, etc." },
|
|
7729
|
+
{ value: "generate", label: "\u26A1 Create new files", hint: "Components, pages, APIs" },
|
|
7730
|
+
{ value: "new", label: "\u{1F195} Start fresh project", hint: "Begin something new" },
|
|
7729
7731
|
{ value: "settings", label: "\u2699\uFE0F Settings", hint: "API keys & preferences" },
|
|
7730
|
-
{ value: "help", label: "\u2753 Help", hint: "Learn how
|
|
7731
|
-
{ value: "
|
|
7732
|
-
{ value: "exit", label: "\u{1F6AA} Return to terminal", hint: "Exit CodeBakers" }
|
|
7732
|
+
{ value: "help", label: "\u2753 Help", hint: "Learn how CodeBakers works" },
|
|
7733
|
+
{ value: "exit", label: "\u{1F6AA} Return to terminal", hint: "Go back to command line" }
|
|
7733
7734
|
]
|
|
7734
7735
|
});
|
|
7735
7736
|
if (p21.isCancel(action) || action === "exit") {
|
|
@@ -7746,12 +7747,11 @@ async function showProjectMenu(config) {
|
|
|
7746
7747
|
console.log(chalk21.dim(" codebakers help") + chalk21.gray(" - See all commands"));
|
|
7747
7748
|
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"));
|
|
7748
7749
|
console.log("");
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
if (action === "divider1" || action === "divider2") {
|
|
7752
|
-
continue;
|
|
7750
|
+
keepRunning = false;
|
|
7751
|
+
break;
|
|
7753
7752
|
}
|
|
7754
7753
|
await handleAction(action, config);
|
|
7754
|
+
console.log("");
|
|
7755
7755
|
}
|
|
7756
7756
|
}
|
|
7757
7757
|
async function handleAction(action, config) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -30,7 +30,7 @@ import { integrateCommand, INTEGRATIONS } from './commands/integrate.js';
|
|
|
30
30
|
import { websiteCommand } from './commands/website.js';
|
|
31
31
|
import { parseNaturalLanguage } from './utils/nlp.js';
|
|
32
32
|
|
|
33
|
-
const VERSION = '2.3.
|
|
33
|
+
const VERSION = '2.3.5';
|
|
34
34
|
|
|
35
35
|
// ASCII art logo
|
|
36
36
|
const logo = `
|
|
@@ -100,21 +100,25 @@ async function showMainMenu(): Promise<void> {
|
|
|
100
100
|
// ============================================================================
|
|
101
101
|
|
|
102
102
|
async function showStartMenu(config: Config): Promise<void> {
|
|
103
|
-
|
|
103
|
+
// Show helpful context message
|
|
104
|
+
console.log(chalk.cyan('\n ℹ️ This folder doesn\'t have a project yet.'));
|
|
105
|
+
console.log(chalk.dim(' Use the arrow keys to select an option, then press Enter.\n'));
|
|
106
|
+
|
|
107
|
+
let keepRunning = true;
|
|
108
|
+
|
|
109
|
+
while (keepRunning) {
|
|
104
110
|
const action = await p.select({
|
|
105
111
|
message: 'What would you like to do?',
|
|
106
112
|
options: [
|
|
107
|
-
{ value: 'website', label: '🌐 Build a website', hint: 'Describe it
|
|
108
|
-
{ value: 'new', label: '🆕 Create new project', hint: 'Start
|
|
109
|
-
{ value: 'prd-maker', label: '✏️
|
|
110
|
-
{ value: 'build', label: '🏗️ Build from
|
|
111
|
-
{ value: 'advisors', label: '🌟
|
|
112
|
-
{ value: '
|
|
113
|
-
{ value: 'integrate', label: '🔌 Add integration', hint: 'Stripe, Supabase, Twilio, etc.' },
|
|
113
|
+
{ value: 'website', label: '🌐 Build a website', hint: 'Describe it, AI builds it' },
|
|
114
|
+
{ value: 'new', label: '🆕 Create new project', hint: 'Start with Next.js, React, etc.' },
|
|
115
|
+
{ value: 'prd-maker', label: '✏️ Plan my project', hint: 'Create a detailed plan first' },
|
|
116
|
+
{ value: 'build', label: '🏗️ Build from plan', hint: 'I already have a PRD file' },
|
|
117
|
+
{ value: 'advisors', label: '🌟 Get expert advice', hint: 'AI consultants help you decide' },
|
|
118
|
+
{ value: 'integrate', label: '🔌 Add a service', hint: 'Stripe, Supabase, Auth, etc.' },
|
|
114
119
|
{ value: 'settings', label: '⚙️ Settings', hint: 'API keys & preferences' },
|
|
115
|
-
{ value: 'help', label: '❓ Help', hint: 'Learn how
|
|
116
|
-
{ value: '
|
|
117
|
-
{ value: 'exit', label: '🚪 Return to terminal', hint: 'Exit CodeBakers' },
|
|
120
|
+
{ value: 'help', label: '❓ Help', hint: 'Learn how CodeBakers works' },
|
|
121
|
+
{ value: 'exit', label: '🚪 Return to terminal', hint: 'Go back to command line' },
|
|
118
122
|
],
|
|
119
123
|
});
|
|
120
124
|
|
|
@@ -133,18 +137,15 @@ async function showStartMenu(config: Config): Promise<void> {
|
|
|
133
137
|
console.log(chalk.dim(' codebakers help') + chalk.gray(' - See all commands'));
|
|
134
138
|
console.log(chalk.cyan(' ─────────────────────────────────────────────────'));
|
|
135
139
|
console.log('');
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
// Handle dividers - just continue the loop
|
|
140
|
-
if (action === 'divider1' || action === 'divider2') {
|
|
141
|
-
continue;
|
|
140
|
+
keepRunning = false;
|
|
141
|
+
break;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
// Handle the selected action
|
|
145
145
|
await handleAction(action as string, config);
|
|
146
146
|
|
|
147
|
-
//
|
|
147
|
+
// Show a brief pause before showing menu again
|
|
148
|
+
console.log('');
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
151
|
|
|
@@ -153,22 +154,26 @@ async function showStartMenu(config: Config): Promise<void> {
|
|
|
153
154
|
// ============================================================================
|
|
154
155
|
|
|
155
156
|
async function showProjectMenu(config: Config): Promise<void> {
|
|
156
|
-
|
|
157
|
+
// Show helpful context message
|
|
158
|
+
console.log(chalk.cyan('\n ℹ️ I found an existing project in this folder.'));
|
|
159
|
+
console.log(chalk.dim(' Use the arrow keys to select an option, then press Enter.\n'));
|
|
160
|
+
|
|
161
|
+
let keepRunning = true;
|
|
162
|
+
|
|
163
|
+
while (keepRunning) {
|
|
157
164
|
const action = await p.select({
|
|
158
|
-
message: 'What would you like to do?',
|
|
165
|
+
message: 'What would you like to do with this project?',
|
|
159
166
|
options: [
|
|
160
|
-
{ value: 'code', label: '💬 Code with AI', hint: '
|
|
161
|
-
{ value: 'deploy', label: '🚀 Deploy', hint: '
|
|
162
|
-
{ value: 'check', label: '🔍 Check code', hint: '
|
|
163
|
-
{ value: 'fix', label: '🔧 Fix errors', hint: 'AI
|
|
164
|
-
{ value: 'integrate', label: '🔌 Add
|
|
165
|
-
{ value: 'generate', label: '⚡
|
|
166
|
-
{ value: '
|
|
167
|
-
{ value: 'new', label: '🆕 Start new project', hint: 'Create a different project' },
|
|
167
|
+
{ value: 'code', label: '💬 Code with AI', hint: 'Tell AI what to build or fix' },
|
|
168
|
+
{ value: 'deploy', label: '🚀 Deploy to production', hint: 'Make your site live' },
|
|
169
|
+
{ value: 'check', label: '🔍 Check my code', hint: 'Find issues & improvements' },
|
|
170
|
+
{ value: 'fix', label: '🔧 Fix errors for me', hint: 'AI repairs broken code' },
|
|
171
|
+
{ value: 'integrate', label: '🔌 Add a service', hint: 'Stripe, Supabase, Auth, etc.' },
|
|
172
|
+
{ value: 'generate', label: '⚡ Create new files', hint: 'Components, pages, APIs' },
|
|
173
|
+
{ value: 'new', label: '🆕 Start fresh project', hint: 'Begin something new' },
|
|
168
174
|
{ value: 'settings', label: '⚙️ Settings', hint: 'API keys & preferences' },
|
|
169
|
-
{ value: 'help', label: '❓ Help', hint: 'Learn how
|
|
170
|
-
{ value: '
|
|
171
|
-
{ value: 'exit', label: '🚪 Return to terminal', hint: 'Exit CodeBakers' },
|
|
175
|
+
{ value: 'help', label: '❓ Help', hint: 'Learn how CodeBakers works' },
|
|
176
|
+
{ value: 'exit', label: '🚪 Return to terminal', hint: 'Go back to command line' },
|
|
172
177
|
],
|
|
173
178
|
});
|
|
174
179
|
|
|
@@ -187,18 +192,15 @@ async function showProjectMenu(config: Config): Promise<void> {
|
|
|
187
192
|
console.log(chalk.dim(' codebakers help') + chalk.gray(' - See all commands'));
|
|
188
193
|
console.log(chalk.cyan(' ─────────────────────────────────────────────────'));
|
|
189
194
|
console.log('');
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
// Handle dividers - just continue the loop
|
|
194
|
-
if (action === 'divider1' || action === 'divider2') {
|
|
195
|
-
continue;
|
|
195
|
+
keepRunning = false;
|
|
196
|
+
break;
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
// Handle the selected action
|
|
199
200
|
await handleAction(action as string, config);
|
|
200
201
|
|
|
201
|
-
//
|
|
202
|
+
// Show a brief pause before showing menu again
|
|
203
|
+
console.log('');
|
|
202
204
|
}
|
|
203
205
|
}
|
|
204
206
|
|