[feat] Add agentic-flow integration commands to agent --help

Update agent command metadata to display all agentic-flow integration features
in the standardized --help output:

NEW Commands Added:
- run <agent> "<task>" - Execute agent with multi-provider support
- agents - List all 66+ agentic-flow agents
- booster edit <file> - Ultra-fast editing (352x faster)
- booster batch <pattern> - Batch edit multiple files
- memory init - Initialize ReasoningBank memory
- config wizard - Interactive setup wizard
- mcp start - Start MCP server

Updated command descriptions for clarity:
- spawn: "Create a new agent" → "Create internal agent"
- list: "List all active agents" → "List active internal agents"

This ensures users can discover all agentic-flow capabilities via --help.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
rUvandClaude committed 2025-10-12 14:44:48 +00:00
1 parent f5245e3231
commit 51d4cfc317
6 files changed
+53 -8

No files matched your search

+31 -3
View File
@@ -772,16 +772,44 @@ export function getStandardizedCommandHelp(command) {
const commandConfigs = {
agent: {
name: 'claude-flow agent',
description: 'Manage individual agents',
description: 'Manage agents with agentic-flow integration (66+ agents, ultra-fast editing, memory)',
usage: 'claude-flow agent <action> [options]',
commands: [
{
name: 'run <agent> "<task>"',
description: 'Execute agent with multi-provider (NEW)'
},
{
name: 'agents',
description: 'List all 66+ agentic-flow agents (NEW)'
},
{
name: 'booster edit <file>',
description: 'Ultra-fast editing - 352x faster (NEW)'
},
{
name: 'booster batch <pattern>',
description: 'Batch edit multiple files (NEW)'
},
{
name: 'memory init',
description: 'Initialize ReasoningBank memory (NEW)'
},
{
name: 'config wizard',
description: 'Interactive setup wizard (NEW)'
},
{
name: 'mcp start',
description: 'Start MCP server (NEW)'
},
{
name: 'spawn',
description: 'Create a new agent'
description: 'Create internal agent'
},
{
name: 'list',
description: 'List all active agents'
description: 'List active internal agents'
},
{
name: 'info',
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["../../../src/cli/help-text.js"],"sourcesContent":["/**\n * Help text templates for Claude Flow CLI\n * Provides clear, actionable command documentation\n */\n\nimport { HelpFormatter } from './help-formatter.js';\nimport { VERSION } from '../core/version.js';\n\nexport { VERSION };\n\nexport const MAIN_HELP = `\n🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform\n\n🚀 v2.5.0-alpha.130 - SDK Integration & Performance Breakthrough\n\n🔥 NEW IN v2.5.0-alpha.130:\n ⚡ 10-20x Faster Agent Spawning - Parallel agent execution with session forking\n 🎮 Real-Time Query Control - Pause, resume, terminate queries mid-execution\n 🔄 Dynamic Model Switching - Change Claude models during execution (cost optimization)\n 🔐 Dynamic Permissions - Change permission modes on-the-fly\n 📊 90 MCP Tools - 87 existing + 3 new Phase 4 tools\n 🚄 500-2000x Potential Speedup - Combined performance stack (In-Process + Parallel + Hooks)\n\n🎯 ENTERPRISE FEATURES:\n • Complete ruv-swarm integration with 90+ MCP tools\n • Flow Nexus cloud platform with distributed sandboxes\n • Claude Code SDK integration for maximum performance\n • Production-ready infrastructure with enterprise reliability\n\nUSAGE:\n npx claude-flow <command> [options] # Run latest alpha version\n npx claude-flow <command> --help # Get detailed help for any command\n npx claude-flow --help # Show this help\n \n # After local install:\n claude-flow <command> [options]\n claude-flow <command> --help # Get detailed help for any command\n\n🚀 QUICK START:\n # First time setup (creates CLAUDE.md & .claude/commands)\n npx claude-flow init\n \n # 🌐 FLOW NEXUS CLOUD (NEW!):\n mcp__flow-nexus__user_register # Register for cloud features\n mcp__flow-nexus__user_login # Login to access sandboxes & neural networks\n mcp__flow-nexus__sandbox_create # Create cloud execution environments\n \n # 🐝 HIVE MIND QUICK START:\n claude-flow hive-mind wizard # Interactive setup wizard\n claude-flow hive-mind spawn \"objective\" # Create intelligent swarm\n claude-flow hive-mind spawn \"Build API\" --claude # Open Claude Code CLI\n \n # After setup, use without npx:\n claude-flow start --swarm # Start with swarm intelligence\n claude-flow swarm \"build REST API\" # Deploy multi-agent workflow\n claude-flow swarm \"create service\" --claude # Open Claude Code CLI with swarm\n\n🐝 HIVE MIND COMMANDS (NEW!):\n hive-mind wizard 🎯 Interactive setup wizard (RECOMMENDED)\n hive-mind init Initialize Hive Mind system with SQLite\n hive-mind spawn <task> Create intelligent swarm with objective\n hive-mind status View active swarms and performance metrics\n hive-mind metrics Advanced performance analytics\n\n📋 CORE COMMANDS:\n init Initialize Claude Flow v2.0.0 (creates CLAUDE.md & .claude/commands)\n --monitoring enables token usage tracking\n start [--swarm] Start orchestration system\n swarm <objective> Multi-agent swarm coordination\n agent <action> Agent management (spawn, list, terminate)\n sparc <mode> SPARC development modes (17 available)\n memory <action> Persistent memory operations\n github <mode> GitHub workflow automation (6 modes)\n status System status and health\n \n🔍 VERIFICATION COMMANDS (NEW!):\n verify <subcommand> Truth verification system (0.95 threshold)\n truth View truth scores and reliability metrics\n pair [--start] Collaborative development with real-time verification\n \n📋 SWARM INTELLIGENCE COMMANDS:\n training <command> Neural pattern learning & model updates (3 commands)\n coordination <command> Swarm & agent orchestration (3 commands)\n analysis <command> Performance & token usage analytics (real tracking!)\n automation <command> Intelligent agent & workflow management (3 commands)\n hooks <command> Lifecycle event management (5 commands)\n migrate-hooks Migrate settings.json to Claude Code 1.0.51+ format\n monitoring <command> Real-time system monitoring (3 commands)\n optimization <command> Performance & topology optimization (3 commands)\n \n📋 ADDITIONAL COMMANDS:\n task <action> Task and workflow management\n config <action> System configuration\n mcp <action> MCP server management\n batch <action> Batch operations\n stream-chain <workflow> Stream-JSON chaining for multi-agent pipelines\n\n🔥 NEW MCP TOOLS (v2.5.0-alpha.130):\n Available via Claude Code after installing:\n claude mcp add claude-flow npx claude-flow@alpha mcp start\n\n mcp__claude-flow__agents_spawn_parallel Spawn agents in parallel (10-20x faster)\n • Spawn multiLine truncated
{"version":3,"sources":["../../../src/cli/help-text.js"],"sourcesContent":["/**\n * Help text templates for Claude Flow CLI\n * Provides clear, actionable command documentation\n */\n\nimport { HelpFormatter } from './help-formatter.js';\nimport { VERSION } from '../core/version.js';\n\nexport { VERSION };\n\nexport const MAIN_HELP = `\n🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform\n\n🚀 v2.5.0-alpha.130 - SDK Integration & Performance Breakthrough\n\n🔥 NEW IN v2.5.0-alpha.130:\n ⚡ 10-20x Faster Agent Spawning - Parallel agent execution with session forking\n 🎮 Real-Time Query Control - Pause, resume, terminate queries mid-execution\n 🔄 Dynamic Model Switching - Change Claude models during execution (cost optimization)\n 🔐 Dynamic Permissions - Change permission modes on-the-fly\n 📊 90 MCP Tools - 87 existing + 3 new Phase 4 tools\n 🚄 500-2000x Potential Speedup - Combined performance stack (In-Process + Parallel + Hooks)\n\n🎯 ENTERPRISE FEATURES:\n • Complete ruv-swarm integration with 90+ MCP tools\n • Flow Nexus cloud platform with distributed sandboxes\n • Claude Code SDK integration for maximum performance\n • Production-ready infrastructure with enterprise reliability\n\nUSAGE:\n npx claude-flow <command> [options] # Run latest alpha version\n npx claude-flow <command> --help # Get detailed help for any command\n npx claude-flow --help # Show this help\n \n # After local install:\n claude-flow <command> [options]\n claude-flow <command> --help # Get detailed help for any command\n\n🚀 QUICK START:\n # First time setup (creates CLAUDE.md & .claude/commands)\n npx claude-flow init\n \n # 🌐 FLOW NEXUS CLOUD (NEW!):\n mcp__flow-nexus__user_register # Register for cloud features\n mcp__flow-nexus__user_login # Login to access sandboxes & neural networks\n mcp__flow-nexus__sandbox_create # Create cloud execution environments\n \n # 🐝 HIVE MIND QUICK START:\n claude-flow hive-mind wizard # Interactive setup wizard\n claude-flow hive-mind spawn \"objective\" # Create intelligent swarm\n claude-flow hive-mind spawn \"Build API\" --claude # Open Claude Code CLI\n \n # After setup, use without npx:\n claude-flow start --swarm # Start with swarm intelligence\n claude-flow swarm \"build REST API\" # Deploy multi-agent workflow\n claude-flow swarm \"create service\" --claude # Open Claude Code CLI with swarm\n\n🐝 HIVE MIND COMMANDS (NEW!):\n hive-mind wizard 🎯 Interactive setup wizard (RECOMMENDED)\n hive-mind init Initialize Hive Mind system with SQLite\n hive-mind spawn <task> Create intelligent swarm with objective\n hive-mind status View active swarms and performance metrics\n hive-mind metrics Advanced performance analytics\n\n📋 CORE COMMANDS:\n init Initialize Claude Flow v2.0.0 (creates CLAUDE.md & .claude/commands)\n --monitoring enables token usage tracking\n start [--swarm] Start orchestration system\n swarm <objective> Multi-agent swarm coordination\n agent <action> Agent management (spawn, list, terminate)\n • agent booster Ultra-fast code editing (352x faster, $0 cost)\n - edit <file> Edit single file with local WASM processing\n - batch <pattern> Batch edit multiple files (1000 files in 1 sec)\n - benchmark Validate 352x speed claim with tests\n sparc <mode> SPARC development modes (13 available)\n memory <action> Persistent memory operations\n github <mode> GitHub workflow automation (6 modes)\n status System status and health\n \n🔍 VERIFICATION COMMANDS (NEW!):\n verify <subcommand> Truth verification system (0.95 threshold)\n truth View truth scores and reliability metrics\n pair [--start] Collaborative development with real-time verification\n \n📋 SWARM INTELLIGENCE COMMANDS:\n training <command> Neural pattern learning & model updates (3 commands)\n coordination <command> Swarm & agent orchestration (3 commands)\n analysis <command> Performance & token usage analytics (real tracking!)\n automation <command> Intelligent agent & workflow management (3 commands)\n hooks <command> Lifecycle event management (5 commands)\n migrate-hooks Migrate settings.json to Claude Code 1.0.51+ format\n monitoring <command> Real-time system monitoring (3 commands)\n optimization <command> Performance & topology optimization (3 commands)\n \n📋 ADDITIONAL COMMANDS:\n task <action> Task and workflow management\n config <action> System configuration\n mcp <action> MCP server management\n batch <action> Batch operations\n stream-chain <workflow> Stream-JSON chaininLine truncated
@@ -5,6 +5,10 @@ import { promisify } from 'util';
const execAsync = promisify(exec);
export async function agentCommand(subArgs, flags) {
const agentCmd = subArgs[0];
if (flags.help || flags.h || agentCmd === '--help' || agentCmd === '-h') {
showAgentHelp();
return;
}
switch(agentCmd){
case 'run':
case 'execute':
@@ -1 +1 @@
{"version":3,"sources":["../../../../src/cli/simple-commands/agent.js"],"sourcesContent":["// agent.js - Agent management commands\nimport { printSuccess, printError, printWarning } from '../utils.js';\nimport { onAgentSpawn, onAgentAction } from './performance-hooks.js';\nimport { exec } from 'child_process';\nimport { promisify } from 'util';\n\nconst execAsync = promisify(exec);\n\nexport async function agentCommand(subArgs, flags) {\n const agentCmd = subArgs[0];\n\n switch (agentCmd) {\n case 'run':\n case 'execute':\n await executeAgentTask(subArgs, flags);\n break;\n\n case 'spawn':\n await spawnAgent(subArgs, flags);\n break;\n\n case 'list':\n await listAgents(subArgs, flags);\n break;\n\n case 'agents':\n await listAgenticFlowAgents(subArgs, flags);\n break;\n\n case 'memory':\n await memoryCommand(subArgs, flags);\n break;\n\n case 'hierarchy':\n await manageHierarchy(subArgs, flags);\n break;\n\n case 'network':\n await manageNetwork(subArgs, flags);\n break;\n\n case 'ecosystem':\n await manageEcosystem(subArgs, flags);\n break;\n\n case 'provision':\n await provisionAgent(subArgs, flags);\n break;\n\n case 'terminate':\n await terminateAgent(subArgs, flags);\n break;\n\n case 'info':\n await showAgentInfo(subArgs, flags);\n break;\n\n default:\n showAgentHelp();\n }\n}\n\nasync function executeAgentTask(subArgs, flags) {\n const agentType = subArgs[1];\n const task = subArgs[2];\n\n if (!agentType || !task) {\n printError('Usage: agent run <agent-type> \"<task>\" [--provider <provider>] [--model <model>]');\n console.log('\\nExamples:');\n console.log(' claude-flow agent run coder \"Create a REST API\"');\n console.log(' claude-flow agent run researcher \"Research AI trends\" --provider openrouter');\n console.log(' claude-flow agent run reviewer \"Review code for security\" --provider onnx');\n return;\n }\n\n printSuccess(`🚀 Executing ${agentType} agent with agentic-flow...`);\n console.log(`Task: ${task}`);\n\n const provider = flags.provider || 'anthropic';\n if (flags.provider) {\n console.log(`Provider: ${provider}`);\n }\n\n try {\n // Build command for agentic-flow\n const cmd = buildAgenticFlowCommand(agentType, task, flags);\n console.log('\\n⏳ Running agent... (this may take a moment)\\n');\n\n // Execute agentic-flow\n const { stdout, stderr } = await execAsync(cmd, {\n timeout: flags.timeout || 300000,\n maxBuffer: 10 * 1024 * 1024,\n });\n\n if (stdout) {\n console.log(stdout);\n }\n\n if (stderr && flags.verbose) {\n console.warn('\\nWarnings:', stderr);\n }\n\n printSuccess('✅ Agent task completed successfully!');\n } catch (error) {\n printError('❌ Agent execution failed');\n console.error(error.message);\n if (error.stderr) {\n console.error('Error details:', error.stderr);\n }\n process.exit(1);\n }\n}\n\nfunction buildAgenticFlowCommand(agent, task, flags) {\n const parts = ['npx', 'agentic-flow'];\n\n // Agentic-flow uses --agent flag directly (no 'execute' subcommand)\n parts.push('--agent', agent);\n parts.push('--task', `\"${task.replace(/\"/g, '\\\\\"')}\"`);\n\n if (flags.provider) {\n parts.push('--provider', flags.provider);\n }\n\n if (flags.model) {\n parts.push('--model', flags.model);\n }\n\n if (flags.temperature) {\n parts.push('--temperature', flags.temperature);\n }\n\n if (flags.maxTokens) {\n parts.push('--max-tokens', flags.maxTokens);\n }\n\n if (flags.format) {\n parts.push('--output-format', flags.format);\n }\n\n if (flags.stream) {\n parts.push('--stream');\n }\n\n if (flags.verbose) {\n parts.push('--verbose');\n }\n\n // ReasoningBank memory options (NEW in v2.6.0)\n if (flags.enableMemory || flags.memory) {\n parts.push('--enable-memory');\n }\n\n if (flags.memoryDb || flags.memoryDatabase) {\n parts.push('--memory-db', flags.memoryDb || flags.memoryDatabase);\n }\n\n if (flags.memoryK) {\n parts.push('--memory-k', flags.memoryK);\n }\n\n if (flags.memoryDomain) {\n parts.push('--memory-domain', flags.memoryDomain);\n }\n\n if (flags.memoryLearning === false) {\n parts.push('--no-memory-learning');\n }\n\n if (flags.memoryMinConfidence) {\n parts.push('--memory-min-confidence', flags.memoryMinConfidence);\n }\n\n if (flags.memoryTaskId) {\n parts.push('--memory-task-id', flags.memoryTaskId);\n }\n\n return parts.join(' ');\n}\n\nasync function listAgenticFlowAgents(subArgs, flags) {\n printSuccess('📋 Loading available agentic-flow agents...');\n\n try {\n // Agentic-flow uses 'agent list' command\n const { stdout } = await execAsync('npx agentic-flow agent list', {\n timeout: 30000,\n });\n\n console.log('\\n66+ Available Agents:\\n');\n console.log(stdout);\n console.log('\Line truncated
{"version":3,"sources":["../../../../src/cli/simple-commands/agent.js"],"sourcesContent":["// agent.js - Agent management commands\nimport { printSuccess, printError, printWarning } from '../utils.js';\nimport { onAgentSpawn, onAgentAction } from './performance-hooks.js';\nimport { exec } from 'child_process';\nimport { promisify } from 'util';\n\nconst execAsync = promisify(exec);\n\nexport async function agentCommand(subArgs, flags) {\n const agentCmd = subArgs[0];\n\n // Handle --help flag explicitly to show full help\n if (flags.help || flags.h || agentCmd === '--help' || agentCmd === '-h') {\n showAgentHelp();\n return;\n }\n\n switch (agentCmd) {\n case 'run':\n case 'execute':\n await executeAgentTask(subArgs, flags);\n break;\n\n case 'spawn':\n await spawnAgent(subArgs, flags);\n break;\n\n case 'list':\n await listAgents(subArgs, flags);\n break;\n\n case 'agents':\n await listAgenticFlowAgents(subArgs, flags);\n break;\n\n case 'create':\n await createAgent(subArgs, flags);\n break;\n\n case 'info':\n await getAgentInfo(subArgs, flags);\n break;\n\n case 'conflicts':\n await checkAgentConflicts(subArgs, flags);\n break;\n\n case 'memory':\n await memoryCommand(subArgs, flags);\n break;\n\n case 'config':\n case 'configure':\n await configAgenticFlow(subArgs, flags);\n break;\n\n case 'mcp':\n case 'mcp-server':\n await mcpAgenticFlow(subArgs, flags);\n break;\n\n case 'hierarchy':\n await manageHierarchy(subArgs, flags);\n break;\n\n case 'network':\n await manageNetwork(subArgs, flags);\n break;\n\n case 'ecosystem':\n await manageEcosystem(subArgs, flags);\n break;\n\n case 'provision':\n await provisionAgent(subArgs, flags);\n break;\n\n case 'terminate':\n await terminateAgent(subArgs, flags);\n break;\n\n case 'booster':\n const { agentBoosterCommand } = await import('./agent-booster.js');\n await agentBoosterCommand(subArgs, flags);\n break;\n\n default:\n showAgentHelp();\n }\n}\n\nasync function executeAgentTask(subArgs, flags) {\n const agentType = subArgs[1];\n const task = subArgs[2];\n\n if (!agentType || !task) {\n printError('Usage: agent run <agent-type> \"<task>\" [--provider <provider>] [--model <model>]');\n console.log('\\nExamples:');\n console.log(' claude-flow agent run coder \"Create a REST API\"');\n console.log(' claude-flow agent run researcher \"Research AI trends\" --provider openrouter');\n console.log(' claude-flow agent run reviewer \"Review code for security\" --provider onnx');\n return;\n }\n\n // Check for memory flags and .env configuration\n if (flags.enableMemory || flags.memory) {\n const { checkEnvConfig, showEnvSetupInstructions } = await import('./env-template.js');\n const envCheck = await checkEnvConfig(process.cwd());\n\n if (!envCheck.exists) {\n printWarning('⚠️ ReasoningBank memory requires .env configuration');\n showEnvSetupInstructions();\n console.log('❌ Cannot use --enable-memory without .env file\\n');\n process.exit(1);\n }\n\n if (!envCheck.hasApiKeys) {\n printWarning('⚠️ No API keys found in .env file');\n console.log('\\n⚠️ ReasoningBank will fall back to heuristic mode (regex matching)');\n console.log(' Without API keys, memory will NOT learn from experience!\\n');\n showEnvSetupInstructions();\n console.log('❌ Add API keys to .env to enable actual learning\\n');\n process.exit(1);\n }\n\n // Show which keys are configured\n console.log('✅ API keys configured:');\n if (envCheck.keys.anthropic) console.log(' • Anthropic (Claude)');\n if (envCheck.keys.openrouter) console.log(' • OpenRouter (cost optimization available)');\n if (envCheck.keys.gemini) console.log(' • Gemini (free tier available)');\n console.log('');\n }\n\n printSuccess(`🚀 Executing ${agentType} agent with agentic-flow...`);\n console.log(`Task: ${task}`);\n\n const provider = flags.provider || 'anthropic';\n if (flags.provider) {\n console.log(`Provider: ${provider}`);\n }\n\n try {\n // Build command for agentic-flow\n const cmd = buildAgenticFlowCommand(agentType, task, flags);\n console.log('\\n⏳ Running agent... (this may take a moment)\\n');\n\n // Execute agentic-flow\n const { stdout, stderr } = await execAsync(cmd, {\n timeout: flags.timeout || 300000,\n maxBuffer: 10 * 1024 * 1024,\n });\n\n if (stdout) {\n console.log(stdout);\n }\n\n if (stderr && flags.verbose) {\n console.warn('\\nWarnings:', stderr);\n }\n\n printSuccess('✅ Agent task completed successfully!');\n } catch (error) {\n printError('❌ Agent execution failed');\n console.error(error.message);\n if (error.stderr) {\n console.errLine truncated
+10 -3
View File
@@ -795,11 +795,18 @@ export function getStandardizedCommandHelp(command) {
const commandConfigs = {
agent: {
name: 'claude-flow agent',
description: 'Manage individual agents',
description: 'Manage agents with agentic-flow integration (66+ agents, ultra-fast editing, memory)',
usage: 'claude-flow agent <action> [options]',
commands: [
{ name: 'spawn', description: 'Create a new agent' },
{ name: 'list', description: 'List all active agents' },
{ name: 'run <agent> "<task>"', description: 'Execute agent with multi-provider (NEW)' },
{ name: 'agents', description: 'List all 66+ agentic-flow agents (NEW)' },
{ name: 'booster edit <file>', description: 'Ultra-fast editing - 352x faster (NEW)' },
{ name: 'booster batch <pattern>', description: 'Batch edit multiple files (NEW)' },
{ name: 'memory init', description: 'Initialize ReasoningBank memory (NEW)' },
{ name: 'config wizard', description: 'Interactive setup wizard (NEW)' },
{ name: 'mcp start', description: 'Start MCP server (NEW)' },
{ name: 'spawn', description: 'Create internal agent' },
{ name: 'list', description: 'List active internal agents' },
{ name: 'info', description: 'Show agent details' },
{ name: 'terminate', description: 'Stop an agent' },
{ name: 'hierarchy', description: 'Manage agent hierarchies' },
+6
View File
@@ -9,6 +9,12 @@ const execAsync = promisify(exec);
export async function agentCommand(subArgs, flags) {
const agentCmd = subArgs[0];
// Handle --help flag explicitly to show full help
if (flags.help || flags.h || agentCmd === '--help' || agentCmd === '-h') {
showAgentHelp();
return;
}
switch (agentCmd) {
case 'run':
case 'execute':