Package Exports
- claude-flow
- claude-flow/src/cli/main.ts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (claude-flow) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
🌊 Claude-Flow: Agent Orchestration Platform for Claude-Code
🎯 Transform Your Development Workflow
Claude-Flow is the ultimate multi-terminal orchestration platform that revolutionizes how you work with Claude Code. Imagine coordinating dozens of AI agents simultaneously, each working on different aspects of your project while sharing knowledge through an intelligent memory bank.
🔥 One command to rule them all:
npx claude-flow- Deploy a full AI agent coordination system in seconds!
🎉 What's New in v1.0.44
🆕 Enhanced Claude Code Integration
- 📝 Improved Slash Commands: Updated all Claude Code slash commands to use
./claude-flowwrapper - 🎯 Detailed SPARC Descriptions: Slash commands now include full role definitions and custom instructions from
.roomodes - 🚀 Claude-Flow Focused: Removed references to internal tools, focusing on Claude-Flow capabilities
- 📊 Better Examples: Enhanced command examples with memory integration and automation workflows
🚀 Major Release: Enterprise-Grade Swarm System
- 🐝 Advanced Swarm Orchestration: Complete multi-agent coordination system with timeout-free execution
- 🧠 Distributed Memory Sharing: Cross-agent knowledge sharing with persistent state management
- ⚡ Intelligent Task Scheduling: 7+ scheduling algorithms with dependency resolution and load balancing
- 🔄 Work Stealing & Load Balancing: Automatic workload distribution across agents
- 🛡️ Circuit Breaker Patterns: Enterprise fault tolerance with retry and recovery mechanisms
- 📊 Real-Time Monitoring: Comprehensive metrics, health checks, and performance tracking
- 🔒 Security & Validation: Encryption, access control, audit logging, and input validation
- 🎯 Comprehensive CLI: 30+ options for swarm configuration and management
🆕 Enhanced User Experience
- 🚀 Text-Based Process Management UI: New
--uiflag forstartcommand provides interactive process control - 🎯 Simplified SPARC Syntax:
npx claude-flow sparc "build app"(no more double sparc!) - ⚡ Auto-Skip Permissions:
--dangerously-skip-permissionsby default (use--enable-permissionsto restore prompts) - 🤖 Non-Interactive Mode: JSON output with
--non-interactiveflag for automation - 📁 Directory Safety: Enhanced guidance to prevent files in node_modules
- 🎯 17+ SPARC Modes: Including new
sparc-orchestratorfor complex workflows - 📂 Local Executable:
initnow creates./claude-flowwrapper to ensure correct working directory - 🔧 Fixed SPARC Path Resolution:
.roomodesnow correctly found in project directory - 📝 Claude Code Slash Commands:
init --sparcnow creates.claude/commands/with slash commands for all SPARC modes - 🏗️ Modular Init Structure: Refactored init command into clean, maintainable modules for better extensibility
🐝 Swarm System Features
- Timeout-Free Execution: Background Claude processes that never timeout
- Agent Specialization: 9 agent types (coordinator, developer, researcher, analyzer, tester, reviewer, documenter, monitor, specialist)
- Multiple Coordination Modes: Centralized, distributed, hierarchical, mesh, hybrid
- Advanced Scheduling: FIFO, priority, deadline, shortest-job, critical-path, resource-aware, adaptive
- Fault Tolerance: Retry, redundancy, checkpoint, circuit-breaker, bulkhead, timeout, graceful-degradation
- Communication Patterns: Direct, broadcast, publish-subscribe, request-response, event-driven, gossip, hierarchical
🌟 Why Claude-Flow?
- 🚀 10x Faster Development: Parallel AI agent execution with intelligent task distribution
- 🧠 Persistent Memory: Agents learn and share knowledge across sessions
- ⚡ SPARC Methodology: Systematic development with Specification → Pseudocode → Architecture → Refinement → Completion
- 🔄 Zero Configuration: Works out-of-the-box with sensible defaults
- 🤖 VSCode Native: Seamless integration with your favorite IDE
- 🔒 Enterprise Ready: Production-grade security, monitoring, and scaling
- 🌐 MCP Compatible: Full Model Context Protocol support for tool integration
- 🐝 Swarm Intelligence: Advanced multi-agent coordination with timeout-free execution
📦 Installation
🚀 Get started in 30 seconds
# Initialize with SPARC development environment
npx -y claude-flow@latest init --sparc
# Use the local wrapper after init
./claude-flow start --ui # Interactive process management
./claude-flow sparc "build and test my project" # SPARC development
./claude-flow swarm "Build a REST API" --strategy development --monitor # Swarm coordination# ⚡ SPARC Development Workflow (NEW: Simplified!)
npx claude-flow sparc "build a todo app" # Orchestrator mode (default)
npx claude-flow sparc modes # List 17+ development modes
npx claude-flow sparc tdd "user auth" # Run TDD workflow
# 🐝 Advanced Swarm System (NEW!)
./claude-flow swarm "Build a REST API" --strategy development --parallel --monitor
./claude-flow swarm "Research AI trends" --strategy research --distributed --ui
./claude-flow swarm "Optimize performance" --strategy optimization --background
# 🎯 Run specific SPARC modes
npx claude-flow sparc run code "implement API" # Code generation
npx claude-flow sparc run tdd "auth tests" # Test-driven development
npx claude-flow sparc run architect "system" # Architecture design
# 🤖 Spawn a research team
./claude-flow agent spawn researcher --name "Senior Researcher"
./claude-flow agent spawn analyst --name "Data Analyst"
./claude-flow agent spawn implementer --name "Code Developer"
# 📋 Create and execute tasks
./claude-flow task create research "Research AI optimization techniques"
./claude-flow task list
# 📊 Monitor in real-time
./claude-flow status
./claude-flow monitor🏗️ Core Features
🐝 Advanced Swarm OrchestrationEnterprise-grade multi-agent coordination with timeout-free execution, distributed memory sharing, and intelligent load balancing across specialized AI agents. |
🧠 Intelligent Memory BankAdvanced CRDT-based memory system with SQLite performance and Markdown readability. Agents learn and share knowledge across sessions with cross-agent collaboration. |
⚡ SPARC DevelopmentSystematic AI-assisted development using Specification → Pseudocode → Architecture → Refinement → Completion methodology with 17+ specialized modes. |
🎯 Smart Task Scheduling7+ scheduling algorithms with dependency resolution, deadlock detection, work stealing, load balancing, and automatic retry with exponential backoff. |
🔒 Enterprise SecurityToken-based authentication, encryption, rate limiting, circuit breakers, audit logging, access control, and role-based permissions. |
🌐 MCP IntegrationFull Model Context Protocol support with stdio and HTTP transports, enabling seamless integration with external tools and services. |
⚡ Quick Start
🎯 Option 1: NPX (Recommended)
# Install and run in one command
npx claude-flow
# Or install globally for repeated use
npm install -g claude-flow
claude-flow --version🦕 Option 2: Deno (For Developers)
# Clone and run from source
git clone https://github.com/ruvnet/claude-code-flow.git
cd claude-code-flow
./bin/claude-flow --version🔧 Option 3: From Source (For Contributors)
git clone https://github.com/ruvnet/claude-code-flow.git
cd claude-code-flow
deno task build && deno task install🐝 Swarm System Usage
🚀 Basic Swarm Commands
# Initialize with swarm support
npx claude-flow init --sparc
# Start a basic development swarm
./claude-flow swarm "Build a REST API" --strategy development
# Research-focused swarm with UI
./claude-flow swarm "Research AI trends" --strategy research --distributed --ui
# Background optimization swarm
./claude-flow swarm "Optimize performance" --strategy optimization --background --monitor
# Testing swarm with review
./claude-flow swarm "Test application" --strategy testing --review --verbose🎛️ Advanced Swarm Configuration
# Full-featured swarm with all options
./claude-flow swarm "Complex project development" \
--strategy development \
--mode distributed \
--max-agents 10 \
--parallel \
--monitor \
--review \
--testing \
--encryption \
--verbose
# Dry run to see configuration
./claude-flow swarm "Test task" --dry-run --strategy development
# Get comprehensive help
./claude-flow swarm --help🤖 Swarm Agent Types
- Coordinator: Plans and delegates tasks to other agents
- Developer: Writes code and implements solutions
- Researcher: Gathers and analyzes information
- Analyzer: Identifies patterns and generates insights
- Tester: Creates and runs tests for quality assurance
- Reviewer: Performs code and design reviews
- Documenter: Creates documentation and guides
- Monitor: Tracks performance and system health
- Specialist: Domain-specific expert agents
🔄 Coordination Strategies
- Centralized: Single coordinator manages all agents (default)
- Distributed: Multiple coordinators share management
- Hierarchical: Tree structure with nested coordination
- Mesh: Peer-to-peer agent collaboration
- Hybrid: Mixed coordination strategies
📊 Swarm Features
- Timeout-Free Execution: Background Claude processes that never timeout
- Work Stealing: Automatic load balancing across agents
- Circuit Breakers: Fault tolerance with automatic recovery
- Real-Time Monitoring: Live metrics and progress tracking
- Distributed Memory: Cross-agent knowledge sharing
- Quality Controls: Configurable thresholds and validation
- Background Mode: Long-running swarms with persistent state
- Interactive UI: Terminal-based swarm management interface
📚 Documentation
Comprehensive documentation is available to help you get the most out of Claude-Flow:
- Getting Started Guide - Quick setup and first steps
- Architecture Overview - System design and components
- Configuration Guide - Detailed configuration options
- Agent Management - Working with AI agents
- Task Coordination - Task scheduling and workflows
- Memory Bank Usage - Persistent memory system
- MCP Integration - Model Context Protocol tools
- Terminal Management - Terminal pooling and sessions
- Swarm System Guide - Advanced multi-agent coordination
- Troubleshooting - Common issues and solutions
- Advanced Usage - Power user features
- Claude Spawning - Spawning Claude instances
- CLI Reference - Complete command documentation
💡 Quick Start Guide
1. Initialize Claude Code Integration
# Basic init (without SPARC modes)
npx claude-flow init
# Recommended: Initialize with SPARC development modes
npx claude-flow init --sparcThe --sparc flag creates:
CLAUDE.md- SPARC-enhanced Claude Code configuration.claude/commands/- Claude Code slash commands for all SPARC modesmemory-bank.md- Memory system documentationcoordination.md- Agent coordination documentation.roomodes- SPARC development mode configurations.roo/- SPARC templates and workflows- Memory folder structure with placeholders
./claude-flow- Local executable wrapper (use instead of npx)
Claude Code slash commands available after init:
/sparc- Execute SPARC methodology workflows/sparc-<mode>- Run specific SPARC modes (e.g., /sparc-architect)/claude-flow-help- Show all claude-flow commands/claude-flow-memory- Interact with memory system/claude-flow-swarm- Coordinate multi-agent swarms
2. Start the Orchestrator
# After init, use the local wrapper:
./claude-flow start
# Or run as daemon
./claude-flow start --daemon
# With interactive UI
./claude-flow start --ui3. Spawn Agents
# Spawn different agent types with specific capabilities
./claude-flow agent spawn researcher --name "Research Assistant" --priority 8
./claude-flow agent spawn implementer --name "Code Developer" --priority 7
./claude-flow agent spawn analyst --name "Data Analyst" --priority 6
./claude-flow agent spawn coordinator --name "Project Manager" --priority 9
# List all active agents
./claude-flow agent list
# Get detailed information about an agent
./claude-flow agent info agent-1234. Create and Manage Tasks
# Create tasks with different priorities
./claude-flow task create research "Analyze authentication best practices" --priority 8
./claude-flow task create implementation "Build JWT authentication" --priority 9
./claude-flow task create analysis "Review security vulnerabilities" --priority 10
# Create task with dependencies
./claude-flow task create implementation "Build user management" \
--priority 7 --deps task-123,task-456
# Assign tasks to agents
./claude-flow task assign task-123 agent-456
# List all tasks
./claude-flow task list
./claude-flow task list --verbose # Show detailed task information
# Check specific task status
./claude-flow task status task-123
# Cancel a task
./claude-flow task cancel task-7895. Spawn Claude Instances 🆕
# Spawn Claude with enhanced Claude-Flow guidance
./claude-flow claude spawn "implement user authentication" --research --parallel
# Backend-only mode with high coverage
./claude-flow claude spawn "create REST API" --mode backend-only --coverage 95
# Frontend development with feature commits
./claude-flow claude spawn "build React components" --mode frontend-only --commit feature
# Full stack with all options
./claude-flow claude spawn "build complete app" --research --parallel --coverage 90 --verbose
# Execute workflow
./claude-flow claude batch workflow.json --dry-runEnhanced Claude Instances receive:
- Detailed Claude-Flow system guidance
- Proper
npx claude-flowcommand syntax - Mode-specific instructions (backend/frontend/api/full)
- Memory bank operations with examples
- Configuration-aware development guidance
6. Monitor System Status
# Check system health
./claude-flow status
# Real-time monitoring
./claude-flow monitor
# View MCP tools
./claude-flow mcp tools🚀 SPARC Development Methodology
Claude-Flow integrates the SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology for systematic AI-assisted development:
Available SPARC Modes
# List all development modes
./claude-flow sparc modes
# Key modes include:
# 🏗️ architect - System design and architecture
# 🧠 code - Clean, modular implementation
# 🧪 tdd - Test-driven development
# 🛡️ security-review - Security analysis
# 📚 docs-writer - Documentation creation
# 🔗 integration - System integrationSPARC Workflow
# Simplified orchestration (NEW!)
./claude-flow sparc "build complete authentication system"
# Run specific SPARC modes:
./claude-flow sparc run code "implement API" # Code generation
./claude-flow sparc run tdd "auth tests" # Test-driven development
./claude-flow sparc run architect "system" # Architecture design
# TDD shorthand
./claude-flow sparc tdd "implement JWT authentication"Non-Interactive Mode
The --non-interactive flag outputs JSON for integration with CI/CD pipelines and automation tools:
# Run SPARC modes with JSON output
./claude-flow sparc run code "user service" --non-interactive
./claude-flow sparc run tdd "test suite" --non-interactiveSPARC Features
- 17+ Specialized AI Modes for different development phases
- Memory Persistence across SPARC sessions with namespaced storage
- TDD Enforcement with Red-Green-Refactor cycle automation
- Modular Design with <500 line file constraints
- Environment Safety preventing credential exposure
- CI/CD Integration via
--non-interactiveflag for automation - Non-Interactive Mode for automation and CI/CD integration
- Auto-Skip Permissions by default (use --enable-permissions to prompt)
- Quality Gates with automated code analysis and security review
Architecture
Claude-Flow uses a modular architecture with the following components:
- Orchestrator: Central coordinator managing all system components
- Swarm System: Advanced multi-agent coordination with timeout-free execution
- Terminal Manager: Handles terminal sessions with pooling and recycling
- Memory Manager: Persistent storage with caching and indexing
- Coordination Manager: Task scheduling and resource management
- MCP Server: Tool integration via Model Context Protocol
Configuration
Default configuration file (claude-flow.config.json):
{
"orchestrator": {
"maxConcurrentAgents": 10,
"taskQueueSize": 100,
"healthCheckInterval": 30000,
"shutdownTimeout": 30000
},
"swarm": {
"maxAgents": 10,
"defaultStrategy": "auto",
"defaultMode": "centralized",
"timeoutMinutes": 60,
"qualityThreshold": 0.8,
"enableMonitoring": true,
"enableEncryption": false
},
"terminal": {
"type": "auto",
"poolSize": 5,
"recycleAfter": 10,
"healthCheckInterval": 60000,
"commandTimeout": 300000
},
"memory": {
"backend": "hybrid",
"cacheSizeMB": 100,
"syncInterval": 5000,
"conflictResolution": "crdt",
"retentionDays": 30
},
"coordination": {
"maxRetries": 3,
"retryDelay": 1000,
"deadlockDetection": true,
"resourceTimeout": 60000,
"messageTimeout": 30000
},
"mcp": {
"transport": "stdio",
"port": 3000,
"tlsEnabled": false
},
"logging": {
"level": "info",
"format": "json",
"destination": "console"
}
}Agent Types
Claude-Flow supports multiple agent types:
- Coordinator: Plans and delegates tasks to other agents
- Researcher: Gathers and analyzes information
- Implementer: Writes code and creates solutions
- Analyst: Identifies patterns and generates insights
- Developer: Full-stack development capabilities
- Tester: Quality assurance and testing
- Reviewer: Code and design review
- Documenter: Documentation creation
- Monitor: System monitoring and health checks
- Specialist: Domain-specific expertise
- Custom: User-defined agent types
🛠️ CLI Commands
Claude-Flow provides a comprehensive CLI for managing your AI orchestration system. For detailed command documentation, see the CLI Reference.
🌐 Global Options
-c, --config <path>: Path to configuration file-v, --verbose: Enable verbose logging--log-level <level>: Set log level (debug, info, warn, error)--version: Show version information--help: Show help for any command
📋 Core Commands
init - Initialize Claude Code Integration
npx claude-flow@latest init [options]
-s, --sparc Initialize with SPARC development environment (recommended)
-f, --force Overwrite existing files
-m, --minimal Create minimal configuration filesRecommended first-time setup:
npx -y claude-flow@latest init --sparcCreates:
CLAUDE.md- AI-readable project instructions.roomodes- 17 pre-configured SPARC development modesmemory-bank.md- Persistent memory documentationcoordination.md- Agent coordination guide- Complete folder structure for development
start - Start Orchestration System
npx claude-flow start [options]
-d, --daemon Run as daemon in background
-p, --port <port> MCP server port (default: 3000)
-u, --ui Launch interactive process management UI
-v, --verbose Show detailed system activityProcess Management UI Features (--ui flag):
- Start/stop individual components (press 1-6 to toggle)
- Real-time status monitoring
- Process health visualization
- Commands: A (start all), Z (stop all), R (restart all), Q (quit)
swarm - Advanced Multi-Agent Coordination 🆕
npx claude-flow swarm <objective> [options]
--strategy <type> Execution strategy (auto/research/development/analysis/testing/optimization/maintenance)
--mode <type> Coordination mode (centralized/distributed/hierarchical/mesh/hybrid)
--max-agents <n> Maximum agents (default: 5)
--timeout <minutes> Timeout in minutes (default: 60)
--parallel Enable parallel execution
--distributed Enable distributed coordination
--monitor Enable real-time monitoring
--ui Launch terminal UI interface
--background Run in background mode
--review Enable peer review
--testing Enable automated testing
--encryption Enable encryption
--verbose Enable detailed logging
--dry-run Show configuration without executingSwarm Examples:
# Basic development swarm
./claude-flow swarm "Build a REST API" --strategy development
# Research swarm with UI
./claude-flow swarm "Research AI trends" --strategy research --distributed --ui
# Background optimization
./claude-flow swarm "Optimize performance" --strategy optimization --background --monitorstatus - Show System Status
npx claude-flow status [options]
-v, --verbose Show detailed status informationagent - Manage AI Agents
npx claude-flow agent <subcommand>
spawn <type> Spawn a new agent (researcher/implementer/analyst/coordinator)
--name <name> Agent name
--priority <1-10> Agent priority
--max-tasks <n> Max concurrent tasks
list List all active agents
info <agent-id> Get detailed agent information
terminate <agent-id> Terminate an agenttask - Manage Tasks
npx claude-flow task <subcommand>
create <type> <desc> Create a new task
--priority <1-10> Task priority
--deps <task-ids> Comma-separated dependency IDs
list List all tasks
--verbose Show task descriptions
status <task-id> Get task status
cancel <task-id> Cancel a task
workflow <file> Execute workflow from file
--async Run workflow asynchronouslymemory - Manage Memory Bank
npx claude-flow memory <subcommand>
query <search> Search memory entries
--namespace <ns> Filter by namespace
--limit <n> Limit results
store <key> <value> Store information
--namespace <ns> Target namespace
export <file> Export memory to file
import <file> Import memory from file
stats Show memory statistics
cleanup Clean up old entries
--days <n> Entries older than n daysmcp - MCP Server Management
npx claude-flow mcp <subcommand>
status Show MCP server status
tools List available MCP tools
config Show MCP configuration
logs View MCP server logs
--lines <n> Number of log lines (default: 50)monitor - Real-time Monitoring
npx claude-flow monitor [options]
-i, --interval <seconds> Update interval (default: 2)
-c, --compact Compact view mode
-f, --focus <component> Focus on specific componentsparc - SPARC Development Methodology 🆕
npx claude-flow sparc [subcommand] [options]
"<task>" Run SPARC orchestrator (default mode)
modes [--verbose] List available SPARC development modes
info <mode> Show detailed mode information
run <mode> "<task>" Execute specific SPARC mode
tdd "<feature>" Run full TDD workflow
--namespace <ns> Use custom memory namespace
--dry-run Show configuration without executing
--verbose Show detailed output
--non-interactive Run with stream-json output (for automation)
--enable-permissions Enable permission prompts (default: skip)Default Behavior Updates:
- Simplified syntax:
npx claude-flow sparc "build app"(no need forrun sparc) - Permissions auto-skipped by default (use
--enable-permissionsto prompt) - Non-interactive mode for BatchTool orchestration
claude - Spawn Claude Instances with Enhanced Guidance 🆕
npx claude-flow claude <subcommand>
spawn <task> Spawn Claude with enhanced Claude-Flow guidance
-t, --tools <tools> Allowed tools (comma-separated)
--no-permissions Use --dangerously-skip-permissions flag
-c, --config <file> MCP config file path
-m, --mode <mode> Development mode (full/backend-only/frontend-only/api-only)
--parallel Enable multi-agent support
--research Enable web research capabilities
--coverage <n> Test coverage target percentage (default: 80)
--commit <freq> Commit frequency (phase/feature/manual)
-v, --verbose Enable verbose output
-d, --dry-run Show what would be executed without running
batch <workflow-file> Execute workflow configuration
--dry-run Show what would be executed without runningEach spawned Claude instance receives comprehensive guidance including:
- Claude-Flow memory operations (
npx claude-flow memory store/query) - System management commands (
npx claude-flow status/monitor) - Agent coordination (when --parallel is used)
- Mode-specific development focus
- Coverage and commit strategy awareness
- Example commands ready to use with the Bash tool
config - Configuration Management
npx claude-flow config <subcommand>
show Show current configuration
get <path> Get specific config value
set <path> <value> Set config value
init [file] Initialize config file
validate <file> Validate config filesession - Session Management
npx claude-flow session <subcommand>
list List active sessions
info <session-id> Get session information
terminate <session-id> End a sessionworkflow - Workflow Execution
npx claude-flow workflow <file> [options]
--validate Validate workflow without executing
--async Run workflow asynchronously
--watch Watch workflow progresshelp - Get Help
npx claude-flow help [command]🎯 Common Use Cases
Complete Agent & Task Workflow:
# Initialize and start the system
npx claude-flow init --sparc
./claude-flow start --ui # Use interactive UI for process management
# In another terminal, spawn agents
./claude-flow agent spawn researcher --name "Senior Researcher" --priority 8
./claude-flow agent spawn analyst --name "Data Analyst" --priority 7
./claude-flow agent spawn implementer --name "Lead Developer" --priority 9
# Create and manage tasks
./claude-flow task create research "Analyze authentication patterns" --priority 8
./claude-flow task create analysis "Security audit findings" --priority 7
./claude-flow task create implementation "Build secure auth system" --priority 9
# Monitor the workflow
./claude-flow monitorAdvanced Swarm Workflows:
# Initialize swarm system
npx claude-flow init --sparc
# Development swarm with parallel execution
./claude-flow swarm "Build microservices architecture" \
--strategy development --parallel --monitor --review
# Research swarm with distributed coordination
./claude-flow swarm "Analyze blockchain technologies" \
--strategy research --distributed --ui --verbose
# Background optimization swarm
./claude-flow swarm "Optimize application performance" \
--strategy optimization --background --testing --encryption
# Quality assurance swarm
./claude-flow swarm "Comprehensive security audit" \
--strategy testing --review --verbose --max-agents 8Code Development Workflow:
npx claude-flow agent spawn implementer --name "Backend Dev" --max-tasks 3
npx claude-flow agent spawn implementer --name "Frontend Dev" --max-tasks 3
npx claude-flow agent spawn coordinator --name "Tech Lead"
npx claude-flow workflow development-pipeline.json --watchSPARC Development Workflow:
# Initialize SPARC environment
npx claude-flow init --sparc
# Complete feature development using SPARC methodology
npx claude-flow sparc run spec-pseudocode "user authentication system"
npx claude-flow sparc run architect "JWT auth service design"
npx claude-flow sparc tdd "implement secure authentication"
npx claude-flow sparc run security-review "auth vulnerability scan"
npx claude-flow sparc run integration "connect auth to user service"
# TDD-focused development
npx claude-flow sparc tdd "payment processing system"
npx claude-flow sparc tdd "real-time notifications"
# Architecture and design
npx claude-flow sparc run architect "microservices architecture"
npx claude-flow sparc run docs-writer "API documentation"Enhanced Claude Spawn Examples:
# Backend API development with high test coverage
./claude-flow claude spawn "build REST API with authentication" \
--mode backend-only --coverage 95 --commit feature
# Frontend development with research capabilities
./claude-flow claude spawn "create responsive dashboard" \
--mode frontend-only --research --verbose
# Full-stack development with parallel execution
./claude-flow claude spawn "implement user management system" \
--parallel --coverage 90 --commit phase
# API design focus with custom tools
./claude-flow claude spawn "design GraphQL schema" \
--mode api-only --tools "View,Edit,GrepTool,LS"Workflow Execution:
# Execute a workflow file
./claude-flow workflow my-workflow.json
# Validate workflow before execution
./claude-flow workflow my-workflow.json --validate
# Execute with monitoring
./claude-flow workflow my-workflow.json --watchWorkflow Example
Create a workflow file (example-workflow.json):
{
"name": "Research and Analysis Workflow",
"tasks": [
{
"id": "research-1",
"type": "research",
"description": "Research quantum computing basics",
"assignTo": "researcher"
},
{
"id": "analyze-1",
"type": "analysis",
"description": "Analyze research findings",
"dependencies": ["research-1"],
"assignTo": "analyst"
},
{
"id": "report-1",
"type": "report",
"description": "Generate summary report",
"dependencies": ["analyze-1"],
"assignTo": "coordinator"
}
]
}Execute the workflow:
./claude-flow workflow example-workflow.jsonDevelopment
Prerequisites
- Deno 1.40+ (Install: https://deno.land/#installation)
- Node.js 16+ (for npm wrapper)
- Git
Setup
git clone https://github.com/ruvnet/claude-code-flow.git
cd claude-code-flow
./bin/claude-flow --version # Verify installationTesting
deno task testBuilding
deno task buildRunning from source
./bin/claude-flow --help # Use the binary wrapperAPI Usage
Claude-Flow can also be used programmatically:
import { Orchestrator, SwarmCoordinator } from 'claude-flow';
// Basic orchestrator
const orchestrator = new Orchestrator(config);
await orchestrator.initialize();
// Advanced swarm coordination
const swarm = new SwarmCoordinator({
strategy: 'development',
mode: 'distributed',
maxAgents: 10,
monitoring: { metricsEnabled: true }
});
await swarm.initialize();
// Create objective and agents
const objectiveId = await swarm.createObjective(
'API Development',
'Build a scalable REST API',
'development'
);
const agentId = await swarm.registerAgent(
'Lead Developer',
'developer',
{ codeGeneration: true, testing: true }
);
// Execute with timeout-free background processing
await swarm.executeObjective(objectiveId);Contributing
Contributions are welcome! Please read our Contributing Guide for details.
License
MIT License - see LICENSE file for details.
🔌 Integration with Claude Code
Claude-Flow seamlessly integrates with Claude Code through the CLAUDE.md file created by npx claude-flow init. This enables:
- Automatic Context Loading: Claude Code reads your project configuration
- Build Command Integration: All build/test commands are available to Claude
- Memory Persistence: Claude remembers context across sessions
- Enhanced Guidance: Spawned Claude instances receive detailed Claude-Flow instructions
- SPARC Methodology: Built-in support for systematic development with 17+ specialized AI modes
- Swarm Integration: Claude Code SDK used for timeout-free multi-agent execution
Use with Claude Code:
# Initialize integration with SPARC and swarm support
npx -y claude-flow@latest init --sparc
# Use local wrapper after initialization
./claude-flow start --ui # Interactive process management
# Spawn Claude with enhanced guidance
./claude-flow claude spawn "your task here" --research --parallel
# Use advanced swarm system
./claude-flow swarm "Build a REST API" --strategy development --monitor
# Claude receives:
# - Instructions on using npx claude-flow commands
# - Memory operations (store/query)
# - Agent coordination capabilities
# - Mode-specific development guidance
# - Swarm system access for complex workflows🏢 Enterprise Features
- 🔐 Security: Token-based auth, encryption, rate limiting, audit logging
- 📊 Monitoring: Real-time metrics, performance tracking, health checks
- 🔄 Reliability: Circuit breakers, automatic retries, graceful degradation
- 📈 Scalability: Horizontal scaling, load balancing, resource pooling
- 🛡️ Compliance: Audit trails, data retention policies, access controls
- 🐝 Swarm Intelligence: Advanced multi-agent coordination with enterprise fault tolerance
📖 Resources
Documentation
- Complete Documentation - All guides and references
- API Documentation - Programmatic usage
- Examples - Sample configurations and workflows
- Memory System Docs - In-depth memory bank documentation
- Swarm System Guide - Advanced multi-agent coordination
Community & Support
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Community forum
🚀 Roadmap
Current Features
- ✅ Core orchestration with multi-agent support
- ✅ Enterprise-grade swarm system with timeout-free execution
- ✅ CRDT-based memory bank with SQLite backend
- ✅ MCP server integration (stdio transport)
- ✅ Claude Code integration via
initcommand - ✅ Text-based process management UI
- ✅ 17+ SPARC development modes
- ✅ Comprehensive CLI with 15+ commands
- ✅ Advanced multi-agent coordination
- ✅ Distributed memory sharing
- ✅ Real-time monitoring and metrics
Planned Features
- Web UI for visual orchestration
- Plugin system for custom agent types
- Enhanced monitoring dashboard
- Workflow templates library
- Advanced swarm visualization
- Multi-language support for agents
🤝 Contributing
We welcome contributions! See our Contributing Guide for:
- Code of Conduct
- Development setup
- Submission guidelines
- Coding standards
- Testing requirements
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
- Built on top of Claude Code and Anthropic's Claude AI
- Inspired by the SPARC methodology
- Thanks to all contributors and the Claude community
📊 Stats
Built with ❤️ by rUv for the Claude community