ai-sprint-kit 2.1.6 → 2.1.8

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.
Files changed (2) hide show
  1. package/bin/ai-sprint.js +44 -2
  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,23 @@ 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
+ // Write prompt to stderr (unbuffered) for visibility
55
+ process.stderr.write(prompt);
56
+ // Read input using readline
57
+ rl.question('', (answer) => {
58
+ resolve(answer);
59
+ });
60
+ });
61
+ }
62
+
44
63
  program
45
64
  .name('ai-sprint')
46
65
  .description('AI Sprint - Autonomous development framework for Claude Code')
@@ -159,6 +178,27 @@ program
159
178
  // Show final progress summary
160
179
  const prog = progress.getProgress();
161
180
  console.log(chalk.gray(`Completed ${prog.percent}% (${prog.current}/${prog.total} steps)\n`));
181
+
182
+ // Ask if user wants to configure MCP servers
183
+ console.log(chalk.cyan('šŸ“” Configure MCP Servers (Optional)\n'));
184
+ console.log(chalk.gray('MCP servers enhance AI capabilities with web search,'));
185
+ console.log(chalk.gray('library docs, and multimodal AI features.\n'));
186
+
187
+ const setupMcp = await question('Configure MCP servers now? (y/N): ');
188
+ if (setupMcp.toLowerCase() === 'y') {
189
+ console.log();
190
+ rl.close(); // Close ai-sprint's rl to avoid conflicts
191
+ const mcpScript = path.join(targetDir, '.claude', 'scripts', 'setup-mcp.js');
192
+ try {
193
+ const { runMcpSetup } = require(mcpScript);
194
+ await runMcpSetup();
195
+ } catch (error) {
196
+ console.log(chalk.yellow(`\nāš ļø MCP setup skipped. Run later: ai-sprint setup-mcp\n`));
197
+ }
198
+ } else {
199
+ console.log(chalk.gray('\nRun later: ai-sprint setup-mcp\n'));
200
+ rl.close(); // Close readline interface
201
+ }
162
202
  } catch (error) {
163
203
  progress.failStep(2, error.message);
164
204
  cloneSpinner.fail('Installation failed');
@@ -467,7 +507,8 @@ program
467
507
  .action(async (options) => {
468
508
  const scriptPath = path.join(options.dir, '.claude', 'scripts', 'setup-env.js');
469
509
  try {
470
- require(scriptPath);
510
+ const { runEnvSetup } = require(scriptPath);
511
+ await runEnvSetup();
471
512
  } catch (error) {
472
513
  console.error(chalk.red(`\nāŒ Setup failed: ${error.message}\n`));
473
514
  console.log(chalk.yellow('Make sure you have run: ai-sprint init\n'));
@@ -481,7 +522,8 @@ program
481
522
  .action(async (options) => {
482
523
  const scriptPath = path.join(options.dir, '.claude', 'scripts', 'setup-mcp.js');
483
524
  try {
484
- require(scriptPath);
525
+ const { runMcpSetup } = require(scriptPath);
526
+ await runMcpSetup();
485
527
  } catch (error) {
486
528
  console.error(chalk.red(`\nāŒ Setup failed: ${error.message}\n`));
487
529
  console.log(chalk.yellow('Make sure you have run: ai-sprint init\n'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-sprint-kit",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "CLI installer for AI Sprint autonomous development framework - requires license",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {