ruv-swarm-cli
Distributed swarm orchestration CLI with cognitive diversity
ruv-swarm-cli is a powerful command-line interface for managing distributed AI agent swarms with support for multiple topologies, orchestration strategies, and real-time monitoring. Built with Rust for performance and reliability, it enables seamless coordination of intelligent agents across different computational paradigms.
✨ Key Features
- 🌐 Multi-Topology Support: Deploy swarms in mesh, hierarchical, ring, star, or custom topologies
- 🤖 Intelligent Agent Management: Spawn and coordinate specialized agents (researchers, coders, analysts, reviewers, orchestrators)
- ⚡ Real-Time Orchestration: Execute distributed tasks with parallel, sequential, adaptive, or consensus strategies
- 📊 Live Monitoring: Monitor swarm activity, performance metrics, and agent states in real-time
- 🎯 Cognitive Diversity: Leverage different agent capabilities and reasoning patterns for optimal problem-solving
- 🛠️ Flexible Configuration: Support for multiple persistence backends (SQLite, PostgreSQL, Redis, in-memory)
- 📈 Performance Benchmarking: Built-in benchmarking tools for WASM, agent performance, and task execution
- 🎨 Rich Output Formats: JSON, YAML, table, and colored terminal output with customizable formatting
- 🔧 Shell Integration: Comprehensive shell completion support for Bash, Zsh, Fish, and PowerShell
🚀 Installation
From Crates.io
From Source
Pre-built Binaries
Download the latest release from GitHub Releases.
🎯 Quick Start
Initialize a New Swarm
# Create a mesh topology swarm with SQLite persistence
# Create a hierarchical swarm with interactive setup
# Non-interactive setup with custom configuration
Spawn Intelligent Agents
# Spawn a researcher agent
# Create a coder agent with specific memory context
# Spawn an orchestrator for hierarchical coordination
Orchestrate Distributed Tasks
# Parallel execution with real-time monitoring
# Sequential task with high priority and timeout
# Adaptive orchestration for complex research tasks
Monitor Swarm Activity
# Real-time monitoring with 2-second refresh
# Filter monitoring events and export to file
# Status overview with detailed metrics
📚 Complete CLI Reference
Global Options
)
)
)
Commands Overview
| Command | Description |
|---|---|
init |
Initialize a new swarm with specified topology |
spawn |
Spawn a new agent in the swarm |
orchestrate |
Orchestrate a distributed task across the swarm |
status |
Show current swarm status and agent information |
monitor |
Monitor swarm activity in real-time |
completion |
Generate shell completions |
ruv-swarm init
Initialize a new swarm with the specified topology and configuration.
<TOPOLOGY> Swarm )
)
Examples:
# Interactive mesh setup with default settings
# Hierarchical swarm with PostgreSQL persistence
# Automated setup with custom configuration
ruv-swarm spawn
Create and deploy a new intelligent agent with specified capabilities.
<AGENT_TYPE> Agent )
)
)
Agent Types:
- researcher: Specialized in information gathering, analysis, and research tasks
- coder: Focused on software development, code review, and implementation
- analyst: Expert in data analysis, pattern recognition, and insights
- reviewer: Quality assurance, testing, and validation specialist
- orchestrator: Coordination and management of other agents
Examples:
# Basic researcher agent
# Advanced coder with specific capabilities and context
# Hierarchical analyst under orchestrator
ruv-swarm orchestrate
Execute distributed tasks across the swarm using various orchestration strategies.
<STRATEGY> Orchestration )
<TASK> Task
Orchestration Strategies:
- parallel: Execute task components simultaneously across multiple agents
- sequential: Execute task steps in order with agent coordination
- adaptive: Dynamically adjust strategy based on task complexity and agent availability
- consensus: Require agreement between multiple agents for decisions
Examples:
# Parallel code analysis with monitoring
# High-priority sequential deployment
# Adaptive research with consensus validation
# Execute task from file
ruv-swarm status
Display comprehensive swarm status, agent information, and performance metrics.
Examples:
# Basic status overview
# Detailed view with performance metrics
# Show only active coders
# Full detailed report in JSON format
ruv-swarm monitor
Real-time monitoring of swarm activity with filtering and export capabilities.
Event Types:
agent_spawn,agent_terminatetask_start,task_progress,task_completioncommunication,coordinationperformance,error,warning
Examples:
# Standard real-time monitoring
# High-frequency monitoring with task focus
# Export monitoring session for analysis
# Monitor only errors and warnings
ruv-swarm completion
Generate shell completion scripts for enhanced command-line experience.
<SHELL> Shell )
Setup Examples:
# Bash
# Zsh
# Fish
# PowerShell (Windows)
⚙️ Configuration
ruv-swarm-cli supports flexible configuration through YAML, TOML, or JSON files:
# ~/.config/ruv-swarm/config.yaml
profiles:
dev:
persistence:
backend: "sqlite"
connection: "./dev-swarm.db"
monitoring:
interval: 1
max_events: 1000
prod:
persistence:
backend: "postgres"
connection: "postgresql://user:pass@localhost/swarm"
monitoring:
interval: 2
max_events: 10000
security:
auth_required: true
topology:
default: "mesh"
max_agents: 10
agents:
spawn_timeout: 30
default_capabilities:
output:
format: "auto"
color: true
timestamp: true
Environment variables:
RUV_SWARM_CONFIG: Configuration file pathRUV_SWARM_PROFILE: Active profile (dev, prod, test)RUST_LOG: Logging level configuration
🏗️ Architecture Integration
ruv-swarm-cli integrates seamlessly with the broader rUv ecosystem:
- ruv-swarm-core: Core swarm orchestration engine
- ruv-swarm-agents: Intelligent agent implementations
- ruv-FANN: Neural network foundations for cognitive diversity
- MCP Integration: Model Context Protocol for AI model coordination
📈 Performance & Benchmarking
The CLI includes built-in performance tools accessible through the core API:
# Benchmark WASM performance
# Agent performance analysis
# Swarm coordination efficiency
🔧 Development & Contributing
Building from Source
Running Tests
Code Quality
📋 Examples & Use Cases
Research & Analysis Pipeline
# Initialize research swarm
# Spawn specialized research team
# Execute research pipeline
# Monitor progress
Software Development Workflow
# Development swarm setup
# Multi-role development team
# Coordinated development task
# Real-time development monitoring
🔗 Related Projects
- ruv-swarm - Main repository with complete ecosystem
- ruv-FANN - Neural network foundations
- MCP Protocol - Model Context Protocol specification
📄 License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
🎯 Created by rUv
Developed with cognitive diversity principles and distributed intelligence paradigms.
⭐ Star the project on GitHub | 📚 Documentation | 💬 Discussions