@wundr.io/cli 1.0.1 → 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.
- package/dist/ai/ai-service.d.ts +152 -0
- package/dist/ai/ai-service.d.ts.map +1 -0
- package/dist/ai/ai-service.js +430 -0
- package/dist/ai/ai-service.js.map +1 -0
- package/dist/ai/claude-client.d.ts +130 -0
- package/dist/ai/claude-client.d.ts.map +1 -0
- package/dist/ai/claude-client.js +340 -0
- package/dist/ai/claude-client.js.map +1 -0
- package/dist/ai/conversation-manager.d.ts +164 -0
- package/dist/ai/conversation-manager.d.ts.map +1 -0
- package/dist/ai/conversation-manager.js +614 -0
- package/dist/ai/conversation-manager.js.map +1 -0
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +8 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/cli.d.ts +36 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +192 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/ai.d.ts +89 -0
- package/dist/commands/ai.d.ts.map +1 -0
- package/dist/commands/ai.js +735 -0
- package/dist/commands/ai.js.map +1 -0
- package/dist/commands/alignment.d.ts +78 -0
- package/dist/commands/alignment.d.ts.map +1 -0
- package/dist/commands/alignment.js +817 -0
- package/dist/commands/alignment.js.map +1 -0
- package/dist/commands/analyze-optimized.d.ts +14 -0
- package/dist/commands/analyze-optimized.d.ts.map +1 -0
- package/dist/commands/analyze-optimized.js +440 -0
- package/dist/commands/analyze-optimized.js.map +1 -0
- package/dist/commands/analyze.d.ts +65 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +435 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/batch.d.ts +71 -0
- package/dist/commands/batch.d.ts.map +1 -0
- package/dist/commands/batch.js +738 -0
- package/dist/commands/batch.js.map +1 -0
- package/dist/commands/chat.d.ts +71 -0
- package/dist/commands/chat.d.ts.map +1 -0
- package/dist/commands/chat.js +674 -0
- package/dist/commands/chat.js.map +1 -0
- package/dist/commands/claude-init.d.ts +28 -0
- package/dist/commands/claude-init.d.ts.map +1 -0
- package/dist/commands/claude-init.js +591 -0
- package/dist/commands/claude-init.js.map +1 -0
- package/dist/commands/claude-setup.d.ts +119 -0
- package/dist/commands/claude-setup.d.ts.map +1 -0
- package/dist/commands/claude-setup.js +1073 -0
- package/dist/commands/claude-setup.js.map +1 -0
- package/dist/commands/computer-setup-commands.d.ts +53 -0
- package/dist/commands/computer-setup-commands.d.ts.map +1 -0
- package/dist/commands/computer-setup-commands.js +705 -0
- package/dist/commands/computer-setup-commands.js.map +1 -0
- package/dist/commands/computer-setup.d.ts +7 -0
- package/dist/commands/computer-setup.d.ts.map +1 -0
- package/dist/commands/computer-setup.js +849 -0
- package/dist/commands/computer-setup.js.map +1 -0
- package/dist/commands/create-command.d.ts +7 -0
- package/dist/commands/create-command.d.ts.map +1 -0
- package/dist/commands/create-command.js +158 -0
- package/dist/commands/create-command.js.map +1 -0
- package/dist/commands/create.d.ts +74 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +556 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/dashboard.d.ts +91 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +538 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/govern.d.ts +70 -0
- package/dist/commands/govern.d.ts.map +1 -0
- package/dist/commands/govern.js +481 -0
- package/dist/commands/govern.js.map +1 -0
- package/dist/commands/governance.d.ts +17 -0
- package/dist/commands/governance.d.ts.map +1 -0
- package/dist/commands/governance.js +703 -0
- package/dist/commands/governance.js.map +1 -0
- package/dist/commands/guardian.d.ts +20 -0
- package/dist/commands/guardian.d.ts.map +1 -0
- package/dist/commands/guardian.js +597 -0
- package/dist/commands/guardian.js.map +1 -0
- package/dist/commands/init.d.ts +59 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +650 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/performance-optimizer.d.ts +30 -0
- package/dist/commands/performance-optimizer.d.ts.map +1 -0
- package/dist/commands/performance-optimizer.js +650 -0
- package/dist/commands/performance-optimizer.js.map +1 -0
- package/dist/commands/plugins.d.ts +87 -0
- package/dist/commands/plugins.d.ts.map +1 -0
- package/dist/commands/plugins.js +685 -0
- package/dist/commands/plugins.js.map +1 -0
- package/dist/commands/rag.d.ts +7 -0
- package/dist/commands/rag.d.ts.map +1 -0
- package/dist/commands/rag.js +748 -0
- package/dist/commands/rag.js.map +1 -0
- package/dist/commands/session.d.ts +41 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +441 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/setup.d.ts +29 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +397 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/test-init.d.ts +9 -0
- package/dist/commands/test-init.d.ts.map +1 -0
- package/dist/commands/test-init.js +222 -0
- package/dist/commands/test-init.js.map +1 -0
- package/dist/commands/test.d.ts +25 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +217 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/vp.d.ts +7 -0
- package/dist/commands/vp.d.ts.map +1 -0
- package/dist/commands/vp.js +571 -0
- package/dist/commands/vp.js.map +1 -0
- package/dist/commands/watch.d.ts +76 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +613 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/commands/worktree.d.ts +63 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +774 -0
- package/dist/commands/worktree.js.map +1 -0
- package/dist/context/context-manager.d.ts +155 -0
- package/dist/context/context-manager.d.ts.map +1 -0
- package/dist/context/context-manager.js +383 -0
- package/dist/context/context-manager.js.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +6 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/session-manager.d.ts +207 -0
- package/dist/context/session-manager.d.ts.map +1 -0
- package/dist/context/session-manager.js +686 -0
- package/dist/context/session-manager.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive/interactive-mode.d.ts +76 -0
- package/dist/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/interactive/interactive-mode.js +732 -0
- package/dist/interactive/interactive-mode.js.map +1 -0
- package/dist/nlp/command-mapper.d.ts +174 -0
- package/dist/nlp/command-mapper.d.ts.map +1 -0
- package/dist/nlp/command-mapper.js +624 -0
- package/dist/nlp/command-mapper.js.map +1 -0
- package/dist/nlp/command-parser.d.ts +106 -0
- package/dist/nlp/command-parser.d.ts.map +1 -0
- package/dist/nlp/command-parser.js +417 -0
- package/dist/nlp/command-parser.js.map +1 -0
- package/dist/nlp/index.d.ts +5 -0
- package/dist/nlp/index.d.ts.map +1 -0
- package/dist/nlp/index.js +8 -0
- package/dist/nlp/index.js.map +1 -0
- package/dist/nlp/intent-classifier.d.ts +59 -0
- package/dist/nlp/intent-classifier.d.ts.map +1 -0
- package/dist/nlp/intent-classifier.js +384 -0
- package/dist/nlp/intent-classifier.js.map +1 -0
- package/dist/nlp/intent-parser.d.ts +152 -0
- package/dist/nlp/intent-parser.d.ts.map +1 -0
- package/dist/nlp/intent-parser.js +744 -0
- package/dist/nlp/intent-parser.js.map +1 -0
- package/dist/plugins/plugin-manager.d.ts +120 -0
- package/dist/plugins/plugin-manager.d.ts.map +1 -0
- package/dist/plugins/plugin-manager.js +595 -0
- package/dist/plugins/plugin-manager.js.map +1 -0
- package/dist/types/index.d.ts +224 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/backup-rollback-manager.d.ts +72 -0
- package/dist/utils/backup-rollback-manager.d.ts.map +1 -0
- package/dist/utils/backup-rollback-manager.js +289 -0
- package/dist/utils/backup-rollback-manager.js.map +1 -0
- package/dist/utils/claude-config-installer.d.ts +94 -0
- package/dist/utils/claude-config-installer.d.ts.map +1 -0
- package/dist/utils/claude-config-installer.js +628 -0
- package/dist/utils/claude-config-installer.js.map +1 -0
- package/dist/utils/config-manager.d.ts +73 -0
- package/dist/utils/config-manager.d.ts.map +1 -0
- package/dist/utils/config-manager.js +339 -0
- package/dist/utils/config-manager.js.map +1 -0
- package/dist/utils/error-handler.d.ts +46 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +169 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/logger.d.ts +25 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +105 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +23 -4
- package/src/ai/ai-service.ts +22 -19
- package/src/ai/claude-client.ts +20 -16
- package/src/ai/conversation-manager.ts +37 -30
- package/src/cli.ts +42 -13
- package/src/commands/ai.ts +59 -57
- package/src/commands/alignment.ts +1212 -0
- package/src/commands/analyze-optimized.ts +70 -62
- package/src/commands/analyze.ts +22 -20
- package/src/commands/batch.ts +41 -38
- package/src/commands/chat.ts +37 -34
- package/src/commands/claude-init.ts +38 -30
- package/src/commands/claude-setup.ts +692 -97
- package/src/commands/computer-setup-commands.ts +45 -39
- package/src/commands/computer-setup.ts +474 -4
- package/src/commands/create-command.ts +7 -7
- package/src/commands/create.ts +36 -33
- package/src/commands/dashboard.ts +33 -28
- package/src/commands/govern.ts +34 -29
- package/src/commands/governance.ts +1005 -0
- package/src/commands/guardian.ts +887 -0
- package/src/commands/init.ts +112 -22
- package/src/commands/performance-optimizer.ts +48 -42
- package/src/commands/plugins.ts +35 -32
- package/src/commands/project-update.ts +1053 -0
- package/src/commands/rag.ts +904 -0
- package/src/commands/session.ts +631 -0
- package/src/commands/setup.ts +35 -31
- package/src/commands/test-init.ts +6 -5
- package/src/commands/test.ts +7 -6
- package/src/commands/vp.ts +762 -0
- package/src/commands/watch.ts +44 -33
- package/src/commands/worktree.ts +1057 -0
- package/src/context/context-manager.ts +15 -12
- package/src/context/session-manager.ts +51 -40
- package/src/index.ts +7 -6
- package/src/interactive/interactive-mode.ts +25 -18
- package/src/lib/conflict-resolution.ts +28 -0
- package/src/lib/merge-strategy.ts +28 -0
- package/src/lib/safety-mechanisms.ts +47 -0
- package/src/lib/state-detection.ts +28 -0
- package/src/nlp/command-mapper.ts +35 -30
- package/src/nlp/command-parser.ts +20 -17
- package/src/nlp/intent-classifier.ts +7 -7
- package/src/nlp/intent-parser.ts +61 -49
- package/src/plugins/plugin-manager.ts +27 -23
- package/src/types/index.ts +1 -1
- package/src/types/modules.d.ts +1 -0
- package/src/utils/backup-rollback-manager.ts +13 -11
- package/src/utils/claude-config-installer.ts +18 -16
- package/src/utils/config-manager.ts +12 -9
- package/src/utils/error-handler.ts +5 -3
- package/src/utils/logger.ts +35 -12
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import * as fs from 'fs-extra';
|
|
3
|
-
import * as path from 'path';
|
|
4
1
|
import { execSync } from 'child_process';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
|
|
5
4
|
import chalk from 'chalk';
|
|
6
|
-
import
|
|
5
|
+
import * as fs from 'fs-extra';
|
|
7
6
|
import inquirer from 'inquirer';
|
|
7
|
+
import ora from 'ora';
|
|
8
|
+
|
|
9
|
+
import type { Command } from 'commander';
|
|
8
10
|
|
|
9
11
|
interface ProjectInfo {
|
|
10
12
|
name: string;
|
|
@@ -30,7 +32,7 @@ export class ClaudeInitCommand {
|
|
|
30
32
|
.command('claude-init')
|
|
31
33
|
.alias('ci')
|
|
32
34
|
.description(
|
|
33
|
-
'Initialize Claude Code and Claude Flow in current repository'
|
|
35
|
+
'Initialize Claude Code and Claude Flow in current repository',
|
|
34
36
|
)
|
|
35
37
|
.option('-i, --interactive', 'Interactive mode with prompts')
|
|
36
38
|
.option('-a, --audit', 'Run repository audit first')
|
|
@@ -38,11 +40,11 @@ export class ClaudeInitCommand {
|
|
|
38
40
|
.option('--agents <agents>', 'Comma-separated list of agents to enable')
|
|
39
41
|
.option(
|
|
40
42
|
'--mcp-tools <tools>',
|
|
41
|
-
'Comma-separated list of MCP tools to enable'
|
|
43
|
+
'Comma-separated list of MCP tools to enable',
|
|
42
44
|
)
|
|
43
45
|
.option(
|
|
44
46
|
'--profile <profile>',
|
|
45
|
-
'Developer profile (fullstack, frontend, backend, devops)'
|
|
47
|
+
'Developer profile (fullstack, frontend, backend, devops)',
|
|
46
48
|
)
|
|
47
49
|
.action(async options => {
|
|
48
50
|
await this.execute(options);
|
|
@@ -56,8 +58,8 @@ export class ClaudeInitCommand {
|
|
|
56
58
|
if (!this.isGitRepo()) {
|
|
57
59
|
console.error(
|
|
58
60
|
chalk.red(
|
|
59
|
-
'❌ Not in a git repository. Please run this command in a git repository.'
|
|
60
|
-
)
|
|
61
|
+
'❌ Not in a git repository. Please run this command in a git repository.',
|
|
62
|
+
),
|
|
61
63
|
);
|
|
62
64
|
process.exit(1);
|
|
63
65
|
}
|
|
@@ -87,7 +89,7 @@ export class ClaudeInitCommand {
|
|
|
87
89
|
|
|
88
90
|
// Setup agents
|
|
89
91
|
await this.setupAgents(
|
|
90
|
-
options.agents || this.getDefaultAgents(projectInfo)
|
|
92
|
+
options.agents || this.getDefaultAgents(projectInfo),
|
|
91
93
|
);
|
|
92
94
|
|
|
93
95
|
// Setup quality hooks
|
|
@@ -161,7 +163,7 @@ export class ClaudeInitCommand {
|
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
this.spinner.succeed(
|
|
164
|
-
`Project analyzed: ${projectInfo.name} (${projectInfo.type})
|
|
166
|
+
`Project analyzed: ${projectInfo.name} (${projectInfo.type})`,
|
|
165
167
|
);
|
|
166
168
|
return projectInfo;
|
|
167
169
|
}
|
|
@@ -183,10 +185,12 @@ export class ClaudeInitCommand {
|
|
|
183
185
|
};
|
|
184
186
|
|
|
185
187
|
// Structure checks
|
|
186
|
-
if (await fs.pathExists('src'))
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
if (await fs.pathExists('src')) {
|
|
189
|
+
auditResults.categories.structure.score += 10;
|
|
190
|
+
}
|
|
191
|
+
if (await fs.pathExists('.gitignore')) {
|
|
192
|
+
auditResults.categories.structure.score += 5;
|
|
193
|
+
}
|
|
190
194
|
if (projectInfo.isMonorepo && (await fs.pathExists('packages'))) {
|
|
191
195
|
auditResults.categories.structure.score += 5;
|
|
192
196
|
}
|
|
@@ -245,7 +249,7 @@ export class ClaudeInitCommand {
|
|
|
245
249
|
auditResults.categories.security.score += 10;
|
|
246
250
|
} else if (await fs.pathExists('.env')) {
|
|
247
251
|
auditResults.recommendations.push(
|
|
248
|
-
'Add .env.example for environment variables'
|
|
252
|
+
'Add .env.example for environment variables',
|
|
249
253
|
);
|
|
250
254
|
}
|
|
251
255
|
|
|
@@ -260,8 +264,8 @@ export class ClaudeInitCommand {
|
|
|
260
264
|
console.log(chalk.cyan('\n📊 Audit Results:'));
|
|
261
265
|
console.log(
|
|
262
266
|
chalk.white(
|
|
263
|
-
`Overall Score: ${auditResults.score}/${auditResults.maxScore}
|
|
264
|
-
)
|
|
267
|
+
`Overall Score: ${auditResults.score}/${auditResults.maxScore}`,
|
|
268
|
+
),
|
|
265
269
|
);
|
|
266
270
|
|
|
267
271
|
for (const [name, category] of Object.entries(auditResults.categories)) {
|
|
@@ -274,8 +278,8 @@ export class ClaudeInitCommand {
|
|
|
274
278
|
: chalk.red;
|
|
275
279
|
console.log(
|
|
276
280
|
color(
|
|
277
|
-
` ${name}: ${category.score}/${category.maxScore} (${percentage.toFixed(0)}%)
|
|
278
|
-
)
|
|
281
|
+
` ${name}: ${category.score}/${category.maxScore} (${percentage.toFixed(0)}%)`,
|
|
282
|
+
),
|
|
279
283
|
);
|
|
280
284
|
}
|
|
281
285
|
|
|
@@ -411,7 +415,7 @@ export class ClaudeInitCommand {
|
|
|
411
415
|
|
|
412
416
|
private async generateClaudeMd(
|
|
413
417
|
projectInfo: ProjectInfo,
|
|
414
|
-
options: any
|
|
418
|
+
options: any,
|
|
415
419
|
): Promise<void> {
|
|
416
420
|
this.spinner.start('Generating CLAUDE.md...');
|
|
417
421
|
|
|
@@ -529,7 +533,7 @@ By: Wundr Claude Init
|
|
|
529
533
|
|
|
530
534
|
private getWorkflowPatterns(
|
|
531
535
|
projectInfo: ProjectInfo,
|
|
532
|
-
agents: string[]
|
|
536
|
+
agents: string[],
|
|
533
537
|
): string {
|
|
534
538
|
const patterns: string[] = [];
|
|
535
539
|
|
|
@@ -562,9 +566,11 @@ By: Wundr Claude Init
|
|
|
562
566
|
|
|
563
567
|
private async setupClaudeFlow(
|
|
564
568
|
projectInfo: ProjectInfo,
|
|
565
|
-
options: any
|
|
569
|
+
options: any,
|
|
566
570
|
): Promise<void> {
|
|
567
|
-
if (!options.setupClaudeFlow)
|
|
571
|
+
if (!options.setupClaudeFlow) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
568
574
|
|
|
569
575
|
this.spinner.start('Setting up Claude Flow...');
|
|
570
576
|
|
|
@@ -598,7 +604,9 @@ By: Wundr Claude Init
|
|
|
598
604
|
}
|
|
599
605
|
|
|
600
606
|
private async setupMcpTools(mcpTools: string | string[]): Promise<void> {
|
|
601
|
-
if (!mcpTools)
|
|
607
|
+
if (!mcpTools) {
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
602
610
|
|
|
603
611
|
const tools = Array.isArray(mcpTools) ? mcpTools : mcpTools.split(',');
|
|
604
612
|
|
|
@@ -620,7 +628,7 @@ By: Wundr Claude Init
|
|
|
620
628
|
case 'playwright':
|
|
621
629
|
execSync(
|
|
622
630
|
'npx claude mcp add playwright npx @playwright/mcp-server',
|
|
623
|
-
{ stdio: 'ignore' }
|
|
631
|
+
{ stdio: 'ignore' },
|
|
624
632
|
);
|
|
625
633
|
break;
|
|
626
634
|
case 'browser':
|
|
@@ -631,7 +639,7 @@ By: Wundr Claude Init
|
|
|
631
639
|
case 'sequentialthinking':
|
|
632
640
|
execSync(
|
|
633
641
|
'npm install -g @modelcontextprotocol/server-sequentialthinking',
|
|
634
|
-
{ stdio: 'ignore' }
|
|
642
|
+
{ stdio: 'ignore' },
|
|
635
643
|
);
|
|
636
644
|
break;
|
|
637
645
|
}
|
|
@@ -699,12 +707,12 @@ echo "✅ All quality checks passed!"
|
|
|
699
707
|
console.log(chalk.white('1. Review and customize CLAUDE.md'));
|
|
700
708
|
console.log(chalk.white('2. Configure API keys for MCP tools (if needed)'));
|
|
701
709
|
console.log(
|
|
702
|
-
chalk.white('3. Restart Claude Desktop to load new configurations')
|
|
710
|
+
chalk.white('3. Restart Claude Desktop to load new configurations'),
|
|
703
711
|
);
|
|
704
712
|
console.log(
|
|
705
713
|
chalk.white(
|
|
706
|
-
'4. Run: npx claude-flow@alpha sparc tdd "your first feature"'
|
|
707
|
-
)
|
|
714
|
+
'4. Run: npx claude-flow@alpha sparc tdd "your first feature"',
|
|
715
|
+
),
|
|
708
716
|
);
|
|
709
717
|
console.log(chalk.cyan('\n🚀 Happy coding with Claude!\n'));
|
|
710
718
|
}
|