ai-sprint-kit 2.1.5 ā 2.1.7
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/bin/ai-sprint.js +39 -2
- package/package.json +1 -1
package/bin/ai-sprint.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
const { program } = require('commander');
|
|
4
4
|
const chalk = require('chalk');
|
|
5
5
|
const ora = require('ora');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const readline = require('readline');
|
|
6
8
|
const {
|
|
7
9
|
checkGhCliInstalled,
|
|
8
10
|
checkGhAuthenticated,
|
|
@@ -41,6 +43,18 @@ const {
|
|
|
41
43
|
const messages = require('../lib/messages');
|
|
42
44
|
const packageJson = require('../package.json');
|
|
43
45
|
|
|
46
|
+
// Create readline interface for user prompts
|
|
47
|
+
const rl = readline.createInterface({
|
|
48
|
+
input: process.stdin,
|
|
49
|
+
output: process.stdout
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
function question(prompt) {
|
|
53
|
+
return new Promise(resolve => {
|
|
54
|
+
rl.question(prompt, resolve);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
program
|
|
45
59
|
.name('ai-sprint')
|
|
46
60
|
.description('AI Sprint - Autonomous development framework for Claude Code')
|
|
@@ -159,6 +173,27 @@ program
|
|
|
159
173
|
// Show final progress summary
|
|
160
174
|
const prog = progress.getProgress();
|
|
161
175
|
console.log(chalk.gray(`Completed ${prog.percent}% (${prog.current}/${prog.total} steps)\n`));
|
|
176
|
+
|
|
177
|
+
// Ask if user wants to configure MCP servers
|
|
178
|
+
console.log(chalk.cyan('š” Configure MCP Servers (Optional)\n'));
|
|
179
|
+
console.log(chalk.gray('MCP servers enhance AI capabilities with web search,'));
|
|
180
|
+
console.log(chalk.gray('library docs, and multimodal AI features.\n'));
|
|
181
|
+
|
|
182
|
+
const setupMcp = await question('Configure MCP servers now? (y/N): ');
|
|
183
|
+
if (setupMcp.toLowerCase() === 'y') {
|
|
184
|
+
console.log();
|
|
185
|
+
rl.close(); // Close ai-sprint's rl to avoid conflicts
|
|
186
|
+
const mcpScript = path.join(targetDir, '.claude', 'scripts', 'setup-mcp.js');
|
|
187
|
+
try {
|
|
188
|
+
const { runMcpSetup } = require(mcpScript);
|
|
189
|
+
await runMcpSetup();
|
|
190
|
+
} catch (error) {
|
|
191
|
+
console.log(chalk.yellow(`\nā ļø MCP setup skipped. Run later: ai-sprint setup-mcp\n`));
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
console.log(chalk.gray('\nRun later: ai-sprint setup-mcp\n'));
|
|
195
|
+
rl.close(); // Close readline interface
|
|
196
|
+
}
|
|
162
197
|
} catch (error) {
|
|
163
198
|
progress.failStep(2, error.message);
|
|
164
199
|
cloneSpinner.fail('Installation failed');
|
|
@@ -467,7 +502,8 @@ program
|
|
|
467
502
|
.action(async (options) => {
|
|
468
503
|
const scriptPath = path.join(options.dir, '.claude', 'scripts', 'setup-env.js');
|
|
469
504
|
try {
|
|
470
|
-
require(scriptPath);
|
|
505
|
+
const { runEnvSetup } = require(scriptPath);
|
|
506
|
+
await runEnvSetup();
|
|
471
507
|
} catch (error) {
|
|
472
508
|
console.error(chalk.red(`\nā Setup failed: ${error.message}\n`));
|
|
473
509
|
console.log(chalk.yellow('Make sure you have run: ai-sprint init\n'));
|
|
@@ -481,7 +517,8 @@ program
|
|
|
481
517
|
.action(async (options) => {
|
|
482
518
|
const scriptPath = path.join(options.dir, '.claude', 'scripts', 'setup-mcp.js');
|
|
483
519
|
try {
|
|
484
|
-
require(scriptPath);
|
|
520
|
+
const { runMcpSetup } = require(scriptPath);
|
|
521
|
+
await runMcpSetup();
|
|
485
522
|
} catch (error) {
|
|
486
523
|
console.error(chalk.red(`\nā Setup failed: ${error.message}\n`));
|
|
487
524
|
console.log(chalk.yellow('Make sure you have run: ai-sprint init\n'));
|