@wundr.io/cli 1.0.11 ā 1.0.12
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/wundr.js +8 -4
- package/package.json +23 -23
- package/src/ai/ai-service.ts +16 -17
- package/src/ai/claude-client.ts +16 -16
- package/src/ai/conversation-manager.ts +29 -29
- package/src/cli.ts +4 -4
- package/src/commands/ai.ts +246 -78
- package/src/commands/alignment.ts +74 -74
- package/src/commands/analyze-optimized.ts +111 -78
- package/src/commands/analyze.ts +14 -14
- package/src/commands/batch.ts +179 -42
- package/src/commands/chat.ts +37 -30
- package/src/commands/claude-init.ts +41 -45
- package/src/commands/claude-setup.ts +204 -119
- package/src/commands/computer-setup.ts +85 -43
- package/src/commands/create-command.ts +4 -4
- package/src/commands/create.ts +27 -27
- package/src/commands/dashboard.ts +24 -24
- package/src/commands/govern.ts +25 -25
- package/src/commands/governance.ts +34 -34
- package/src/commands/guardian.ts +56 -56
- package/src/commands/init.ts +25 -22
- package/src/commands/orchestrator.ts +68 -41
- package/src/commands/performance-optimizer.ts +34 -35
- package/src/commands/plugins.ts +27 -27
- package/src/commands/project-update.ts +175 -72
- package/src/commands/rag.ts +185 -78
- package/src/commands/session.ts +35 -35
- package/src/commands/setup.ts +40 -344
- package/src/commands/test-init.ts +3 -3
- package/src/commands/test.ts +4 -4
- package/src/commands/watch.ts +28 -29
- package/src/commands/worktree.ts +49 -49
- package/src/context/context-manager.ts +10 -10
- package/src/context/session-manager.ts +41 -41
- package/src/framework/command-interface.ts +520 -0
- package/src/framework/command-registry.ts +942 -0
- package/src/framework/completion-exporter.ts +383 -0
- package/src/framework/debug-logger.ts +519 -0
- package/src/framework/error-handler.ts +867 -0
- package/src/framework/help-generator.ts +540 -0
- package/src/framework/index.ts +169 -0
- package/src/framework/interactive-repl.ts +703 -0
- package/src/framework/output-formatter.ts +834 -0
- package/src/framework/progress-manager.ts +539 -0
- package/src/index.ts +4 -4
- package/src/interactive/interactive-mode.ts +16 -16
- package/src/lib/conflict-resolution.ts +799 -9
- package/src/lib/merge-strategy.ts +529 -7
- package/src/lib/safety-mechanisms.ts +422 -18
- package/src/lib/state-detection.ts +1015 -13
- package/src/nlp/command-mapper.ts +29 -29
- package/src/nlp/command-parser.ts +17 -17
- package/src/nlp/intent-classifier.ts +7 -7
- package/src/nlp/intent-parser.ts +54 -52
- package/src/plugins/plugin-manager.ts +61 -39
- package/src/tests/computer-setup-integration.test.ts +46 -15
- package/src/types/modules.d.ts +424 -1
- package/src/utils/backup-rollback-manager.ts +11 -8
- package/src/utils/config-manager.ts +3 -3
- package/src/utils/error-handler.ts +2 -2
- package/src/utils/logger.ts +22 -22
- package/templates/batch/ci-cd.yaml +7 -7
- package/test-suites/api/health.spec.ts +20 -23
- package/test-suites/helpers/test-config.ts +14 -13
- package/test-suites/ui/accessibility.spec.ts +27 -22
- package/test-suites/ui/smoke.spec.ts +26 -21
- package/LICENSE +0 -21
- package/dist/ai/ai-service.d.ts +0 -152
- package/dist/ai/ai-service.d.ts.map +0 -1
- package/dist/ai/ai-service.js +0 -430
- package/dist/ai/ai-service.js.map +0 -1
- package/dist/ai/claude-client.d.ts +0 -130
- package/dist/ai/claude-client.d.ts.map +0 -1
- package/dist/ai/claude-client.js +0 -340
- package/dist/ai/claude-client.js.map +0 -1
- package/dist/ai/conversation-manager.d.ts +0 -164
- package/dist/ai/conversation-manager.d.ts.map +0 -1
- package/dist/ai/conversation-manager.js +0 -614
- package/dist/ai/conversation-manager.js.map +0 -1
- package/dist/ai/index.d.ts +0 -5
- package/dist/ai/index.d.ts.map +0 -1
- package/dist/ai/index.js +0 -8
- package/dist/ai/index.js.map +0 -1
- package/dist/cli.d.ts +0 -36
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -192
- package/dist/cli.js.map +0 -1
- package/dist/commands/ai.d.ts +0 -89
- package/dist/commands/ai.d.ts.map +0 -1
- package/dist/commands/ai.js +0 -799
- package/dist/commands/ai.js.map +0 -1
- package/dist/commands/alignment.d.ts +0 -78
- package/dist/commands/alignment.d.ts.map +0 -1
- package/dist/commands/alignment.js +0 -817
- package/dist/commands/alignment.js.map +0 -1
- package/dist/commands/analyze-optimized.d.ts +0 -14
- package/dist/commands/analyze-optimized.d.ts.map +0 -1
- package/dist/commands/analyze-optimized.js +0 -600
- package/dist/commands/analyze-optimized.js.map +0 -1
- package/dist/commands/analyze.d.ts +0 -65
- package/dist/commands/analyze.d.ts.map +0 -1
- package/dist/commands/analyze.js +0 -435
- package/dist/commands/analyze.js.map +0 -1
- package/dist/commands/batch.d.ts +0 -71
- package/dist/commands/batch.d.ts.map +0 -1
- package/dist/commands/batch.js +0 -738
- package/dist/commands/batch.js.map +0 -1
- package/dist/commands/chat.d.ts +0 -71
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js +0 -674
- package/dist/commands/chat.js.map +0 -1
- package/dist/commands/claude-init.d.ts +0 -28
- package/dist/commands/claude-init.d.ts.map +0 -1
- package/dist/commands/claude-init.js +0 -591
- package/dist/commands/claude-init.js.map +0 -1
- package/dist/commands/claude-setup.d.ts +0 -119
- package/dist/commands/claude-setup.d.ts.map +0 -1
- package/dist/commands/claude-setup.js +0 -1073
- package/dist/commands/claude-setup.js.map +0 -1
- package/dist/commands/computer-setup-commands.d.ts +0 -53
- package/dist/commands/computer-setup-commands.d.ts.map +0 -1
- package/dist/commands/computer-setup-commands.js +0 -705
- package/dist/commands/computer-setup-commands.js.map +0 -1
- package/dist/commands/computer-setup.d.ts +0 -7
- package/dist/commands/computer-setup.d.ts.map +0 -1
- package/dist/commands/computer-setup.js +0 -849
- package/dist/commands/computer-setup.js.map +0 -1
- package/dist/commands/create-command.d.ts +0 -7
- package/dist/commands/create-command.d.ts.map +0 -1
- package/dist/commands/create-command.js +0 -158
- package/dist/commands/create-command.js.map +0 -1
- package/dist/commands/create.d.ts +0 -74
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -556
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -91
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -538
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/govern.d.ts +0 -70
- package/dist/commands/govern.d.ts.map +0 -1
- package/dist/commands/govern.js +0 -481
- package/dist/commands/govern.js.map +0 -1
- package/dist/commands/governance.d.ts +0 -17
- package/dist/commands/governance.d.ts.map +0 -1
- package/dist/commands/governance.js +0 -703
- package/dist/commands/governance.js.map +0 -1
- package/dist/commands/guardian.d.ts +0 -20
- package/dist/commands/guardian.d.ts.map +0 -1
- package/dist/commands/guardian.js +0 -597
- package/dist/commands/guardian.js.map +0 -1
- package/dist/commands/init.d.ts +0 -59
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -650
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/orchestrator.d.ts +0 -7
- package/dist/commands/orchestrator.d.ts.map +0 -1
- package/dist/commands/orchestrator.js +0 -571
- package/dist/commands/orchestrator.js.map +0 -1
- package/dist/commands/performance-optimizer.d.ts +0 -30
- package/dist/commands/performance-optimizer.d.ts.map +0 -1
- package/dist/commands/performance-optimizer.js +0 -650
- package/dist/commands/performance-optimizer.js.map +0 -1
- package/dist/commands/plugins.d.ts +0 -87
- package/dist/commands/plugins.d.ts.map +0 -1
- package/dist/commands/plugins.js +0 -685
- package/dist/commands/plugins.js.map +0 -1
- package/dist/commands/rag.d.ts +0 -7
- package/dist/commands/rag.d.ts.map +0 -1
- package/dist/commands/rag.js +0 -748
- package/dist/commands/rag.js.map +0 -1
- package/dist/commands/session.d.ts +0 -41
- package/dist/commands/session.d.ts.map +0 -1
- package/dist/commands/session.js +0 -441
- package/dist/commands/session.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -29
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -397
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/test-init.d.ts +0 -9
- package/dist/commands/test-init.d.ts.map +0 -1
- package/dist/commands/test-init.js +0 -222
- package/dist/commands/test-init.js.map +0 -1
- package/dist/commands/test.d.ts +0 -25
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js +0 -217
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/vp.d.ts +0 -7
- package/dist/commands/vp.d.ts.map +0 -1
- package/dist/commands/vp.js +0 -571
- package/dist/commands/vp.js.map +0 -1
- package/dist/commands/watch.d.ts +0 -76
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/watch.js +0 -613
- package/dist/commands/watch.js.map +0 -1
- package/dist/commands/worktree.d.ts +0 -63
- package/dist/commands/worktree.d.ts.map +0 -1
- package/dist/commands/worktree.js +0 -774
- package/dist/commands/worktree.js.map +0 -1
- package/dist/context/context-manager.d.ts +0 -155
- package/dist/context/context-manager.d.ts.map +0 -1
- package/dist/context/context-manager.js +0 -383
- package/dist/context/context-manager.js.map +0 -1
- package/dist/context/index.d.ts +0 -3
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js +0 -6
- package/dist/context/index.js.map +0 -1
- package/dist/context/session-manager.d.ts +0 -207
- package/dist/context/session-manager.d.ts.map +0 -1
- package/dist/context/session-manager.js +0 -686
- package/dist/context/session-manager.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -51
- package/dist/index.js.map +0 -1
- package/dist/interactive/interactive-mode.d.ts +0 -76
- package/dist/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/interactive/interactive-mode.js +0 -732
- package/dist/interactive/interactive-mode.js.map +0 -1
- package/dist/nlp/command-mapper.d.ts +0 -174
- package/dist/nlp/command-mapper.d.ts.map +0 -1
- package/dist/nlp/command-mapper.js +0 -624
- package/dist/nlp/command-mapper.js.map +0 -1
- package/dist/nlp/command-parser.d.ts +0 -106
- package/dist/nlp/command-parser.d.ts.map +0 -1
- package/dist/nlp/command-parser.js +0 -417
- package/dist/nlp/command-parser.js.map +0 -1
- package/dist/nlp/index.d.ts +0 -5
- package/dist/nlp/index.d.ts.map +0 -1
- package/dist/nlp/index.js +0 -8
- package/dist/nlp/index.js.map +0 -1
- package/dist/nlp/intent-classifier.d.ts +0 -59
- package/dist/nlp/intent-classifier.d.ts.map +0 -1
- package/dist/nlp/intent-classifier.js +0 -384
- package/dist/nlp/intent-classifier.js.map +0 -1
- package/dist/nlp/intent-parser.d.ts +0 -152
- package/dist/nlp/intent-parser.d.ts.map +0 -1
- package/dist/nlp/intent-parser.js +0 -744
- package/dist/nlp/intent-parser.js.map +0 -1
- package/dist/plugins/plugin-manager.d.ts +0 -120
- package/dist/plugins/plugin-manager.d.ts.map +0 -1
- package/dist/plugins/plugin-manager.js +0 -595
- package/dist/plugins/plugin-manager.js.map +0 -1
- package/dist/types/index.d.ts +0 -224
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/utils/backup-rollback-manager.d.ts +0 -72
- package/dist/utils/backup-rollback-manager.d.ts.map +0 -1
- package/dist/utils/backup-rollback-manager.js +0 -289
- package/dist/utils/backup-rollback-manager.js.map +0 -1
- package/dist/utils/claude-config-installer.d.ts +0 -98
- package/dist/utils/claude-config-installer.d.ts.map +0 -1
- package/dist/utils/claude-config-installer.js +0 -678
- package/dist/utils/claude-config-installer.js.map +0 -1
- package/dist/utils/config-manager.d.ts +0 -73
- package/dist/utils/config-manager.d.ts.map +0 -1
- package/dist/utils/config-manager.js +0 -339
- package/dist/utils/config-manager.js.map +0 -1
- package/dist/utils/error-handler.d.ts +0 -46
- package/dist/utils/error-handler.d.ts.map +0 -1
- package/dist/utils/error-handler.js +0 -169
- package/dist/utils/error-handler.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -25
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -105
- package/dist/utils/logger.js.map +0 -1
- package/src/commands/computer-setup-commands.ts +0 -872
|
@@ -8,7 +8,6 @@ import ora from 'ora';
|
|
|
8
8
|
|
|
9
9
|
import type { Ora } from 'ora';
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
// Type for ora spinner
|
|
13
12
|
type OraSpinner = Ora;
|
|
14
13
|
|
|
@@ -42,7 +41,7 @@ interface OptimizeOptions {
|
|
|
42
41
|
|
|
43
42
|
/**
|
|
44
43
|
* Claude Setup Commands
|
|
45
|
-
* Comprehensive setup for Claude Code,
|
|
44
|
+
* Comprehensive setup for Claude Code, Ruflo, and MCP tools
|
|
46
45
|
*
|
|
47
46
|
* Consolidated from:
|
|
48
47
|
* - /src/cli/commands/claude-setup.ts (374 lines) - function-based approach
|
|
@@ -59,7 +58,7 @@ export class ClaudeSetupCommands {
|
|
|
59
58
|
const claudeSetup = this.program
|
|
60
59
|
.command('claude-setup')
|
|
61
60
|
.alias('cs')
|
|
62
|
-
.description('Setup Claude Code,
|
|
61
|
+
.description('Setup Claude Code, Ruflo, and MCP tools')
|
|
63
62
|
.addHelpText(
|
|
64
63
|
'after',
|
|
65
64
|
chalk.gray(`
|
|
@@ -71,7 +70,7 @@ Examples:
|
|
|
71
70
|
${chalk.green('wundr claude-setup optimize')} Setup hardware-adaptive optimizations
|
|
72
71
|
${chalk.green('wundr claude-setup validate')} Validate Claude installation
|
|
73
72
|
${chalk.green('wundr claude-setup project')} Setup project with templates
|
|
74
|
-
`)
|
|
73
|
+
`)
|
|
75
74
|
);
|
|
76
75
|
|
|
77
76
|
// Main setup command (default)
|
|
@@ -81,7 +80,7 @@ Examples:
|
|
|
81
80
|
.option('--skip-chrome', 'Skip Chrome installation')
|
|
82
81
|
.option('--skip-mcp', 'Skip MCP tools installation')
|
|
83
82
|
.option('--skip-agents', 'Skip agent configuration')
|
|
84
|
-
.option('--skip-flow', 'Skip
|
|
83
|
+
.option('--skip-flow', 'Skip Ruflo setup')
|
|
85
84
|
.option('-g, --global', 'Install tools globally')
|
|
86
85
|
.action(async (options: SetupOptions) => {
|
|
87
86
|
await this.runCompleteSetup(options);
|
|
@@ -90,11 +89,16 @@ Examples:
|
|
|
90
89
|
// Project setup with templates (from /src/cli/commands/claude-setup.ts)
|
|
91
90
|
claudeSetup
|
|
92
91
|
.command('project [path]')
|
|
93
|
-
.description(
|
|
92
|
+
.description(
|
|
93
|
+
'Setup Claude Code in a project directory with optional template'
|
|
94
|
+
)
|
|
94
95
|
.option('-g, --global', 'Install tools globally')
|
|
95
96
|
.option('--skip-mcp', 'Skip MCP tools installation')
|
|
96
|
-
.option('--skip-flow', 'Skip
|
|
97
|
-
.option(
|
|
97
|
+
.option('--skip-flow', 'Skip Ruflo setup')
|
|
98
|
+
.option(
|
|
99
|
+
'-t, --template <name>',
|
|
100
|
+
'Use specific project template (typescript, react, nodejs, monorepo)'
|
|
101
|
+
)
|
|
98
102
|
.action(async (projectPath: string = '.', options: SetupOptions) => {
|
|
99
103
|
await this.runProjectSetup(projectPath, options);
|
|
100
104
|
});
|
|
@@ -105,7 +109,7 @@ Examples:
|
|
|
105
109
|
.description('Install and configure MCP tools')
|
|
106
110
|
.option(
|
|
107
111
|
'--tool <tool>',
|
|
108
|
-
'Install specific tool (firecrawl, context7, playwright, browser, sequentialthinking,
|
|
112
|
+
'Install specific tool (firecrawl, context7, playwright, browser, sequentialthinking, ruflo)'
|
|
109
113
|
)
|
|
110
114
|
.action(async (options: McpOptions) => {
|
|
111
115
|
await this.installMcpTools(options);
|
|
@@ -114,7 +118,7 @@ Examples:
|
|
|
114
118
|
// Agent configuration
|
|
115
119
|
claudeSetup
|
|
116
120
|
.command('agents')
|
|
117
|
-
.description('Configure
|
|
121
|
+
.description('Configure Ruflo agents')
|
|
118
122
|
.option('--list', 'List available agents')
|
|
119
123
|
.option('--enable <agents>', 'Enable specific agents (comma-separated)')
|
|
120
124
|
.option('--profile <profile>', 'Use profile-specific agents')
|
|
@@ -152,7 +156,11 @@ Examples:
|
|
|
152
156
|
claudeSetup
|
|
153
157
|
.command('config')
|
|
154
158
|
.description('Generate or update CLAUDE.md configuration')
|
|
155
|
-
.argument(
|
|
159
|
+
.argument(
|
|
160
|
+
'[path]',
|
|
161
|
+
'Path to repository (defaults to current directory)',
|
|
162
|
+
'.'
|
|
163
|
+
)
|
|
156
164
|
.action(async (repoPath: string) => {
|
|
157
165
|
await this.generateClaudeConfig(repoPath);
|
|
158
166
|
});
|
|
@@ -182,9 +190,9 @@ Examples:
|
|
|
182
190
|
spinner.succeed('Chrome installed');
|
|
183
191
|
}
|
|
184
192
|
|
|
185
|
-
// Step 3:
|
|
193
|
+
// Step 3: Ruflo setup
|
|
186
194
|
if (!options.skipFlow) {
|
|
187
|
-
await this.
|
|
195
|
+
await this.setupRuflo(spinner, process.cwd(), options.global);
|
|
188
196
|
}
|
|
189
197
|
|
|
190
198
|
// Step 4: Install MCP tools (if not skipped)
|
|
@@ -214,7 +222,10 @@ Examples:
|
|
|
214
222
|
/**
|
|
215
223
|
* Project setup - from /src/cli/commands/claude-setup.ts
|
|
216
224
|
*/
|
|
217
|
-
private async runProjectSetup(
|
|
225
|
+
private async runProjectSetup(
|
|
226
|
+
projectPath: string,
|
|
227
|
+
options: SetupOptions
|
|
228
|
+
): Promise<void> {
|
|
218
229
|
const spinner = ora('Starting Claude Code project setup...').start();
|
|
219
230
|
|
|
220
231
|
try {
|
|
@@ -224,12 +235,14 @@ Examples:
|
|
|
224
235
|
if (!fs.existsSync(path.join(repoPath, '.git'))) {
|
|
225
236
|
spinner.stop();
|
|
226
237
|
const inquirer = await import('inquirer');
|
|
227
|
-
const { shouldInitGit } = await inquirer.default.prompt([
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
238
|
+
const { shouldInitGit } = await inquirer.default.prompt([
|
|
239
|
+
{
|
|
240
|
+
type: 'confirm',
|
|
241
|
+
name: 'shouldInitGit',
|
|
242
|
+
message: 'Not a git repository. Initialize git?',
|
|
243
|
+
default: true,
|
|
244
|
+
},
|
|
245
|
+
]);
|
|
233
246
|
|
|
234
247
|
if (shouldInitGit) {
|
|
235
248
|
spinner.start('Initializing git repository...');
|
|
@@ -240,9 +253,9 @@ Examples:
|
|
|
240
253
|
}
|
|
241
254
|
}
|
|
242
255
|
|
|
243
|
-
// Step 1:
|
|
256
|
+
// Step 1: Ruflo setup
|
|
244
257
|
if (!options.skipFlow) {
|
|
245
|
-
await this.
|
|
258
|
+
await this.setupRuflo(spinner, repoPath, options.global);
|
|
246
259
|
}
|
|
247
260
|
|
|
248
261
|
// Step 2: MCP Tools setup
|
|
@@ -258,7 +271,7 @@ Examples:
|
|
|
258
271
|
await this.setupProjectTemplate(spinner, repoPath, options.template);
|
|
259
272
|
}
|
|
260
273
|
|
|
261
|
-
// Step 5: Initialize swarm if
|
|
274
|
+
// Step 5: Initialize swarm if Ruflo is available
|
|
262
275
|
if (!options.skipFlow) {
|
|
263
276
|
await this.initializeSwarm(spinner, repoPath);
|
|
264
277
|
}
|
|
@@ -270,34 +283,42 @@ Examples:
|
|
|
270
283
|
|
|
271
284
|
// Final instructions
|
|
272
285
|
this.displayProjectFinalInstructions(repoPath, options);
|
|
273
|
-
|
|
274
286
|
} catch (error) {
|
|
275
287
|
spinner.stop();
|
|
276
288
|
console.error(chalk.red('ā Setup failed:'));
|
|
277
|
-
console.error(
|
|
289
|
+
console.error(
|
|
290
|
+
chalk.red(error instanceof Error ? error.message : String(error))
|
|
291
|
+
);
|
|
278
292
|
process.exit(1);
|
|
279
293
|
}
|
|
280
294
|
}
|
|
281
295
|
|
|
282
296
|
/**
|
|
283
|
-
* Setup
|
|
297
|
+
* Setup Ruflo - from /src/cli/commands/claude-setup.ts
|
|
284
298
|
*/
|
|
285
|
-
private async
|
|
286
|
-
spinner
|
|
299
|
+
private async setupRuflo(
|
|
300
|
+
spinner: OraSpinner,
|
|
301
|
+
repoPath: string,
|
|
302
|
+
global?: boolean
|
|
303
|
+
): Promise<void> {
|
|
304
|
+
spinner.text = 'Setting up Ruflo...';
|
|
287
305
|
|
|
288
306
|
try {
|
|
289
|
-
// Check if
|
|
290
|
-
execSync('npx
|
|
291
|
-
spinner.text = '
|
|
307
|
+
// Check if Ruflo is already installed
|
|
308
|
+
execSync('npx ruflo@latest --version', { stdio: 'ignore' });
|
|
309
|
+
spinner.text = 'Ruflo already available, configuring...';
|
|
292
310
|
} catch {
|
|
293
|
-
spinner.text = 'Installing
|
|
311
|
+
spinner.text = 'Installing Ruflo...';
|
|
294
312
|
|
|
295
313
|
if (global) {
|
|
296
|
-
execSync('npm install -g
|
|
314
|
+
execSync('npm install -g ruflo@latest', { stdio: 'inherit' });
|
|
297
315
|
} else {
|
|
298
316
|
// Add to package.json dev dependencies if it exists
|
|
299
317
|
if (fs.existsSync(path.join(repoPath, 'package.json'))) {
|
|
300
|
-
execSync('npm install --save-dev
|
|
318
|
+
execSync('npm install --save-dev ruflo@latest', {
|
|
319
|
+
cwd: repoPath,
|
|
320
|
+
stdio: 'inherit',
|
|
321
|
+
});
|
|
301
322
|
}
|
|
302
323
|
}
|
|
303
324
|
}
|
|
@@ -305,23 +326,32 @@ Examples:
|
|
|
305
326
|
// Add MCP server configuration
|
|
306
327
|
spinner.text = 'Configuring Claude MCP server...';
|
|
307
328
|
try {
|
|
308
|
-
execSync('claude mcp add
|
|
329
|
+
execSync('claude mcp add ruflo npx ruflo@latest mcp start', {
|
|
309
330
|
cwd: repoPath,
|
|
310
331
|
stdio: 'pipe',
|
|
311
332
|
});
|
|
312
333
|
} catch {
|
|
313
334
|
// MCP configuration might fail if Claude Desktop isn't installed
|
|
314
|
-
console.log(
|
|
315
|
-
|
|
335
|
+
console.log(
|
|
336
|
+
chalk.yellow('\nā ļø Could not configure MCP server automatically.')
|
|
337
|
+
);
|
|
338
|
+
console.log(
|
|
339
|
+
chalk.yellow(
|
|
340
|
+
'Please run manually: claude mcp add ruflo npx ruflo@latest mcp start'
|
|
341
|
+
)
|
|
342
|
+
);
|
|
316
343
|
}
|
|
317
344
|
|
|
318
|
-
spinner.text = '
|
|
345
|
+
spinner.text = 'Ruflo setup completed';
|
|
319
346
|
}
|
|
320
347
|
|
|
321
348
|
/**
|
|
322
349
|
* Setup MCP Tools directory - from /src/cli/commands/claude-setup.ts
|
|
323
350
|
*/
|
|
324
|
-
private async setupMCPToolsDirectory(
|
|
351
|
+
private async setupMCPToolsDirectory(
|
|
352
|
+
spinner: OraSpinner,
|
|
353
|
+
repoPath: string
|
|
354
|
+
): Promise<void> {
|
|
325
355
|
spinner.text = 'Setting up MCP Tools directory...';
|
|
326
356
|
|
|
327
357
|
const mcpToolsPath = path.join(repoPath, 'mcp-tools');
|
|
@@ -356,7 +386,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
356
386
|
|
|
357
387
|
fs.writeFileSync(
|
|
358
388
|
path.join(mcpToolsPath, 'package.json'),
|
|
359
|
-
JSON.stringify(mcpPackageJson, null, 2)
|
|
389
|
+
JSON.stringify(mcpPackageJson, null, 2)
|
|
360
390
|
);
|
|
361
391
|
}
|
|
362
392
|
|
|
@@ -370,7 +400,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
370
400
|
const spinner = ora();
|
|
371
401
|
const scriptPath = path.join(
|
|
372
402
|
__dirname,
|
|
373
|
-
'../../../../scripts/install-mcp-tools.sh'
|
|
403
|
+
'../../../../scripts/install-mcp-tools.sh'
|
|
374
404
|
);
|
|
375
405
|
|
|
376
406
|
console.log(chalk.cyan('\nš¦ Installing MCP Tools...\n'));
|
|
@@ -382,10 +412,12 @@ echo "Customize this script with your specific MCP tools"
|
|
|
382
412
|
const installCommands: Record<string, string> = {
|
|
383
413
|
firecrawl: 'npx claude mcp add firecrawl npx @firecrawl/mcp-server',
|
|
384
414
|
context7: 'npx claude mcp add context7 npx @context7/mcp-server',
|
|
385
|
-
playwright:
|
|
415
|
+
playwright:
|
|
416
|
+
'npx claude mcp add playwright npx @playwright/mcp-server',
|
|
386
417
|
browser: 'npx claude mcp add browser npx @browser/mcp-server',
|
|
387
|
-
sequentialthinking:
|
|
388
|
-
|
|
418
|
+
sequentialthinking:
|
|
419
|
+
'npm install -g @modelcontextprotocol/server-sequentialthinking',
|
|
420
|
+
ruflo: 'claude mcp add ruflo npx ruflo@latest mcp start',
|
|
389
421
|
};
|
|
390
422
|
|
|
391
423
|
const command = installCommands[options.tool];
|
|
@@ -394,7 +426,11 @@ echo "Customize this script with your specific MCP tools"
|
|
|
394
426
|
spinner.succeed(`${options.tool} MCP installed`);
|
|
395
427
|
} else {
|
|
396
428
|
spinner.fail(`Unknown tool: ${options.tool}`);
|
|
397
|
-
console.log(
|
|
429
|
+
console.log(
|
|
430
|
+
chalk.yellow(
|
|
431
|
+
`Available tools: ${Object.keys(installCommands).join(', ')}`
|
|
432
|
+
)
|
|
433
|
+
);
|
|
398
434
|
}
|
|
399
435
|
} catch (error) {
|
|
400
436
|
spinner.fail(`Failed to install ${options.tool}`);
|
|
@@ -403,7 +439,9 @@ echo "Customize this script with your specific MCP tools"
|
|
|
403
439
|
} else {
|
|
404
440
|
// Try to install all tools using the script if it exists
|
|
405
441
|
if (fs.existsSync(scriptPath)) {
|
|
406
|
-
console.log(
|
|
442
|
+
console.log(
|
|
443
|
+
chalk.gray('Running comprehensive MCP tools installation...')
|
|
444
|
+
);
|
|
407
445
|
|
|
408
446
|
const install = spawn('bash', [scriptPath], {
|
|
409
447
|
stdio: 'inherit',
|
|
@@ -413,7 +451,9 @@ echo "Customize this script with your specific MCP tools"
|
|
|
413
451
|
return new Promise((resolve, reject) => {
|
|
414
452
|
install.on('close', code => {
|
|
415
453
|
if (code === 0) {
|
|
416
|
-
console.log(
|
|
454
|
+
console.log(
|
|
455
|
+
chalk.green('\nā
All MCP tools installed successfully')
|
|
456
|
+
);
|
|
417
457
|
resolve();
|
|
418
458
|
} else {
|
|
419
459
|
reject(new Error(`Installation failed with code ${code}`));
|
|
@@ -424,7 +464,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
424
464
|
// Fallback: install core tools
|
|
425
465
|
console.log(chalk.gray('Installing core MCP tools...'));
|
|
426
466
|
|
|
427
|
-
const coreTools = ['
|
|
467
|
+
const coreTools = ['ruflo', 'sequentialthinking'];
|
|
428
468
|
for (const tool of coreTools) {
|
|
429
469
|
try {
|
|
430
470
|
await this.installMcpTools({ tool });
|
|
@@ -439,7 +479,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
439
479
|
}
|
|
440
480
|
|
|
441
481
|
/**
|
|
442
|
-
* Configure
|
|
482
|
+
* Configure Ruflo agents
|
|
443
483
|
*/
|
|
444
484
|
private async configureAgents(options: AgentOptions): Promise<void> {
|
|
445
485
|
const spinner = ora();
|
|
@@ -449,7 +489,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
449
489
|
return;
|
|
450
490
|
}
|
|
451
491
|
|
|
452
|
-
spinner.start('Configuring
|
|
492
|
+
spinner.start('Configuring Ruflo agents...');
|
|
453
493
|
|
|
454
494
|
const agents = options.enable
|
|
455
495
|
? options.enable.split(',')
|
|
@@ -466,7 +506,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
466
506
|
const config = this.generateAgentConfig(agent);
|
|
467
507
|
fs.writeFileSync(
|
|
468
508
|
path.join(agentsDir, `${agent}.json`),
|
|
469
|
-
JSON.stringify(config, null, 2)
|
|
509
|
+
JSON.stringify(config, null, 2)
|
|
470
510
|
);
|
|
471
511
|
}
|
|
472
512
|
|
|
@@ -485,7 +525,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
485
525
|
|
|
486
526
|
const checks = [
|
|
487
527
|
{ name: 'Claude CLI', check: () => this.isClaudeInstalled() },
|
|
488
|
-
{ name: '
|
|
528
|
+
{ name: 'Ruflo', check: () => this.isRufloInstalled() },
|
|
489
529
|
{ name: 'Chrome Browser', check: () => this.isChromeInstalled() },
|
|
490
530
|
{ name: 'Claude Directory', check: () => this.claudeDirExists() },
|
|
491
531
|
{ name: 'Agent Configurations', check: () => this.agentsConfigured() },
|
|
@@ -512,8 +552,8 @@ echo "Customize this script with your specific MCP tools"
|
|
|
512
552
|
} else {
|
|
513
553
|
console.log(
|
|
514
554
|
chalk.yellow(
|
|
515
|
-
'\nā ļø Some checks failed. Run with --fix to attempt repairs.'
|
|
516
|
-
)
|
|
555
|
+
'\nā ļø Some checks failed. Run with --fix to attempt repairs.'
|
|
556
|
+
)
|
|
517
557
|
);
|
|
518
558
|
}
|
|
519
559
|
}
|
|
@@ -542,7 +582,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
542
582
|
private async setupOptimizations(options: OptimizeOptions): Promise<void> {
|
|
543
583
|
const spinner = ora();
|
|
544
584
|
console.log(
|
|
545
|
-
chalk.cyan.bold('\nā” Claude Code Hardware-Adaptive Optimization Setup\n')
|
|
585
|
+
chalk.cyan.bold('\nā” Claude Code Hardware-Adaptive Optimization Setup\n')
|
|
546
586
|
);
|
|
547
587
|
|
|
548
588
|
try {
|
|
@@ -550,7 +590,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
550
590
|
const scriptsDir = path.join(homeDir, '.claude', 'scripts');
|
|
551
591
|
const resourcesDir = path.join(
|
|
552
592
|
__dirname,
|
|
553
|
-
'../../../computer-setup/resources/scripts'
|
|
593
|
+
'../../../computer-setup/resources/scripts'
|
|
554
594
|
);
|
|
555
595
|
|
|
556
596
|
// Check if optimization scripts already exist
|
|
@@ -585,8 +625,8 @@ echo "Customize this script with your specific MCP tools"
|
|
|
585
625
|
spinner.fail('Optimization scripts not found in resources');
|
|
586
626
|
console.error(
|
|
587
627
|
chalk.red(
|
|
588
|
-
`Expected scripts at: ${resourcesDir}\nPlease ensure @wundr/computer-setup is installed
|
|
589
|
-
)
|
|
628
|
+
`Expected scripts at: ${resourcesDir}\nPlease ensure @wundr/computer-setup is installed.`
|
|
629
|
+
)
|
|
590
630
|
);
|
|
591
631
|
return;
|
|
592
632
|
}
|
|
@@ -633,26 +673,28 @@ echo "Customize this script with your specific MCP tools"
|
|
|
633
673
|
// Show what was installed
|
|
634
674
|
console.log(chalk.cyan('š¦ Installed Scripts:'));
|
|
635
675
|
console.log(
|
|
636
|
-
chalk.white(' ⢠detect-hardware-limits.js - Hardware detection')
|
|
676
|
+
chalk.white(' ⢠detect-hardware-limits.js - Hardware detection')
|
|
637
677
|
);
|
|
638
678
|
console.log(
|
|
639
|
-
chalk.white(' ⢠claude-optimized - Optimized Claude wrapper')
|
|
679
|
+
chalk.white(' ⢠claude-optimized - Optimized Claude wrapper')
|
|
640
680
|
);
|
|
641
681
|
console.log(
|
|
642
|
-
chalk.white(' ⢠orchestrator.js - Fault-tolerant orchestration')
|
|
682
|
+
chalk.white(' ⢠orchestrator.js - Fault-tolerant orchestration')
|
|
643
683
|
);
|
|
644
684
|
console.log(
|
|
645
|
-
chalk.white(' ⢠cleanup-zombies.sh - Process cleanup utility')
|
|
685
|
+
chalk.white(' ⢠cleanup-zombies.sh - Process cleanup utility')
|
|
646
686
|
);
|
|
647
687
|
|
|
648
688
|
console.log(chalk.cyan('\nš§ Shell Aliases:'));
|
|
649
689
|
console.log(
|
|
650
|
-
chalk.white(' ⢠claude - Hardware-optimized Claude wrapper')
|
|
690
|
+
chalk.white(' ⢠claude - Hardware-optimized Claude wrapper')
|
|
651
691
|
);
|
|
652
692
|
console.log(chalk.white(' ⢠claude-stats - Show hardware statistics'));
|
|
653
|
-
console.log(chalk.white(' ⢠claude-cleanup - Clean up zombie processes'));
|
|
654
693
|
console.log(
|
|
655
|
-
chalk.white(' ⢠claude-
|
|
694
|
+
chalk.white(' ⢠claude-cleanup - Clean up zombie processes')
|
|
695
|
+
);
|
|
696
|
+
console.log(
|
|
697
|
+
chalk.white(' ⢠claude-orchestrate - Run multi-task orchestrator')
|
|
656
698
|
);
|
|
657
699
|
|
|
658
700
|
console.log(chalk.cyan('\nš Next Steps:'));
|
|
@@ -660,7 +702,7 @@ echo "Customize this script with your specific MCP tools"
|
|
|
660
702
|
console.log('2. Run "claude-stats" to see your hardware configuration');
|
|
661
703
|
console.log('3. Use "claude" command as normal - now optimized!');
|
|
662
704
|
console.log(
|
|
663
|
-
'4. Read ~/.claude/scripts/QUICK-START.md for advanced usage'
|
|
705
|
+
'4. Read ~/.claude/scripts/QUICK-START.md for advanced usage'
|
|
664
706
|
);
|
|
665
707
|
} catch (error) {
|
|
666
708
|
spinner.fail('Optimization setup failed');
|
|
@@ -679,24 +721,38 @@ echo "Customize this script with your specific MCP tools"
|
|
|
679
721
|
const resolvedPath = path.resolve(repoPath);
|
|
680
722
|
await this.generateClaudeConfigForPath(spinner, resolvedPath);
|
|
681
723
|
spinner.succeed('CLAUDE.md generated successfully');
|
|
682
|
-
console.log(
|
|
724
|
+
console.log(
|
|
725
|
+
chalk.green(
|
|
726
|
+
`\nā
CLAUDE.md created at: ${path.join(resolvedPath, 'CLAUDE.md')}`
|
|
727
|
+
)
|
|
728
|
+
);
|
|
683
729
|
} catch (error) {
|
|
684
730
|
spinner.fail('Failed to generate CLAUDE.md');
|
|
685
|
-
console.error(
|
|
731
|
+
console.error(
|
|
732
|
+
chalk.red(error instanceof Error ? error.message : String(error))
|
|
733
|
+
);
|
|
686
734
|
}
|
|
687
735
|
}
|
|
688
736
|
|
|
689
737
|
/**
|
|
690
738
|
* Generate CLAUDE.md for a specific path
|
|
691
739
|
*/
|
|
692
|
-
private async generateClaudeConfigForPath(
|
|
740
|
+
private async generateClaudeConfigForPath(
|
|
741
|
+
spinner: OraSpinner,
|
|
742
|
+
repoPath: string
|
|
743
|
+
): Promise<void> {
|
|
693
744
|
spinner.text = 'Generating CLAUDE.md configuration...';
|
|
694
745
|
|
|
695
746
|
try {
|
|
696
747
|
// Try to use the ClaudeConfigGenerator if available
|
|
697
748
|
// Use path.resolve to construct the path at runtime to avoid TypeScript rootDir issues
|
|
698
|
-
const generatorPath = path.resolve(
|
|
699
|
-
|
|
749
|
+
const generatorPath = path.resolve(
|
|
750
|
+
__dirname,
|
|
751
|
+
'../../../../../src/claude-generator/claude-config-generator.js'
|
|
752
|
+
);
|
|
753
|
+
const { ClaudeConfigGenerator } = await import(
|
|
754
|
+
/* @vite-ignore */ generatorPath
|
|
755
|
+
);
|
|
700
756
|
const generator = new ClaudeConfigGenerator(repoPath);
|
|
701
757
|
|
|
702
758
|
const claudeContent = await generator.generateClaudeMarkdown();
|
|
@@ -734,27 +790,33 @@ This project uses Claude Code for AI-assisted development.
|
|
|
734
790
|
- Add tests for new features
|
|
735
791
|
|
|
736
792
|
## MCP Tools
|
|
737
|
-
|
|
738
|
-
Run \`npx
|
|
793
|
+
Ruflo is configured for enhanced AI coordination.
|
|
794
|
+
Run \`npx ruflo@latest sparc modes\` to see available modes.
|
|
739
795
|
`;
|
|
740
796
|
}
|
|
741
797
|
|
|
742
798
|
/**
|
|
743
799
|
* Setup project template - from /src/cli/commands/claude-setup.ts
|
|
744
800
|
*/
|
|
745
|
-
private async setupProjectTemplate(
|
|
801
|
+
private async setupProjectTemplate(
|
|
802
|
+
spinner: OraSpinner,
|
|
803
|
+
repoPath: string,
|
|
804
|
+
templateName: string
|
|
805
|
+
): Promise<void> {
|
|
746
806
|
spinner.text = `Applying ${templateName} template...`;
|
|
747
807
|
|
|
748
808
|
const templates: Record<string, () => void> = {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
809
|
+
typescript: () => this.setupTypeScriptTemplate(repoPath),
|
|
810
|
+
react: () => this.setupReactTemplate(repoPath),
|
|
811
|
+
nodejs: () => this.setupNodeTemplate(repoPath),
|
|
812
|
+
monorepo: () => this.setupMonorepoTemplate(repoPath),
|
|
753
813
|
};
|
|
754
814
|
|
|
755
815
|
const setupFunction = templates[templateName];
|
|
756
816
|
if (!setupFunction) {
|
|
757
|
-
throw new Error(
|
|
817
|
+
throw new Error(
|
|
818
|
+
`Unknown template: ${templateName}. Available: ${Object.keys(templates).join(', ')}`
|
|
819
|
+
);
|
|
758
820
|
}
|
|
759
821
|
|
|
760
822
|
setupFunction();
|
|
@@ -790,7 +852,10 @@ Run \`npx claude-flow sparc modes\` to see available modes.
|
|
|
790
852
|
const srcPath = path.join(repoPath, 'src');
|
|
791
853
|
if (!fs.existsSync(srcPath)) {
|
|
792
854
|
fs.mkdirSync(srcPath, { recursive: true });
|
|
793
|
-
fs.writeFileSync(
|
|
855
|
+
fs.writeFileSync(
|
|
856
|
+
path.join(srcPath, 'index.ts'),
|
|
857
|
+
'// Your TypeScript code here\n'
|
|
858
|
+
);
|
|
794
859
|
}
|
|
795
860
|
}
|
|
796
861
|
|
|
@@ -819,7 +884,10 @@ Run \`npx claude-flow sparc modes\` to see available modes.
|
|
|
819
884
|
const srcPath = path.join(repoPath, 'src');
|
|
820
885
|
if (!fs.existsSync(srcPath)) {
|
|
821
886
|
fs.mkdirSync(srcPath, { recursive: true });
|
|
822
|
-
fs.writeFileSync(
|
|
887
|
+
fs.writeFileSync(
|
|
888
|
+
path.join(srcPath, 'index.js'),
|
|
889
|
+
'// Your Node.js code here\n'
|
|
890
|
+
);
|
|
823
891
|
}
|
|
824
892
|
|
|
825
893
|
// Create routes directory
|
|
@@ -851,7 +919,7 @@ Run \`npx claude-flow sparc modes\` to see available modes.
|
|
|
851
919
|
private: true,
|
|
852
920
|
workspaces: ['packages/*', 'apps/*'],
|
|
853
921
|
devDependencies: {
|
|
854
|
-
|
|
922
|
+
turbo: '^2.0.0',
|
|
855
923
|
},
|
|
856
924
|
};
|
|
857
925
|
|
|
@@ -862,19 +930,28 @@ Run \`npx claude-flow sparc modes\` to see available modes.
|
|
|
862
930
|
/**
|
|
863
931
|
* Initialize swarm - from /src/cli/commands/claude-setup.ts
|
|
864
932
|
*/
|
|
865
|
-
private async initializeSwarm(
|
|
866
|
-
spinner
|
|
933
|
+
private async initializeSwarm(
|
|
934
|
+
spinner: OraSpinner,
|
|
935
|
+
repoPath: string
|
|
936
|
+
): Promise<void> {
|
|
937
|
+
spinner.text = 'Initializing Ruflo swarm...';
|
|
867
938
|
|
|
868
939
|
try {
|
|
869
940
|
// Initialize basic swarm configuration
|
|
870
|
-
execSync('npx
|
|
941
|
+
execSync('npx ruflo@latest init', {
|
|
871
942
|
cwd: repoPath,
|
|
872
943
|
stdio: 'pipe',
|
|
873
944
|
});
|
|
874
945
|
} catch {
|
|
875
946
|
// Swarm init might fail if not properly configured
|
|
876
|
-
console.log(
|
|
877
|
-
|
|
947
|
+
console.log(
|
|
948
|
+
chalk.yellow('\nā ļø Could not initialize swarm automatically.')
|
|
949
|
+
);
|
|
950
|
+
console.log(
|
|
951
|
+
chalk.yellow(
|
|
952
|
+
'You can initialize manually later with: npx ruflo@latest init'
|
|
953
|
+
)
|
|
954
|
+
);
|
|
878
955
|
}
|
|
879
956
|
|
|
880
957
|
spinner.text = 'Swarm initialization completed';
|
|
@@ -883,7 +960,10 @@ Run \`npx claude-flow sparc modes\` to see available modes.
|
|
|
883
960
|
/**
|
|
884
961
|
* Validate project setup - from /src/cli/commands/claude-setup.ts
|
|
885
962
|
*/
|
|
886
|
-
private async validateProjectSetup(
|
|
963
|
+
private async validateProjectSetup(
|
|
964
|
+
spinner: OraSpinner,
|
|
965
|
+
repoPath: string
|
|
966
|
+
): Promise<void> {
|
|
887
967
|
spinner.text = 'Validating setup...';
|
|
888
968
|
|
|
889
969
|
const validations = [
|
|
@@ -899,7 +979,9 @@ Run \`npx claude-flow sparc modes\` to see available modes.
|
|
|
899
979
|
|
|
900
980
|
const failures = results.filter(r => !r.exists);
|
|
901
981
|
if (failures.length > 0) {
|
|
902
|
-
throw new Error(
|
|
982
|
+
throw new Error(
|
|
983
|
+
`Setup validation failed: Missing ${failures.map(f => f.name).join(', ')}`
|
|
984
|
+
);
|
|
903
985
|
}
|
|
904
986
|
|
|
905
987
|
spinner.text = 'Setup validation passed';
|
|
@@ -950,15 +1032,15 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
|
|
|
950
1032
|
// Check if optimization config already exists
|
|
951
1033
|
if (
|
|
952
1034
|
content.includes(
|
|
953
|
-
'Claude Code - Hardware-Adaptive Configuration (Auto-generated by Wundr)'
|
|
1035
|
+
'Claude Code - Hardware-Adaptive Configuration (Auto-generated by Wundr)'
|
|
954
1036
|
)
|
|
955
1037
|
) {
|
|
956
1038
|
// Remove old config and add new one
|
|
957
1039
|
const lines = content.split('\n');
|
|
958
1040
|
const startIdx = lines.findIndex(line =>
|
|
959
1041
|
line.includes(
|
|
960
|
-
'Claude Code - Hardware-Adaptive Configuration (Auto-generated by Wundr)'
|
|
961
|
-
)
|
|
1042
|
+
'Claude Code - Hardware-Adaptive Configuration (Auto-generated by Wundr)'
|
|
1043
|
+
)
|
|
962
1044
|
);
|
|
963
1045
|
|
|
964
1046
|
if (startIdx !== -1) {
|
|
@@ -990,17 +1072,17 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
|
|
|
990
1072
|
private async installChrome(): Promise<void> {
|
|
991
1073
|
if (process.platform === 'darwin') {
|
|
992
1074
|
execSync(
|
|
993
|
-
'curl -L -o ~/Downloads/googlechrome.dmg "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"'
|
|
1075
|
+
'curl -L -o ~/Downloads/googlechrome.dmg "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"'
|
|
994
1076
|
);
|
|
995
1077
|
execSync('hdiutil attach ~/Downloads/googlechrome.dmg');
|
|
996
1078
|
execSync(
|
|
997
|
-
'cp -R "/Volumes/Google Chrome/Google Chrome.app" /Applications/'
|
|
1079
|
+
'cp -R "/Volumes/Google Chrome/Google Chrome.app" /Applications/'
|
|
998
1080
|
);
|
|
999
1081
|
execSync('hdiutil detach "/Volumes/Google Chrome"');
|
|
1000
1082
|
execSync('rm ~/Downloads/googlechrome.dmg');
|
|
1001
1083
|
} else {
|
|
1002
1084
|
console.log(
|
|
1003
|
-
chalk.yellow('Chrome installation is only automated for macOS')
|
|
1085
|
+
chalk.yellow('Chrome installation is only automated for macOS')
|
|
1004
1086
|
);
|
|
1005
1087
|
}
|
|
1006
1088
|
}
|
|
@@ -1015,7 +1097,7 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
|
|
|
1015
1097
|
const config = {
|
|
1016
1098
|
claudeCodeOptions: {
|
|
1017
1099
|
enabledMcpjsonServers: [
|
|
1018
|
-
'
|
|
1100
|
+
'ruflo',
|
|
1019
1101
|
'firecrawl',
|
|
1020
1102
|
'context7',
|
|
1021
1103
|
'playwright',
|
|
@@ -1046,9 +1128,9 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
|
|
|
1046
1128
|
}
|
|
1047
1129
|
}
|
|
1048
1130
|
|
|
1049
|
-
private
|
|
1131
|
+
private isRufloInstalled(): boolean {
|
|
1050
1132
|
try {
|
|
1051
|
-
execSync('npx
|
|
1133
|
+
execSync('npx ruflo@latest --version', { stdio: 'ignore' });
|
|
1052
1134
|
return true;
|
|
1053
1135
|
} catch {
|
|
1054
1136
|
return false;
|
|
@@ -1071,8 +1153,8 @@ alias claude-orchestrate='node $HOME/.claude/scripts/orchestrator.js'
|
|
|
1071
1153
|
const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
|
|
1072
1154
|
const agentsDir = path.join(homeDir, '.claude', 'agents');
|
|
1073
1155
|
if (!fs.existsSync(agentsDir)) {
|
|
1074
|
-
return false;
|
|
1075
|
-
}
|
|
1156
|
+
return false;
|
|
1157
|
+
}
|
|
1076
1158
|
|
|
1077
1159
|
const files = fs.readdirSync(agentsDir);
|
|
1078
1160
|
return files.length > 0;
|
|
@@ -1083,8 +1165,8 @@ return false;
|
|
|
1083
1165
|
const settingsPath = path.join(homeDir, '.claude', 'settings.json');
|
|
1084
1166
|
|
|
1085
1167
|
if (!fs.existsSync(settingsPath)) {
|
|
1086
|
-
return false;
|
|
1087
|
-
}
|
|
1168
|
+
return false;
|
|
1169
|
+
}
|
|
1088
1170
|
|
|
1089
1171
|
try {
|
|
1090
1172
|
const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
|
@@ -1095,7 +1177,7 @@ return false;
|
|
|
1095
1177
|
}
|
|
1096
1178
|
|
|
1097
1179
|
private listAgents(): void {
|
|
1098
|
-
console.log(chalk.cyan('\nš Available
|
|
1180
|
+
console.log(chalk.cyan('\nš Available Ruflo Agents:\n'));
|
|
1099
1181
|
|
|
1100
1182
|
const categories: Record<string, string[]> = {
|
|
1101
1183
|
'Core Development': [
|
|
@@ -1157,14 +1239,8 @@ return false;
|
|
|
1157
1239
|
'code-analyzer',
|
|
1158
1240
|
'base-template-generator',
|
|
1159
1241
|
],
|
|
1160
|
-
'Testing & Validation': [
|
|
1161
|
-
|
|
1162
|
-
'production-validator',
|
|
1163
|
-
],
|
|
1164
|
-
'Migration & Planning': [
|
|
1165
|
-
'migration-planner',
|
|
1166
|
-
'swarm-init',
|
|
1167
|
-
],
|
|
1242
|
+
'Testing & Validation': ['tdd-london-swarm', 'production-validator'],
|
|
1243
|
+
'Migration & Planning': ['migration-planner', 'swarm-init'],
|
|
1168
1244
|
};
|
|
1169
1245
|
|
|
1170
1246
|
for (const [category, agents] of Object.entries(categories)) {
|
|
@@ -1196,7 +1272,13 @@ return false;
|
|
|
1196
1272
|
'system-architect',
|
|
1197
1273
|
'backend-dev',
|
|
1198
1274
|
],
|
|
1199
|
-
devops: [
|
|
1275
|
+
devops: [
|
|
1276
|
+
'planner',
|
|
1277
|
+
'cicd-engineer',
|
|
1278
|
+
'perf-analyzer',
|
|
1279
|
+
'github-modes',
|
|
1280
|
+
'workflow-automation',
|
|
1281
|
+
],
|
|
1200
1282
|
ml: ['ml-developer', 'coder', 'tester', 'perf-analyzer', 'researcher'],
|
|
1201
1283
|
};
|
|
1202
1284
|
|
|
@@ -1210,7 +1292,7 @@ return false;
|
|
|
1210
1292
|
return {
|
|
1211
1293
|
name: agentName,
|
|
1212
1294
|
enabled: true,
|
|
1213
|
-
description: `${agentName} agent for
|
|
1295
|
+
description: `${agentName} agent for Ruflo`,
|
|
1214
1296
|
configuration: {
|
|
1215
1297
|
maxTokens: 8000,
|
|
1216
1298
|
temperature: 0.7,
|
|
@@ -1224,14 +1306,17 @@ return false;
|
|
|
1224
1306
|
/**
|
|
1225
1307
|
* Display final instructions for project setup
|
|
1226
1308
|
*/
|
|
1227
|
-
private displayProjectFinalInstructions(
|
|
1309
|
+
private displayProjectFinalInstructions(
|
|
1310
|
+
repoPath: string,
|
|
1311
|
+
options: SetupOptions
|
|
1312
|
+
): void {
|
|
1228
1313
|
console.log(chalk.green('\nš Claude Code Setup Complete!'));
|
|
1229
1314
|
console.log(chalk.blue('================================'));
|
|
1230
1315
|
|
|
1231
1316
|
console.log(chalk.yellow('\nš What was set up:'));
|
|
1232
1317
|
console.log('ā
CLAUDE.md configuration generated');
|
|
1233
1318
|
if (!options.skipFlow) {
|
|
1234
|
-
console.log('ā
|
|
1319
|
+
console.log('ā
Ruflo installed and configured');
|
|
1235
1320
|
}
|
|
1236
1321
|
if (!options.skipMcp) {
|
|
1237
1322
|
console.log('ā
MCP Tools directory created');
|
|
@@ -1244,13 +1329,13 @@ return false;
|
|
|
1244
1329
|
console.log('3. Verify Claude Desktop MCP connection');
|
|
1245
1330
|
|
|
1246
1331
|
if (!options.skipFlow) {
|
|
1247
|
-
console.log('4. Test
|
|
1332
|
+
console.log('4. Test Ruflo: npx ruflo@latest sparc modes');
|
|
1248
1333
|
}
|
|
1249
1334
|
|
|
1250
1335
|
console.log('5. Start coding with optimized Claude Code integration!');
|
|
1251
1336
|
|
|
1252
1337
|
console.log(chalk.yellow('\nš Resources:'));
|
|
1253
|
-
console.log('ā¢
|
|
1338
|
+
console.log('⢠Ruflo: https://github.com/ruvnet/ruflo');
|
|
1254
1339
|
console.log('⢠MCP Documentation: https://modelcontextprotocol.io/docs');
|
|
1255
1340
|
console.log('⢠Wundr Documentation: ./docs/');
|
|
1256
1341
|
|
|
@@ -1264,12 +1349,12 @@ return false;
|
|
|
1264
1349
|
console.log(chalk.cyan('š Next Steps:'));
|
|
1265
1350
|
console.log('1. Configure API keys for MCP tools (if needed)');
|
|
1266
1351
|
console.log(
|
|
1267
|
-
'2. Install Browser MCP Chrome extension: wundr claude-setup extension'
|
|
1352
|
+
'2. Install Browser MCP Chrome extension: wundr claude-setup extension'
|
|
1268
1353
|
);
|
|
1269
1354
|
console.log('3. Restart Claude Desktop to load new configurations');
|
|
1270
1355
|
console.log('4. Initialize a project: wundr claude-setup project');
|
|
1271
1356
|
console.log(
|
|
1272
|
-
'5. Start coding with
|
|
1357
|
+
'5. Start coding with Ruflo: npx ruflo@latest sparc tdd "feature"'
|
|
1273
1358
|
);
|
|
1274
1359
|
}
|
|
1275
1360
|
}
|