@wundr.io/cli 1.0.0 → 1.0.3

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 (224) hide show
  1. package/README.md +696 -280
  2. package/dist/ai/ai-service.d.ts +2 -2
  3. package/dist/ai/ai-service.d.ts.map +1 -1
  4. package/dist/ai/ai-service.js +1 -1
  5. package/dist/ai/ai-service.js.map +1 -1
  6. package/dist/ai/claude-client.d.ts.map +1 -1
  7. package/dist/ai/claude-client.js +2 -1
  8. package/dist/ai/claude-client.js.map +1 -1
  9. package/dist/ai/conversation-manager.d.ts +2 -2
  10. package/dist/ai/conversation-manager.d.ts.map +1 -1
  11. package/dist/ai/conversation-manager.js +5 -3
  12. package/dist/ai/conversation-manager.js.map +1 -1
  13. package/dist/cli.d.ts.map +1 -1
  14. package/dist/cli.js +32 -13
  15. package/dist/cli.js.map +1 -1
  16. package/dist/commands/ai.d.ts +3 -3
  17. package/dist/commands/ai.d.ts.map +1 -1
  18. package/dist/commands/ai.js +2 -2
  19. package/dist/commands/ai.js.map +1 -1
  20. package/dist/commands/alignment.d.ts +78 -0
  21. package/dist/commands/alignment.d.ts.map +1 -0
  22. package/dist/commands/alignment.js +817 -0
  23. package/dist/commands/alignment.js.map +1 -0
  24. package/dist/commands/analyze-optimized.d.ts.map +1 -1
  25. package/dist/commands/analyze-optimized.js +9 -6
  26. package/dist/commands/analyze-optimized.js.map +1 -1
  27. package/dist/commands/analyze.d.ts +3 -3
  28. package/dist/commands/analyze.d.ts.map +1 -1
  29. package/dist/commands/analyze.js +2 -2
  30. package/dist/commands/analyze.js.map +1 -1
  31. package/dist/commands/batch.d.ts +3 -3
  32. package/dist/commands/batch.d.ts.map +1 -1
  33. package/dist/commands/batch.js +7 -7
  34. package/dist/commands/batch.js.map +1 -1
  35. package/dist/commands/chat.d.ts +3 -3
  36. package/dist/commands/chat.d.ts.map +1 -1
  37. package/dist/commands/chat.js +3 -3
  38. package/dist/commands/chat.js.map +1 -1
  39. package/dist/commands/claude-init.d.ts +1 -1
  40. package/dist/commands/claude-init.d.ts.map +1 -1
  41. package/dist/commands/claude-init.js +11 -7
  42. package/dist/commands/claude-init.js.map +1 -1
  43. package/dist/commands/claude-setup.d.ts +88 -1
  44. package/dist/commands/claude-setup.d.ts.map +1 -1
  45. package/dist/commands/claude-setup.js +549 -46
  46. package/dist/commands/claude-setup.js.map +1 -1
  47. package/dist/commands/computer-setup-commands.d.ts +17 -3
  48. package/dist/commands/computer-setup-commands.d.ts.map +1 -1
  49. package/dist/commands/computer-setup-commands.js +145 -3
  50. package/dist/commands/computer-setup-commands.js.map +1 -1
  51. package/dist/commands/computer-setup.d.ts.map +1 -1
  52. package/dist/commands/computer-setup.js +372 -4
  53. package/dist/commands/computer-setup.js.map +1 -1
  54. package/dist/commands/create-command.d.ts.map +1 -1
  55. package/dist/commands/create-command.js +3 -3
  56. package/dist/commands/create-command.js.map +1 -1
  57. package/dist/commands/create.d.ts +3 -3
  58. package/dist/commands/create.d.ts.map +1 -1
  59. package/dist/commands/create.js +3 -3
  60. package/dist/commands/create.js.map +1 -1
  61. package/dist/commands/dashboard.d.ts +3 -3
  62. package/dist/commands/dashboard.d.ts.map +1 -1
  63. package/dist/commands/dashboard.js +4 -3
  64. package/dist/commands/dashboard.js.map +1 -1
  65. package/dist/commands/govern.d.ts +3 -3
  66. package/dist/commands/govern.d.ts.map +1 -1
  67. package/dist/commands/govern.js +4 -3
  68. package/dist/commands/govern.js.map +1 -1
  69. package/dist/commands/governance.d.ts +17 -0
  70. package/dist/commands/governance.d.ts.map +1 -0
  71. package/dist/commands/governance.js +703 -0
  72. package/dist/commands/governance.js.map +1 -0
  73. package/dist/commands/guardian.d.ts +20 -0
  74. package/dist/commands/guardian.d.ts.map +1 -0
  75. package/dist/commands/guardian.js +597 -0
  76. package/dist/commands/guardian.js.map +1 -0
  77. package/dist/commands/init.d.ts +7 -3
  78. package/dist/commands/init.d.ts.map +1 -1
  79. package/dist/commands/init.js +71 -5
  80. package/dist/commands/init.js.map +1 -1
  81. package/dist/commands/performance-optimizer.d.ts +2 -2
  82. package/dist/commands/performance-optimizer.d.ts.map +1 -1
  83. package/dist/commands/performance-optimizer.js +8 -7
  84. package/dist/commands/performance-optimizer.js.map +1 -1
  85. package/dist/commands/plugins.d.ts +3 -3
  86. package/dist/commands/plugins.d.ts.map +1 -1
  87. package/dist/commands/plugins.js +2 -2
  88. package/dist/commands/plugins.js.map +1 -1
  89. package/dist/commands/rag.d.ts +7 -0
  90. package/dist/commands/rag.d.ts.map +1 -0
  91. package/dist/commands/rag.js +748 -0
  92. package/dist/commands/rag.js.map +1 -0
  93. package/dist/commands/session.d.ts +41 -0
  94. package/dist/commands/session.d.ts.map +1 -0
  95. package/dist/commands/session.js +441 -0
  96. package/dist/commands/session.js.map +1 -0
  97. package/dist/commands/setup.d.ts +3 -3
  98. package/dist/commands/setup.d.ts.map +1 -1
  99. package/dist/commands/setup.js +1 -3
  100. package/dist/commands/setup.js.map +1 -1
  101. package/dist/commands/test-init.d.ts.map +1 -1
  102. package/dist/commands/test-init.js +2 -2
  103. package/dist/commands/test-init.js.map +1 -1
  104. package/dist/commands/test.d.ts.map +1 -1
  105. package/dist/commands/test.js +2 -2
  106. package/dist/commands/test.js.map +1 -1
  107. package/dist/commands/vp.d.ts +7 -0
  108. package/dist/commands/vp.d.ts.map +1 -0
  109. package/dist/commands/vp.js +571 -0
  110. package/dist/commands/vp.js.map +1 -0
  111. package/dist/commands/watch.d.ts +3 -3
  112. package/dist/commands/watch.d.ts.map +1 -1
  113. package/dist/commands/watch.js +10 -7
  114. package/dist/commands/watch.js.map +1 -1
  115. package/dist/commands/worktree.d.ts +63 -0
  116. package/dist/commands/worktree.d.ts.map +1 -0
  117. package/dist/commands/worktree.js +774 -0
  118. package/dist/commands/worktree.js.map +1 -0
  119. package/dist/context/context-manager.d.ts +1 -1
  120. package/dist/context/context-manager.d.ts.map +1 -1
  121. package/dist/context/context-manager.js +1 -1
  122. package/dist/context/context-manager.js.map +1 -1
  123. package/dist/context/session-manager.d.ts +2 -2
  124. package/dist/context/session-manager.d.ts.map +1 -1
  125. package/dist/context/session-manager.js +9 -5
  126. package/dist/context/session-manager.js.map +1 -1
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +1 -1
  129. package/dist/index.js.map +1 -1
  130. package/dist/interactive/interactive-mode.d.ts +2 -2
  131. package/dist/interactive/interactive-mode.d.ts.map +1 -1
  132. package/dist/interactive/interactive-mode.js +6 -4
  133. package/dist/interactive/interactive-mode.js.map +1 -1
  134. package/dist/nlp/command-mapper.d.ts +1 -1
  135. package/dist/nlp/command-mapper.d.ts.map +1 -1
  136. package/dist/nlp/command-mapper.js +3 -2
  137. package/dist/nlp/command-mapper.js.map +1 -1
  138. package/dist/nlp/command-parser.d.ts +1 -1
  139. package/dist/nlp/command-parser.d.ts.map +1 -1
  140. package/dist/nlp/command-parser.js +2 -1
  141. package/dist/nlp/command-parser.js.map +1 -1
  142. package/dist/nlp/intent-parser.d.ts +1 -1
  143. package/dist/nlp/intent-parser.d.ts.map +1 -1
  144. package/dist/nlp/intent-parser.js +14 -9
  145. package/dist/nlp/intent-parser.js.map +1 -1
  146. package/dist/plugins/plugin-manager.d.ts +2 -2
  147. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  148. package/dist/plugins/plugin-manager.js +3 -3
  149. package/dist/plugins/plugin-manager.js.map +1 -1
  150. package/dist/types/index.d.ts +1 -1
  151. package/dist/types/index.d.ts.map +1 -1
  152. package/dist/utils/backup-rollback-manager.d.ts +72 -0
  153. package/dist/utils/backup-rollback-manager.d.ts.map +1 -0
  154. package/dist/utils/backup-rollback-manager.js +289 -0
  155. package/dist/utils/backup-rollback-manager.js.map +1 -0
  156. package/dist/utils/claude-config-installer.d.ts +94 -0
  157. package/dist/utils/claude-config-installer.d.ts.map +1 -0
  158. package/dist/utils/claude-config-installer.js +628 -0
  159. package/dist/utils/claude-config-installer.js.map +1 -0
  160. package/dist/utils/config-manager.d.ts +1 -1
  161. package/dist/utils/config-manager.d.ts.map +1 -1
  162. package/dist/utils/config-manager.js +5 -5
  163. package/dist/utils/config-manager.js.map +1 -1
  164. package/dist/utils/error-handler.d.ts +1 -1
  165. package/dist/utils/error-handler.d.ts.map +1 -1
  166. package/dist/utils/error-handler.js.map +1 -1
  167. package/dist/utils/logger.d.ts +1 -1
  168. package/dist/utils/logger.d.ts.map +1 -1
  169. package/dist/utils/logger.js +22 -11
  170. package/dist/utils/logger.js.map +1 -1
  171. package/package.json +26 -7
  172. package/src/ai/ai-service.ts +22 -19
  173. package/src/ai/claude-client.ts +20 -16
  174. package/src/ai/conversation-manager.ts +37 -30
  175. package/src/cli.ts +42 -13
  176. package/src/commands/ai.ts +59 -57
  177. package/src/commands/alignment.ts +1212 -0
  178. package/src/commands/analyze-optimized.ts +70 -62
  179. package/src/commands/analyze.ts +22 -20
  180. package/src/commands/batch.ts +41 -38
  181. package/src/commands/chat.ts +37 -34
  182. package/src/commands/claude-init.ts +38 -30
  183. package/src/commands/claude-setup.ts +692 -97
  184. package/src/commands/computer-setup-commands.ts +203 -37
  185. package/src/commands/computer-setup.ts +474 -4
  186. package/src/commands/create-command.ts +7 -7
  187. package/src/commands/create.ts +36 -33
  188. package/src/commands/dashboard.ts +33 -28
  189. package/src/commands/govern.ts +34 -29
  190. package/src/commands/governance.ts +1005 -0
  191. package/src/commands/guardian.ts +887 -0
  192. package/src/commands/init.ts +112 -22
  193. package/src/commands/performance-optimizer.ts +48 -42
  194. package/src/commands/plugins.ts +35 -32
  195. package/src/commands/project-update.ts +1053 -0
  196. package/src/commands/rag.ts +904 -0
  197. package/src/commands/session.ts +631 -0
  198. package/src/commands/setup.ts +35 -31
  199. package/src/commands/test-init.ts +6 -5
  200. package/src/commands/test.ts +7 -6
  201. package/src/commands/vp.ts +762 -0
  202. package/src/commands/watch.ts +44 -33
  203. package/src/commands/worktree.ts +1057 -0
  204. package/src/context/context-manager.ts +15 -12
  205. package/src/context/session-manager.ts +51 -40
  206. package/src/index.ts +7 -6
  207. package/src/interactive/interactive-mode.ts +25 -18
  208. package/src/lib/conflict-resolution.ts +28 -0
  209. package/src/lib/merge-strategy.ts +28 -0
  210. package/src/lib/safety-mechanisms.ts +47 -0
  211. package/src/lib/state-detection.ts +28 -0
  212. package/src/nlp/command-mapper.ts +35 -30
  213. package/src/nlp/command-parser.ts +20 -17
  214. package/src/nlp/intent-classifier.ts +7 -7
  215. package/src/nlp/intent-parser.ts +61 -49
  216. package/src/plugins/plugin-manager.ts +27 -23
  217. package/src/tests/computer-setup-integration.test.ts +439 -0
  218. package/src/types/index.ts +1 -1
  219. package/src/types/modules.d.ts +1 -0
  220. package/src/utils/backup-rollback-manager.ts +363 -0
  221. package/src/utils/claude-config-installer.ts +734 -0
  222. package/src/utils/config-manager.ts +12 -9
  223. package/src/utils/error-handler.ts +5 -3
  224. package/src/utils/logger.ts +35 -12
@@ -1,15 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ClaudeSetupCommands = void 0;
4
+ exports.createClaudeSetupCommand = createClaudeSetupCommand;
4
5
  const tslib_1 = require("tslib");
5
- const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
- const ora_1 = tslib_1.__importDefault(require("ora"));
7
6
  const child_process_1 = require("child_process");
8
- const path = tslib_1.__importStar(require("path"));
9
7
  const fs = tslib_1.__importStar(require("fs"));
8
+ const path = tslib_1.__importStar(require("path"));
9
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
10
+ const commander_1 = require("commander");
11
+ const ora_1 = tslib_1.__importDefault(require("ora"));
10
12
  /**
11
13
  * Claude Setup Commands
12
14
  * Comprehensive setup for Claude Code, Claude Flow, and MCP tools
15
+ *
16
+ * Consolidated from:
17
+ * - /src/cli/commands/claude-setup.ts (374 lines) - function-based approach
18
+ * - /packages/@wundr/cli/src/commands/claude-setup.ts (697 lines) - class-based approach
19
+ *
20
+ * This version preserves ALL functionality from both implementations.
13
21
  */
14
22
  class ClaudeSetupCommands {
15
23
  program;
@@ -25,26 +33,41 @@ class ClaudeSetupCommands {
25
33
  .addHelpText('after', chalk_1.default.gray(`
26
34
  Examples:
27
35
  ${chalk_1.default.green('wundr claude-setup')} Interactive Claude setup
36
+ ${chalk_1.default.green('wundr claude-setup install')} Complete ecosystem installation
28
37
  ${chalk_1.default.green('wundr claude-setup mcp')} Install all MCP tools
29
38
  ${chalk_1.default.green('wundr claude-setup agents')} Configure all 54 agents
30
39
  ${chalk_1.default.green('wundr claude-setup optimize')} Setup hardware-adaptive optimizations
31
40
  ${chalk_1.default.green('wundr claude-setup validate')} Validate Claude installation
41
+ ${chalk_1.default.green('wundr claude-setup project')} Setup project with templates
32
42
  `));
33
- // Main setup command
43
+ // Main setup command (default)
34
44
  claudeSetup
35
45
  .command('install', { isDefault: true })
36
46
  .description('Complete Claude ecosystem installation')
37
47
  .option('--skip-chrome', 'Skip Chrome installation')
38
48
  .option('--skip-mcp', 'Skip MCP tools installation')
39
49
  .option('--skip-agents', 'Skip agent configuration')
50
+ .option('--skip-flow', 'Skip Claude Flow setup')
51
+ .option('-g, --global', 'Install tools globally')
40
52
  .action(async (options) => {
41
53
  await this.runCompleteSetup(options);
42
54
  });
55
+ // Project setup with templates (from /src/cli/commands/claude-setup.ts)
56
+ claudeSetup
57
+ .command('project [path]')
58
+ .description('Setup Claude Code in a project directory with optional template')
59
+ .option('-g, --global', 'Install tools globally')
60
+ .option('--skip-mcp', 'Skip MCP tools installation')
61
+ .option('--skip-flow', 'Skip Claude Flow setup')
62
+ .option('-t, --template <name>', 'Use specific project template (typescript, react, nodejs, monorepo)')
63
+ .action(async (projectPath = '.', options) => {
64
+ await this.runProjectSetup(projectPath, options);
65
+ });
43
66
  // MCP tools installation
44
67
  claudeSetup
45
68
  .command('mcp')
46
69
  .description('Install and configure MCP tools')
47
- .option('--tool <tool>', 'Install specific tool (firecrawl, context7, playwright, browser, sequentialthinking)')
70
+ .option('--tool <tool>', 'Install specific tool (firecrawl, context7, playwright, browser, sequentialthinking, claude-flow)')
48
71
  .action(async (options) => {
49
72
  await this.installMcpTools(options);
50
73
  });
@@ -81,7 +104,18 @@ Examples:
81
104
  .action(async (options) => {
82
105
  await this.setupOptimizations(options);
83
106
  });
107
+ // Generate CLAUDE.md
108
+ claudeSetup
109
+ .command('config')
110
+ .description('Generate or update CLAUDE.md configuration')
111
+ .argument('[path]', 'Path to repository (defaults to current directory)', '.')
112
+ .action(async (repoPath) => {
113
+ await this.generateClaudeConfig(repoPath);
114
+ });
84
115
  }
116
+ /**
117
+ * Complete setup - combines both implementations' main flows
118
+ */
85
119
  async runCompleteSetup(options) {
86
120
  const spinner = (0, ora_1.default)();
87
121
  console.log(chalk_1.default.cyan.bold('\nšŸ¤– Claude Ecosystem Setup\n'));
@@ -101,17 +135,21 @@ Examples:
101
135
  await this.installChrome();
102
136
  spinner.succeed('Chrome installed');
103
137
  }
104
- // Step 3: Install MCP tools (if not skipped)
138
+ // Step 3: Claude Flow setup
139
+ if (!options.skipFlow) {
140
+ await this.setupClaudeFlow(spinner, process.cwd(), options.global);
141
+ }
142
+ // Step 4: Install MCP tools (if not skipped)
105
143
  if (!options.skipMcp) {
106
144
  await this.installMcpTools({});
107
145
  }
108
- // Step 4: Configure agents (if not skipped)
146
+ // Step 5: Configure agents (if not skipped)
109
147
  if (!options.skipAgents) {
110
148
  await this.configureAgents({ profile: 'fullstack' });
111
149
  }
112
- // Step 5: Setup Claude configuration
150
+ // Step 6: Setup Claude configuration
113
151
  spinner.start('Configuring Claude settings...');
114
- await this.setupClaudeConfig();
152
+ await this.setupClaudeSettings();
115
153
  spinner.succeed('Claude configured');
116
154
  console.log(chalk_1.default.green.bold('\nāœ… Claude ecosystem setup complete!\n'));
117
155
  this.printNextSteps();
@@ -122,14 +160,140 @@ Examples:
122
160
  process.exit(1);
123
161
  }
124
162
  }
163
+ /**
164
+ * Project setup - from /src/cli/commands/claude-setup.ts
165
+ */
166
+ async runProjectSetup(projectPath, options) {
167
+ const spinner = (0, ora_1.default)('Starting Claude Code project setup...').start();
168
+ try {
169
+ const repoPath = path.resolve(projectPath);
170
+ // Verify git repository
171
+ if (!fs.existsSync(path.join(repoPath, '.git'))) {
172
+ spinner.stop();
173
+ const inquirer = await Promise.resolve().then(() => tslib_1.__importStar(require('inquirer')));
174
+ const { shouldInitGit } = await inquirer.default.prompt([{
175
+ type: 'confirm',
176
+ name: 'shouldInitGit',
177
+ message: 'Not a git repository. Initialize git?',
178
+ default: true,
179
+ }]);
180
+ if (shouldInitGit) {
181
+ spinner.start('Initializing git repository...');
182
+ (0, child_process_1.execSync)('git init', { cwd: repoPath });
183
+ spinner.succeed('Git repository initialized');
184
+ }
185
+ else {
186
+ console.log(chalk_1.default.yellow('Continuing without git...'));
187
+ }
188
+ }
189
+ // Step 1: Claude Flow setup
190
+ if (!options.skipFlow) {
191
+ await this.setupClaudeFlow(spinner, repoPath, options.global);
192
+ }
193
+ // Step 2: MCP Tools setup
194
+ if (!options.skipMcp) {
195
+ await this.setupMCPToolsDirectory(spinner, repoPath);
196
+ }
197
+ // Step 3: Generate CLAUDE.md
198
+ await this.generateClaudeConfigForPath(spinner, repoPath);
199
+ // Step 4: Setup project template if specified
200
+ if (options.template) {
201
+ await this.setupProjectTemplate(spinner, repoPath, options.template);
202
+ }
203
+ // Step 5: Initialize swarm if Claude Flow is available
204
+ if (!options.skipFlow) {
205
+ await this.initializeSwarm(spinner, repoPath);
206
+ }
207
+ // Step 6: Validation
208
+ await this.validateProjectSetup(spinner, repoPath);
209
+ spinner.succeed('Claude Code project setup completed successfully!');
210
+ // Final instructions
211
+ this.displayProjectFinalInstructions(repoPath, options);
212
+ }
213
+ catch (error) {
214
+ spinner.stop();
215
+ console.error(chalk_1.default.red('āŒ Setup failed:'));
216
+ console.error(chalk_1.default.red(error instanceof Error ? error.message : String(error)));
217
+ process.exit(1);
218
+ }
219
+ }
220
+ /**
221
+ * Setup Claude Flow - from /src/cli/commands/claude-setup.ts
222
+ */
223
+ async setupClaudeFlow(spinner, repoPath, global) {
224
+ spinner.text = 'Setting up Claude Flow...';
225
+ try {
226
+ // Check if Claude Flow is already installed
227
+ (0, child_process_1.execSync)('npx claude-flow --version', { stdio: 'ignore' });
228
+ spinner.text = 'Claude Flow already available, configuring...';
229
+ }
230
+ catch {
231
+ spinner.text = 'Installing Claude Flow...';
232
+ if (global) {
233
+ (0, child_process_1.execSync)('npm install -g claude-flow@alpha', { stdio: 'inherit' });
234
+ }
235
+ else {
236
+ // Add to package.json dev dependencies if it exists
237
+ if (fs.existsSync(path.join(repoPath, 'package.json'))) {
238
+ (0, child_process_1.execSync)('npm install --save-dev claude-flow@alpha', { cwd: repoPath, stdio: 'inherit' });
239
+ }
240
+ }
241
+ }
242
+ // Add MCP server configuration
243
+ spinner.text = 'Configuring Claude MCP server...';
244
+ try {
245
+ (0, child_process_1.execSync)('claude mcp add claude-flow npx claude-flow@alpha mcp start', {
246
+ cwd: repoPath,
247
+ stdio: 'pipe',
248
+ });
249
+ }
250
+ catch {
251
+ // MCP configuration might fail if Claude Desktop isn't installed
252
+ console.log(chalk_1.default.yellow('\nāš ļø Could not configure MCP server automatically.'));
253
+ console.log(chalk_1.default.yellow('Please run manually: claude mcp add claude-flow npx claude-flow@alpha mcp start'));
254
+ }
255
+ spinner.text = 'Claude Flow setup completed';
256
+ }
257
+ /**
258
+ * Setup MCP Tools directory - from /src/cli/commands/claude-setup.ts
259
+ */
260
+ async setupMCPToolsDirectory(spinner, repoPath) {
261
+ spinner.text = 'Setting up MCP Tools directory...';
262
+ const mcpToolsPath = path.join(repoPath, 'mcp-tools');
263
+ // Create mcp-tools directory if it doesn't exist
264
+ if (!fs.existsSync(mcpToolsPath)) {
265
+ fs.mkdirSync(mcpToolsPath, { recursive: true });
266
+ // Create basic install script
267
+ const installScript = `#!/bin/bash
268
+ # MCP Tools Installation Script
269
+ echo "Installing Wundr MCP Tools..."
270
+
271
+ # Add your MCP tool installations here
272
+ echo "āœ… MCP Tools installation template created"
273
+ echo "Customize this script with your specific MCP tools"
274
+ `;
275
+ fs.writeFileSync(path.join(mcpToolsPath, 'install.sh'), installScript);
276
+ (0, child_process_1.execSync)(`chmod +x ${path.join(mcpToolsPath, 'install.sh')}`);
277
+ // Create package.json for MCP tools
278
+ const mcpPackageJson = {
279
+ name: 'mcp-tools',
280
+ version: '1.0.0',
281
+ description: 'MCP Tools for Claude Code integration',
282
+ private: true,
283
+ scripts: {
284
+ install: './install.sh',
285
+ },
286
+ };
287
+ fs.writeFileSync(path.join(mcpToolsPath, 'package.json'), JSON.stringify(mcpPackageJson, null, 2));
288
+ }
289
+ spinner.text = 'MCP Tools directory setup completed';
290
+ }
291
+ /**
292
+ * Install MCP tools via script or specific tool
293
+ */
125
294
  async installMcpTools(options) {
126
295
  const spinner = (0, ora_1.default)();
127
296
  const scriptPath = path.join(__dirname, '../../../../scripts/install-mcp-tools.sh');
128
- if (!fs.existsSync(scriptPath)) {
129
- console.error(chalk_1.default.red('āŒ MCP tools installation script not found'));
130
- console.log(chalk_1.default.yellow('Please ensure the script exists at: ' + scriptPath));
131
- return;
132
- }
133
297
  console.log(chalk_1.default.cyan('\nšŸ“¦ Installing MCP Tools...\n'));
134
298
  if (options.tool) {
135
299
  // Install specific tool
@@ -141,6 +305,7 @@ Examples:
141
305
  playwright: 'npx claude mcp add playwright npx @playwright/mcp-server',
142
306
  browser: 'npx claude mcp add browser npx @browser/mcp-server',
143
307
  sequentialthinking: 'npm install -g @modelcontextprotocol/server-sequentialthinking',
308
+ 'claude-flow': 'claude mcp add claude-flow npx claude-flow@alpha mcp start',
144
309
  };
145
310
  const command = installCommands[options.tool];
146
311
  if (command) {
@@ -149,6 +314,7 @@ Examples:
149
314
  }
150
315
  else {
151
316
  spinner.fail(`Unknown tool: ${options.tool}`);
317
+ console.log(chalk_1.default.yellow(`Available tools: ${Object.keys(installCommands).join(', ')}`));
152
318
  }
153
319
  }
154
320
  catch (error) {
@@ -157,25 +323,44 @@ Examples:
157
323
  }
158
324
  }
159
325
  else {
160
- // Install all tools using the script
161
- console.log(chalk_1.default.gray('Running comprehensive MCP tools installation...'));
162
- const install = (0, child_process_1.spawn)('bash', [scriptPath], {
163
- stdio: 'inherit',
164
- shell: true,
165
- });
166
- return new Promise((resolve, reject) => {
167
- install.on('close', code => {
168
- if (code === 0) {
169
- console.log(chalk_1.default.green('\nāœ… All MCP tools installed successfully'));
170
- resolve();
326
+ // Try to install all tools using the script if it exists
327
+ if (fs.existsSync(scriptPath)) {
328
+ console.log(chalk_1.default.gray('Running comprehensive MCP tools installation...'));
329
+ const install = (0, child_process_1.spawn)('bash', [scriptPath], {
330
+ stdio: 'inherit',
331
+ shell: true,
332
+ });
333
+ return new Promise((resolve, reject) => {
334
+ install.on('close', code => {
335
+ if (code === 0) {
336
+ console.log(chalk_1.default.green('\nāœ… All MCP tools installed successfully'));
337
+ resolve();
338
+ }
339
+ else {
340
+ reject(new Error(`Installation failed with code ${code}`));
341
+ }
342
+ });
343
+ });
344
+ }
345
+ else {
346
+ // Fallback: install core tools
347
+ console.log(chalk_1.default.gray('Installing core MCP tools...'));
348
+ const coreTools = ['claude-flow', 'sequentialthinking'];
349
+ for (const tool of coreTools) {
350
+ try {
351
+ await this.installMcpTools({ tool });
171
352
  }
172
- else {
173
- reject(new Error(`Installation failed with code ${code}`));
353
+ catch {
354
+ console.log(chalk_1.default.yellow(`āš ļø Could not install ${tool}`));
174
355
  }
175
- });
176
- });
356
+ }
357
+ console.log(chalk_1.default.green('\nāœ… Core MCP tools installed'));
358
+ }
177
359
  }
178
360
  }
361
+ /**
362
+ * Configure Claude Flow agents
363
+ */
179
364
  async configureAgents(options) {
180
365
  const spinner = (0, ora_1.default)();
181
366
  if (options.list) {
@@ -187,7 +372,7 @@ Examples:
187
372
  ? options.enable.split(',')
188
373
  : this.getProfileAgents(options.profile || 'fullstack');
189
374
  // Create agent configurations
190
- const homeDir = process.env.HOME || process.env.USERPROFILE || '';
375
+ const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
191
376
  const agentsDir = path.join(homeDir, '.claude', 'agents');
192
377
  try {
193
378
  fs.mkdirSync(agentsDir, { recursive: true });
@@ -202,6 +387,9 @@ Examples:
202
387
  console.error(error);
203
388
  }
204
389
  }
390
+ /**
391
+ * Validate Claude installation
392
+ */
205
393
  async validateInstallation(options) {
206
394
  console.log(chalk_1.default.cyan('\nšŸ” Validating Claude Installation...\n'));
207
395
  const checks = [
@@ -234,9 +422,12 @@ Examples:
234
422
  console.log(chalk_1.default.yellow('\nāš ļø Some checks failed. Run with --fix to attempt repairs.'));
235
423
  }
236
424
  }
425
+ /**
426
+ * Install Chrome extension instructions
427
+ */
237
428
  async installChromeExtension() {
238
429
  console.log(chalk_1.default.cyan('\nšŸ”Œ Browser MCP Chrome Extension Setup\n'));
239
- const homeDir = process.env.HOME || process.env.USERPROFILE || '';
430
+ const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
240
431
  const extensionDir = path.join(homeDir, '.claude', 'browser-extension');
241
432
  console.log(chalk_1.default.white('Extension location: ' + extensionDir));
242
433
  console.log(chalk_1.default.yellow('\nTo install:'));
@@ -246,17 +437,21 @@ Examples:
246
437
  console.log(`4. Select: ${extensionDir}`);
247
438
  console.log('\nāœ… The extension will then be active!');
248
439
  }
440
+ /**
441
+ * Setup hardware-adaptive optimizations
442
+ */
249
443
  async setupOptimizations(options) {
250
444
  const spinner = (0, ora_1.default)();
251
445
  console.log(chalk_1.default.cyan.bold('\n⚔ Claude Code Hardware-Adaptive Optimization Setup\n'));
252
446
  try {
253
- const homeDir = process.env.HOME || process.env.USERPROFILE || '';
447
+ const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
254
448
  const scriptsDir = path.join(homeDir, '.claude', 'scripts');
255
449
  const resourcesDir = path.join(__dirname, '../../../computer-setup/resources/scripts');
256
450
  // Check if optimization scripts already exist
257
451
  const scriptsExist = fs.existsSync(scriptsDir);
258
452
  if (scriptsExist && !options.force) {
259
- const { overwrite } = await (await Promise.resolve().then(() => tslib_1.__importStar(require('inquirer')))).default.prompt([
453
+ const inquirer = await Promise.resolve().then(() => tslib_1.__importStar(require('inquirer')));
454
+ const { overwrite } = await inquirer.default.prompt([
260
455
  {
261
456
  type: 'confirm',
262
457
  name: 'overwrite',
@@ -336,6 +531,215 @@ Examples:
336
531
  throw error;
337
532
  }
338
533
  }
534
+ /**
535
+ * Generate CLAUDE.md configuration
536
+ */
537
+ async generateClaudeConfig(repoPath) {
538
+ const spinner = (0, ora_1.default)('Generating CLAUDE.md configuration...').start();
539
+ try {
540
+ const resolvedPath = path.resolve(repoPath);
541
+ await this.generateClaudeConfigForPath(spinner, resolvedPath);
542
+ spinner.succeed('CLAUDE.md generated successfully');
543
+ console.log(chalk_1.default.green(`\nāœ… CLAUDE.md created at: ${path.join(resolvedPath, 'CLAUDE.md')}`));
544
+ }
545
+ catch (error) {
546
+ spinner.fail('Failed to generate CLAUDE.md');
547
+ console.error(chalk_1.default.red(error instanceof Error ? error.message : String(error)));
548
+ }
549
+ }
550
+ /**
551
+ * Generate CLAUDE.md for a specific path
552
+ */
553
+ async generateClaudeConfigForPath(spinner, repoPath) {
554
+ spinner.text = 'Generating CLAUDE.md configuration...';
555
+ try {
556
+ // Try to use the ClaudeConfigGenerator if available
557
+ // Use path.resolve to construct the path at runtime to avoid TypeScript rootDir issues
558
+ const generatorPath = path.resolve(__dirname, '../../../../../src/claude-generator/claude-config-generator.js');
559
+ const { ClaudeConfigGenerator } = await Promise.resolve(`${generatorPath}`).then(s => tslib_1.__importStar(require(s)));
560
+ const generator = new ClaudeConfigGenerator(repoPath);
561
+ const claudeContent = await generator.generateClaudeMarkdown();
562
+ const claudeFilePath = path.join(repoPath, 'CLAUDE.md');
563
+ fs.writeFileSync(claudeFilePath, claudeContent, 'utf-8');
564
+ }
565
+ catch {
566
+ // Fallback: Create a basic CLAUDE.md
567
+ spinner.text = 'Creating basic CLAUDE.md...';
568
+ const basicContent = this.generateBasicClaudeConfig(repoPath);
569
+ fs.writeFileSync(path.join(repoPath, 'CLAUDE.md'), basicContent, 'utf-8');
570
+ }
571
+ spinner.text = 'CLAUDE.md generated successfully';
572
+ }
573
+ /**
574
+ * Generate basic CLAUDE.md content as fallback
575
+ */
576
+ generateBasicClaudeConfig(repoPath) {
577
+ const projectName = path.basename(repoPath);
578
+ return `# Claude Code Configuration - ${projectName}
579
+
580
+ ## Project Overview
581
+ This project uses Claude Code for AI-assisted development.
582
+
583
+ ## Commands
584
+ - \`npm run build\` - Build the project
585
+ - \`npm run test\` - Run tests
586
+ - \`npm run lint\` - Run linting
587
+
588
+ ## Code Style
589
+ - Follow existing patterns in the codebase
590
+ - Write clear, descriptive commit messages
591
+ - Add tests for new features
592
+
593
+ ## MCP Tools
594
+ Claude Flow is configured for enhanced AI coordination.
595
+ Run \`npx claude-flow sparc modes\` to see available modes.
596
+ `;
597
+ }
598
+ /**
599
+ * Setup project template - from /src/cli/commands/claude-setup.ts
600
+ */
601
+ async setupProjectTemplate(spinner, repoPath, templateName) {
602
+ spinner.text = `Applying ${templateName} template...`;
603
+ const templates = {
604
+ 'typescript': () => this.setupTypeScriptTemplate(repoPath),
605
+ 'react': () => this.setupReactTemplate(repoPath),
606
+ 'nodejs': () => this.setupNodeTemplate(repoPath),
607
+ 'monorepo': () => this.setupMonorepoTemplate(repoPath),
608
+ };
609
+ const setupFunction = templates[templateName];
610
+ if (!setupFunction) {
611
+ throw new Error(`Unknown template: ${templateName}. Available: ${Object.keys(templates).join(', ')}`);
612
+ }
613
+ setupFunction();
614
+ spinner.text = `${templateName} template applied`;
615
+ }
616
+ setupTypeScriptTemplate(repoPath) {
617
+ // Create basic TypeScript configuration if not exists
618
+ const tsconfigPath = path.join(repoPath, 'tsconfig.json');
619
+ if (!fs.existsSync(tsconfigPath)) {
620
+ const tsconfig = {
621
+ compilerOptions: {
622
+ target: 'ES2020',
623
+ module: 'ESNext',
624
+ moduleResolution: 'node',
625
+ strict: true,
626
+ esModuleInterop: true,
627
+ skipLibCheck: true,
628
+ forceConsistentCasingInFileNames: true,
629
+ declaration: true,
630
+ outDir: 'dist',
631
+ rootDir: 'src',
632
+ },
633
+ include: ['src/**/*'],
634
+ exclude: ['node_modules', 'dist'],
635
+ };
636
+ fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2));
637
+ }
638
+ // Create src directory
639
+ const srcPath = path.join(repoPath, 'src');
640
+ if (!fs.existsSync(srcPath)) {
641
+ fs.mkdirSync(srcPath, { recursive: true });
642
+ fs.writeFileSync(path.join(srcPath, 'index.ts'), '// Your TypeScript code here\n');
643
+ }
644
+ }
645
+ setupReactTemplate(repoPath) {
646
+ // Ensure React-specific structure
647
+ const srcPath = path.join(repoPath, 'src');
648
+ if (!fs.existsSync(srcPath)) {
649
+ fs.mkdirSync(srcPath, { recursive: true });
650
+ }
651
+ // Create components directory
652
+ const componentsPath = path.join(srcPath, 'components');
653
+ if (!fs.existsSync(componentsPath)) {
654
+ fs.mkdirSync(componentsPath, { recursive: true });
655
+ }
656
+ // Create hooks directory
657
+ const hooksPath = path.join(srcPath, 'hooks');
658
+ if (!fs.existsSync(hooksPath)) {
659
+ fs.mkdirSync(hooksPath, { recursive: true });
660
+ }
661
+ }
662
+ setupNodeTemplate(repoPath) {
663
+ // Create basic Node.js structure
664
+ const srcPath = path.join(repoPath, 'src');
665
+ if (!fs.existsSync(srcPath)) {
666
+ fs.mkdirSync(srcPath, { recursive: true });
667
+ fs.writeFileSync(path.join(srcPath, 'index.js'), '// Your Node.js code here\n');
668
+ }
669
+ // Create routes directory
670
+ const routesPath = path.join(srcPath, 'routes');
671
+ if (!fs.existsSync(routesPath)) {
672
+ fs.mkdirSync(routesPath, { recursive: true });
673
+ }
674
+ }
675
+ setupMonorepoTemplate(repoPath) {
676
+ // Create packages directory
677
+ const packagesPath = path.join(repoPath, 'packages');
678
+ if (!fs.existsSync(packagesPath)) {
679
+ fs.mkdirSync(packagesPath, { recursive: true });
680
+ }
681
+ // Create apps directory
682
+ const appsPath = path.join(repoPath, 'apps');
683
+ if (!fs.existsSync(appsPath)) {
684
+ fs.mkdirSync(appsPath, { recursive: true });
685
+ }
686
+ // Create workspace package.json if not exists
687
+ const packageJsonPath = path.join(repoPath, 'package.json');
688
+ if (!fs.existsSync(packageJsonPath)) {
689
+ const packageJson = {
690
+ name: 'monorepo-workspace',
691
+ version: '1.0.0',
692
+ private: true,
693
+ workspaces: ['packages/*', 'apps/*'],
694
+ devDependencies: {
695
+ 'turbo': '^2.0.0',
696
+ },
697
+ };
698
+ fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
699
+ }
700
+ }
701
+ /**
702
+ * Initialize swarm - from /src/cli/commands/claude-setup.ts
703
+ */
704
+ async initializeSwarm(spinner, repoPath) {
705
+ spinner.text = 'Initializing Claude Flow swarm...';
706
+ try {
707
+ // Initialize basic swarm configuration
708
+ (0, child_process_1.execSync)('npx claude-flow@alpha init', {
709
+ cwd: repoPath,
710
+ stdio: 'pipe',
711
+ });
712
+ }
713
+ catch {
714
+ // Swarm init might fail if not properly configured
715
+ console.log(chalk_1.default.yellow('\nāš ļø Could not initialize swarm automatically.'));
716
+ console.log(chalk_1.default.yellow('You can initialize manually later with: npx claude-flow init'));
717
+ }
718
+ spinner.text = 'Swarm initialization completed';
719
+ }
720
+ /**
721
+ * Validate project setup - from /src/cli/commands/claude-setup.ts
722
+ */
723
+ async validateProjectSetup(spinner, repoPath) {
724
+ spinner.text = 'Validating setup...';
725
+ const validations = [
726
+ { name: 'CLAUDE.md', path: path.join(repoPath, 'CLAUDE.md') },
727
+ { name: 'MCP Tools', path: path.join(repoPath, 'mcp-tools') },
728
+ { name: 'Git repository', path: path.join(repoPath, '.git') },
729
+ ];
730
+ const results = validations.map(validation => ({
731
+ ...validation,
732
+ exists: fs.existsSync(validation.path),
733
+ }));
734
+ const failures = results.filter(r => !r.exists);
735
+ if (failures.length > 0) {
736
+ throw new Error(`Setup validation failed: Missing ${failures.map(f => f.name).join(', ')}`);
737
+ }
738
+ spinner.text = 'Setup validation passed';
739
+ }
740
+ /**
741
+ * Add shell optimization configuration
742
+ */
339
743
  async addOptimizationToShell(homeDir) {
340
744
  const shellConfigs = [
341
745
  path.join(homeDir, '.zshrc'),
@@ -399,6 +803,9 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
399
803
  }
400
804
  }
401
805
  }
806
+ /**
807
+ * Install Chrome browser
808
+ */
402
809
  async installChrome() {
403
810
  if (process.platform === 'darwin') {
404
811
  (0, child_process_1.execSync)('curl -L -o ~/Downloads/googlechrome.dmg "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"');
@@ -411,8 +818,11 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
411
818
  console.log(chalk_1.default.yellow('Chrome installation is only automated for macOS'));
412
819
  }
413
820
  }
414
- async setupClaudeConfig() {
415
- const homeDir = process.env.HOME || process.env.USERPROFILE || '';
821
+ /**
822
+ * Setup Claude settings.json
823
+ */
824
+ async setupClaudeSettings() {
825
+ const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
416
826
  const configPath = path.join(homeDir, '.claude', 'settings.json');
417
827
  const config = {
418
828
  claudeCodeOptions: {
@@ -435,6 +845,7 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
435
845
  fs.mkdirSync(path.dirname(configPath), { recursive: true });
436
846
  fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
437
847
  }
848
+ // ==================== Helper Methods ====================
438
849
  isClaudeInstalled() {
439
850
  try {
440
851
  (0, child_process_1.execSync)('claude --version', { stdio: 'ignore' });
@@ -460,22 +871,24 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
460
871
  return true; // Assume installed on other platforms
461
872
  }
462
873
  claudeDirExists() {
463
- const homeDir = process.env.HOME || process.env.USERPROFILE || '';
874
+ const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
464
875
  return fs.existsSync(path.join(homeDir, '.claude'));
465
876
  }
466
877
  agentsConfigured() {
467
- const homeDir = process.env.HOME || process.env.USERPROFILE || '';
878
+ const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
468
879
  const agentsDir = path.join(homeDir, '.claude', 'agents');
469
- if (!fs.existsSync(agentsDir))
880
+ if (!fs.existsSync(agentsDir)) {
470
881
  return false;
882
+ }
471
883
  const files = fs.readdirSync(agentsDir);
472
884
  return files.length > 0;
473
885
  }
474
886
  mcpServersConfigured() {
475
- const homeDir = process.env.HOME || process.env.USERPROFILE || '';
887
+ const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
476
888
  const settingsPath = path.join(homeDir, '.claude', 'settings.json');
477
- if (!fs.existsSync(settingsPath))
889
+ if (!fs.existsSync(settingsPath)) {
478
890
  return false;
891
+ }
479
892
  try {
480
893
  const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
481
894
  return settings.claudeCodeOptions?.enabledMcpjsonServers?.length > 0;
@@ -498,18 +911,61 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
498
911
  'hierarchical-coordinator',
499
912
  'mesh-coordinator',
500
913
  'adaptive-coordinator',
914
+ 'collective-intelligence-coordinator',
915
+ 'swarm-memory-manager',
916
+ ],
917
+ 'Consensus & Distributed': [
918
+ 'byzantine-coordinator',
919
+ 'raft-manager',
920
+ 'gossip-coordinator',
921
+ 'consensus-builder',
922
+ 'crdt-synchronizer',
923
+ 'quorum-manager',
924
+ 'security-manager',
501
925
  ],
502
- 'GitHub Integration': [
926
+ 'Performance & Optimization': [
927
+ 'perf-analyzer',
928
+ 'performance-benchmarker',
929
+ 'task-orchestrator',
930
+ 'memory-coordinator',
931
+ 'smart-agent',
932
+ ],
933
+ 'GitHub & Repository': [
503
934
  'github-modes',
504
935
  'pr-manager',
936
+ 'code-review-swarm',
505
937
  'issue-tracker',
506
938
  'release-manager',
939
+ 'workflow-automation',
940
+ 'project-board-sync',
941
+ 'repo-architect',
942
+ 'multi-repo-swarm',
943
+ ],
944
+ 'SPARC Methodology': [
945
+ 'sparc-coord',
946
+ 'sparc-coder',
947
+ 'specification',
948
+ 'pseudocode',
949
+ 'architecture',
950
+ 'refinement',
507
951
  ],
508
- Specialized: [
952
+ 'Specialized Development': [
509
953
  'backend-dev',
510
954
  'mobile-dev',
511
955
  'ml-developer',
956
+ 'cicd-engineer',
957
+ 'api-docs',
512
958
  'system-architect',
959
+ 'code-analyzer',
960
+ 'base-template-generator',
961
+ ],
962
+ 'Testing & Validation': [
963
+ 'tdd-london-swarm',
964
+ 'production-validator',
965
+ ],
966
+ 'Migration & Planning': [
967
+ 'migration-planner',
968
+ 'swarm-init',
513
969
  ],
514
970
  };
515
971
  for (const [category, agents] of Object.entries(categories)) {
@@ -517,16 +973,18 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
517
973
  agents.forEach(agent => console.log(` • ${agent}`));
518
974
  console.log();
519
975
  }
976
+ console.log(chalk_1.default.gray('Total: 54 agents available'));
520
977
  }
521
978
  getProfileAgents(profile) {
522
979
  const profileAgents = {
523
- frontend: ['coder', 'reviewer', 'tester', 'mobile-dev'],
980
+ frontend: ['coder', 'reviewer', 'tester', 'mobile-dev', 'ui-designer'],
524
981
  backend: [
525
982
  'coder',
526
983
  'reviewer',
527
984
  'tester',
528
985
  'backend-dev',
529
986
  'system-architect',
987
+ 'api-docs',
530
988
  ],
531
989
  fullstack: [
532
990
  'coder',
@@ -535,11 +993,13 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
535
993
  'planner',
536
994
  'researcher',
537
995
  'system-architect',
996
+ 'backend-dev',
538
997
  ],
539
- devops: ['planner', 'cicd-engineer', 'perf-analyzer', 'github-modes'],
998
+ devops: ['planner', 'cicd-engineer', 'perf-analyzer', 'github-modes', 'workflow-automation'],
999
+ ml: ['ml-developer', 'coder', 'tester', 'perf-analyzer', 'researcher'],
540
1000
  };
541
1001
  return (profileAgents[profile] ||
542
- profileAgents.fullstack || ['coder', 'reviewer', 'tester']);
1002
+ profileAgents['fullstack'] || ['coder', 'reviewer', 'tester']);
543
1003
  }
544
1004
  generateAgentConfig(agentName) {
545
1005
  return {
@@ -555,16 +1015,59 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
555
1015
  },
556
1016
  };
557
1017
  }
1018
+ /**
1019
+ * Display final instructions for project setup
1020
+ */
1021
+ displayProjectFinalInstructions(repoPath, options) {
1022
+ console.log(chalk_1.default.green('\nšŸŽ‰ Claude Code Setup Complete!'));
1023
+ console.log(chalk_1.default.blue('================================'));
1024
+ console.log(chalk_1.default.yellow('\nšŸ“‹ What was set up:'));
1025
+ console.log('āœ… CLAUDE.md configuration generated');
1026
+ if (!options.skipFlow) {
1027
+ console.log('āœ… Claude Flow installed and configured');
1028
+ }
1029
+ if (!options.skipMcp) {
1030
+ console.log('āœ… MCP Tools directory created');
1031
+ }
1032
+ console.log('āœ… Project structure validated');
1033
+ console.log(chalk_1.default.yellow('\nšŸš€ Next Steps:'));
1034
+ console.log('1. Review and customize CLAUDE.md as needed');
1035
+ console.log('2. Install MCP tools: cd mcp-tools && ./install.sh');
1036
+ console.log('3. Verify Claude Desktop MCP connection');
1037
+ if (!options.skipFlow) {
1038
+ console.log('4. Test Claude Flow: npx claude-flow sparc modes');
1039
+ }
1040
+ console.log('5. Start coding with optimized Claude Code integration!');
1041
+ console.log(chalk_1.default.yellow('\nšŸ“š Resources:'));
1042
+ console.log('• Claude Flow: https://github.com/ruvnet/claude-flow');
1043
+ console.log('• MCP Documentation: https://modelcontextprotocol.io/docs');
1044
+ console.log('• Wundr Documentation: ./docs/');
1045
+ console.log(chalk_1.default.green('\n✨ Happy coding with Claude!'));
1046
+ }
1047
+ /**
1048
+ * Print next steps after complete setup
1049
+ */
558
1050
  printNextSteps() {
559
1051
  console.log(chalk_1.default.cyan('šŸ“‹ Next Steps:'));
560
1052
  console.log('1. Configure API keys for MCP tools (if needed)');
561
1053
  console.log('2. Install Browser MCP Chrome extension: wundr claude-setup extension');
562
1054
  console.log('3. Restart Claude Desktop to load new configurations');
563
- console.log('4. Initialize a project: wundr claude-init');
1055
+ console.log('4. Initialize a project: wundr claude-setup project');
564
1056
  console.log('5. Start coding with Claude Flow: npx claude-flow@alpha sparc tdd "feature"');
565
1057
  }
566
1058
  }
567
1059
  exports.ClaudeSetupCommands = ClaudeSetupCommands;
1060
+ /**
1061
+ * Factory function for backwards compatibility with function-based approach
1062
+ * This allows both import patterns to work:
1063
+ * - import claudeSetupCommand from './claude-setup' (class-based)
1064
+ * - import { createClaudeSetupCommand } from './claude-setup' (function-based)
1065
+ */
1066
+ function createClaudeSetupCommand() {
1067
+ const program = new commander_1.Command();
1068
+ new ClaudeSetupCommands(program);
1069
+ return program.commands.find(cmd => cmd.name() === 'claude-setup') || program;
1070
+ }
568
1071
  const createClaudeSetupCommands = (program) => new ClaudeSetupCommands(program);
569
1072
  exports.default = createClaudeSetupCommands;
570
1073
  //# sourceMappingURL=claude-setup.js.map