π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix: correct claude-flow init configuration placement (fixes #276)
rUv4265b95f3e76
diff --git a/src/cli/simple-commands/init/gitignore-updater.js b/src/cli/simple-commands/init/gitignore-updater.jsindex 872b59b9cd..641c26cd41 100644--- a/src/cli/simple-commands/init/gitignore-updater.js+++ b/src/cli/simple-commands/init/gitignore-updater.js@@ -11,7 +11,8 @@ import { existsSync, readTextFile, writeTextFile } from '../../node-compat.js';const CLAUDE_FLOW_GITIGNORE_ENTRIES = `# Claude Flow generated files.claude/settings.local.json-.claude/mcp.json+.mcp.json+claude-flow.config.json.swarm/.hive-mind/memory/claude-flow-data.jsondiff --git a/src/cli/simple-commands/init/help.js b/src/cli/simple-commands/init/help.jsindex a3e8a2bf67..6cc6e86a9d 100644--- a/src/cli/simple-commands/init/help.js+++ b/src/cli/simple-commands/init/help.js@@ -58,9 +58,10 @@ export function showInitHelp() {console.log(' claude-flow init --list-backups # Show available backups');console.log();console.log('What gets created:');- console.log(' β’ .claude/settings.json - Global configuration with hooks and features');+ console.log(' β’ .claude/settings.json - Claude Code configuration with hooks');console.log(' β’ .claude/settings.local.json - Pre-approved MCP permissions (no prompts!)');- console.log(' β’ .claude/mcp.json - MCP server configuration for easy setup');+ console.log(' β’ .mcp.json - Project-scoped MCP server configuration');+ console.log(' β’ claude-flow.config.json - Claude Flow features and performance settings');console.log(' β’ .claude/commands/ directory with 20+ Claude Code slash commands');console.log(' β’ CLAUDE.md with project instructions (v2.0.0 enhanced by default)');console.log(' β’ memory/ directory for persistent context storage');diff --git a/src/cli/simple-commands/init/index.js b/src/cli/simple-commands/init/index.jsindex 9761da9801..f94ca8ab93 100644--- a/src/cli/simple-commands/init/index.js+++ b/src/cli/simple-commands/init/index.js@@ -988,7 +988,7 @@ async function enhancedClaudeFlowInit(flags, subArgs = []) {try {// Check existing filesconst existingFiles = [];- const filesToCheck = ['CLAUDE.md', '.claude/settings.json'];+ const filesToCheck = ['CLAUDE.md', '.claude/settings.json', '.mcp.json', 'claude-flow.config.json'];for (const file of filesToCheck) {if (existsSync(`${workingDir}/${file}`)) {@@ -1047,7 +1047,7 @@ async function enhancedClaudeFlowInit(flags, subArgs = []) {console.log('[DRY RUN] Would create .claude/settings.local.json with default MCP permissions');}- // Create mcp.json for easy MCP server configuration+ // Create .mcp.json at project root for MCP server configurationconst mcpConfig = {"mcpServers": {"claude-flow": {@@ -1064,10 +1064,39 @@ async function enhancedClaudeFlowInit(flags, subArgs = []) {};if (!dryRun) {- await Deno.writeTextFile(`${claudeDir}/mcp.json`, JSON.stringify(mcpConfig, null, 2));- printSuccess('β Created .claude/mcp.json for MCP server configuration');+ await Deno.writeTextFile(`${workingDir}/.mcp.json`, JSON.stringify(mcpConfig, null, 2));+ printSuccess('β Created .mcp.json at project root for MCP server configuration');} else {- console.log('[DRY RUN] Would create .claude/mcp.json for MCP server configuration');+ console.log('[DRY RUN] Would create .mcp.json at project root for MCP server configuration');+ }++ // Create claude-flow.config.json for Claude Flow specific settings+ const claudeFlowConfig = {+ "features": {+ "autoTopologySelection": true,+ "parallelExecution": true,+ "neuralTraining": true,+ "bottleneckAnalysis": true,+ "smartAutoSpawning": true,+ "selfHealingWorkflows": true,+ "crossSessionMemory": true,+ "githubIntegration": true+ },+ "performance": {+ "maxAgents": 10,+ "defaultTopology": "hierarchical",+ "executionStrategy": "parallel",+ "tokenOptimization": true,+ "cacheEnabled": true,+ "telemetryLevel": "detailed"+ }+ };++ if (!dryRun) {+ await Deno.writeTextFile(`${workingDir}/claude-flow.config.json`, JSON.stringify(claudeFlowConfig, null, 2));+ printSuccess('β Created claude-flow.config.json for Claude Flow settings');+ } else {+ console.log('[DRY RUN] Would create claude-flow.config.json for Claude Flow settings');}// Create command documentation@@ -1214,7 +1243,7 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}console.log('\n π To add MCP servers manually:');console.log(' claude mcp add claude-flow npx claude-flow@alpha mcp start');console.log(' claude mcp add ruv-swarm npx ruv-swarm@latest mcp start');- console.log('\n π‘ Or copy .claude/mcp.json to your Claude Desktop config directory');+ console.log('\n π‘ MCP servers are defined in .mcp.json (project scope)');}} else if (!dryRun && !isClaudeCodeInstalled()) {console.log('\nβ οΈ Claude Code CLI not detected!');@@ -1223,7 +1252,7 @@ ${commands.map(cmd => `- [${cmd}](./${cmd}.md)`).join('\n')}console.log('\n π After installing, add MCP servers:');console.log(' claude mcp add claude-flow npx claude-flow@alpha mcp start');console.log(' claude mcp add ruv-swarm npx ruv-swarm@latest mcp start');- console.log('\n π‘ Or copy .claude/mcp.json to your Claude Desktop config directory');+ console.log('\n π‘ MCP servers are defined in .mcp.json (project scope)');}// Final instructionsdiff --git a/src/cli/simple-commands/init/templates/enhanced-templates.js b/src/cli/simple-commands/init/templates/enhanced-templates.jsindex 503df94d2b..44b5c36a60 100644--- a/src/cli/simple-commands/init/templates/enhanced-templates.js+++ b/src/cli/simple-commands/init/templates/enhanced-templates.js@@ -1259,6 +1259,10 @@ function createEnhancedSettingsJsonFallback() {"Bash(eval *)"]},+ enabledMcpjsonServers: [+ "claude-flow",+ "ruv-swarm"+ ],hooks: {PreToolUse: [{@@ -1311,36 +1315,6 @@ function createEnhancedSettingsJsonFallback() {}]},- mcpServers: {- "claude-flow": {- command: "npx",- args: ["claude-flow", "mcp", "start"],- env: {- CLAUDE_FLOW_HOOKS_ENABLED: "true",- CLAUDE_FLOW_TELEMETRY_ENABLED: "true",- CLAUDE_FLOW_REMOTE_READY: "true",- CLAUDE_FLOW_GITHUB_INTEGRATION: "true"- }- }- },- includeCoAuthoredBy: true,- features: {- autoTopologySelection: true,- parallelExecution: true,- neuralTraining: true,- bottleneckAnalysis: true,- smartAutoSpawning: true,- selfHealingWorkflows: true,- crossSessionMemory: true,- githubIntegration: true- },- performance: {- maxAgents: 10,- defaultTopology: "hierarchical",- executionStrategy: "parallel",- tokenOptimization: true,- cacheEnabled: true,- telemetryLevel: "detailed"- }+ includeCoAuthoredBy: true}, null, 2);}\ No newline at end of filediff --git a/src/cli/simple-commands/init/templates/settings.json b/src/cli/simple-commands/init/templates/settings.jsonindex b496cc6e4c..73865e5597 100644--- a/src/cli/simple-commands/init/templates/settings.json+++ b/src/cli/simple-commands/init/templates/settings.json@@ -85,39 +85,9 @@}]},- "mcpServers": {- "claude-flow": {- "command": "npx",- "args": [- "claude-flow",- "mcp",- "start"- ],- "env": {- "CLAUDE_FLOW_HOOKS_ENABLED": "true",- "CLAUDE_FLOW_TELEMETRY_ENABLED": "true",- "CLAUDE_FLOW_REMOTE_READY": "true",- "CLAUDE_FLOW_GITHUB_INTEGRATION": "true"- }- }- },"includeCoAuthoredBy": true,- "features": {- "autoTopologySelection": true,- "parallelExecution": true,- "neuralTraining": true,- "bottleneckAnalysis": true,- "smartAutoSpawning": true,- "selfHealingWorkflows": true,- "crossSessionMemory": true,- "githubIntegration": true- },- "performance": {- "maxAgents": 10,- "defaultTopology": "hierarchical",- "executionStrategy": "parallel",- "tokenOptimization": true,- "cacheEnabled": true,- "telemetryLevel": "detailed"- }+ "enabledMcpjsonServers": [+ "claude-flow",+ "ruv-swarm"+ ]}\ No newline at end of file