codebakers 2.3.0 â 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 +331 -208
- package/installers/CodeBakers-Install.bat +207 -0
- package/installers/CodeBakers-Install.command +232 -0
- package/installers/README.md +157 -0
- package/installers/mac/assets/README.txt +31 -0
- package/installers/mac/build-mac-installer.sh +240 -0
- package/installers/windows/CodeBakers.iss +256 -0
- package/installers/windows/assets/README.txt +16 -0
- package/installers/windows/scripts/post-install.bat +15 -0
- package/package.json +1 -1
- package/src/commands/setup.ts +307 -169
- package/src/index.ts +92 -52
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,33 +100,53 @@ async function showMainMenu(): Promise<void> {
|
|
|
100
100
|
// ============================================================================
|
|
101
101
|
|
|
102
102
|
async function showStartMenu(config: Config): Promise<void> {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
{ value: 'website', label: 'đ Build a website', hint: 'Describe it â AI builds it' },
|
|
107
|
-
{ value: 'new', label: 'đ Create new project', hint: 'From scratch with options' },
|
|
108
|
-
{ value: 'prd-maker', label: 'âī¸ Create a PRD', hint: 'Plan before building' },
|
|
109
|
-
{ value: 'build', label: 'đī¸ Build from PRD', hint: 'Have a PRD? Build it now' },
|
|
110
|
-
{ value: 'advisors', label: 'đ Consult advisors', hint: 'AI experts help you plan' },
|
|
111
|
-
{ value: 'divider1', label: chalk.dim('âââââââââââââââââââââââââââââ') },
|
|
112
|
-
{ value: 'integrate', label: 'đ Add integration', hint: 'Stripe, Supabase, etc.' },
|
|
113
|
-
{ value: 'settings', label: 'âī¸ Settings', hint: 'API keys & preferences' },
|
|
114
|
-
{ value: 'help', label: 'â Help' },
|
|
115
|
-
],
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
if (p.isCancel(action)) {
|
|
119
|
-
p.cancel('Goodbye!');
|
|
120
|
-
process.exit(0);
|
|
121
|
-
}
|
|
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'));
|
|
122
106
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
107
|
+
let keepRunning = true;
|
|
108
|
+
|
|
109
|
+
while (keepRunning) {
|
|
110
|
+
const action = await p.select({
|
|
111
|
+
message: 'What would you like to do?',
|
|
112
|
+
options: [
|
|
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.' },
|
|
119
|
+
{ value: 'settings', label: 'âī¸ Settings', hint: 'API keys & preferences' },
|
|
120
|
+
{ value: 'help', label: 'â Help', hint: 'Learn how CodeBakers works' },
|
|
121
|
+
{ value: 'exit', label: 'đĒ Return to terminal', hint: 'Go back to command line' },
|
|
122
|
+
],
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// User pressed Ctrl+C or selected exit
|
|
126
|
+
if (p.isCancel(action) || action === 'exit') {
|
|
127
|
+
console.log('');
|
|
128
|
+
console.log(chalk.cyan(' âââââââââââââââââââââââââââââââââââââââââââââââââ'));
|
|
129
|
+
console.log(chalk.white(' You\'re back in the terminal.'));
|
|
130
|
+
console.log('');
|
|
131
|
+
console.log(chalk.dim(' To start CodeBakers again, type:'));
|
|
132
|
+
console.log(chalk.green(' codebakers'));
|
|
133
|
+
console.log('');
|
|
134
|
+
console.log(chalk.dim(' Quick commands you can run directly:'));
|
|
135
|
+
console.log(chalk.dim(' codebakers website') + chalk.gray(' - Build a website'));
|
|
136
|
+
console.log(chalk.dim(' codebakers code') + chalk.gray(' - Code with AI'));
|
|
137
|
+
console.log(chalk.dim(' codebakers help') + chalk.gray(' - See all commands'));
|
|
138
|
+
console.log(chalk.cyan(' âââââââââââââââââââââââââââââââââââââââââââââââââ'));
|
|
139
|
+
console.log('');
|
|
140
|
+
keepRunning = false;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
128
143
|
|
|
129
|
-
|
|
144
|
+
// Handle the selected action
|
|
145
|
+
await handleAction(action as string, config);
|
|
146
|
+
|
|
147
|
+
// Show a brief pause before showing menu again
|
|
148
|
+
console.log('');
|
|
149
|
+
}
|
|
130
150
|
}
|
|
131
151
|
|
|
132
152
|
// ============================================================================
|
|
@@ -134,34 +154,54 @@ async function showStartMenu(config: Config): Promise<void> {
|
|
|
134
154
|
// ============================================================================
|
|
135
155
|
|
|
136
156
|
async function showProjectMenu(config: Config): Promise<void> {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
{ value: 'code', label: 'đŦ Code with AI', hint: 'Build features, fix bugs' },
|
|
141
|
-
{ value: 'deploy', label: 'đ Deploy', hint: 'Push to production' },
|
|
142
|
-
{ value: 'check', label: 'đ Check code', hint: 'Quality & patterns' },
|
|
143
|
-
{ value: 'fix', label: 'đ§ Fix errors', hint: 'Auto-fix with AI' },
|
|
144
|
-
{ value: 'integrate', label: 'đ Add integration', hint: 'Stripe, Supabase, etc.' },
|
|
145
|
-
{ value: 'generate', label: '⥠Generate', hint: 'Components, pages' },
|
|
146
|
-
{ value: 'divider1', label: chalk.dim('âââââââââââââââââââââââââââââ') },
|
|
147
|
-
{ value: 'new', label: 'đ Start new project', hint: 'Create something else' },
|
|
148
|
-
{ value: 'settings', label: 'âī¸ Settings' },
|
|
149
|
-
{ value: 'help', label: 'â Help' },
|
|
150
|
-
],
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
if (p.isCancel(action)) {
|
|
154
|
-
p.cancel('Goodbye!');
|
|
155
|
-
process.exit(0);
|
|
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'));
|
|
157
160
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
let keepRunning = true;
|
|
162
|
+
|
|
163
|
+
while (keepRunning) {
|
|
164
|
+
const action = await p.select({
|
|
165
|
+
message: 'What would you like to do with this project?',
|
|
166
|
+
options: [
|
|
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' },
|
|
174
|
+
{ value: 'settings', label: 'âī¸ Settings', hint: 'API keys & preferences' },
|
|
175
|
+
{ value: 'help', label: 'â Help', hint: 'Learn how CodeBakers works' },
|
|
176
|
+
{ value: 'exit', label: 'đĒ Return to terminal', hint: 'Go back to command line' },
|
|
177
|
+
],
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// User pressed Ctrl+C or selected exit
|
|
181
|
+
if (p.isCancel(action) || action === 'exit') {
|
|
182
|
+
console.log('');
|
|
183
|
+
console.log(chalk.cyan(' âââââââââââââââââââââââââââââââââââââââââââââââââ'));
|
|
184
|
+
console.log(chalk.white(' You\'re back in the terminal.'));
|
|
185
|
+
console.log('');
|
|
186
|
+
console.log(chalk.dim(' To start CodeBakers again, type:'));
|
|
187
|
+
console.log(chalk.green(' codebakers'));
|
|
188
|
+
console.log('');
|
|
189
|
+
console.log(chalk.dim(' Quick commands you can run directly:'));
|
|
190
|
+
console.log(chalk.dim(' codebakers code') + chalk.gray(' - Code with AI'));
|
|
191
|
+
console.log(chalk.dim(' codebakers deploy') + chalk.gray(' - Deploy your project'));
|
|
192
|
+
console.log(chalk.dim(' codebakers help') + chalk.gray(' - See all commands'));
|
|
193
|
+
console.log(chalk.cyan(' âââââââââââââââââââââââââââââââââââââââââââââââââ'));
|
|
194
|
+
console.log('');
|
|
195
|
+
keepRunning = false;
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
163
198
|
|
|
164
|
-
|
|
199
|
+
// Handle the selected action
|
|
200
|
+
await handleAction(action as string, config);
|
|
201
|
+
|
|
202
|
+
// Show a brief pause before showing menu again
|
|
203
|
+
console.log('');
|
|
204
|
+
}
|
|
165
205
|
}
|
|
166
206
|
|
|
167
207
|
// ============================================================================
|