| Crates.io | code-mesh-cli |
| lib.rs | code-mesh-cli |
| version | 0.1.0 |
| created_at | 2025-07-16 15:18:42.058447+00 |
| updated_at | 2025-07-16 15:18:42.058447+00 |
| description | Command-line interface for the Code-Mesh distributed swarm intelligence system |
| homepage | https://github.com/ruvnet/code-mesh |
| repository | https://github.com/ruvnet/code-mesh |
| max_upload_size | |
| id | 1755644 |
| size | 229,945 |
Command-line interface for the Code-Mesh distributed swarm intelligence system.
Code-Mesh CLI provides a powerful command-line interface to harness the full potential of the Code-Mesh ecosystem - enabling you to orchestrate multi-agent swarms, execute neural-enhanced tasks, and monitor performance from your terminal.
cargo install code-mesh-cli
git clone https://github.com/ruvnet/code-mesh
cd code-mesh
cargo install --path crates/code-mesh-cli
# Download the latest release for your platform
curl -L https://github.com/ruvnet/code-mesh/releases/latest/download/code-mesh-cli-x86_64-unknown-linux-gnu.tar.gz | tar xz
mv code-mesh /usr/local/bin/
# Initialize a new Code-Mesh workspace
code-mesh init
# Configure your preferred settings
code-mesh config set default-model claude-3-opus
code-mesh config set max-agents 8
code-mesh config set neural-enabled true
# Create a mesh topology swarm with 5 agents
code-mesh swarm create --topology mesh --agents 5
# List active swarms
code-mesh swarm list
# Monitor swarm performance
code-mesh swarm monitor --live
# Spawn different types of agents
code-mesh agent spawn researcher --name "code-analyzer"
code-mesh agent spawn coder --name "optimizer"
code-mesh agent spawn analyst --name "performance-monitor"
# List all agents
code-mesh agent list
# Get agent performance metrics
code-mesh agent metrics --agent-id agent-123
# Execute a task across the swarm
code-mesh task run "Analyze this codebase and suggest performance improvements"
# Monitor task progress
code-mesh task status
# Get task results
code-mesh task results --task-id task-456
code-mesh initInitialize a new Code-Mesh workspace with default configuration.
code-mesh init [OPTIONS]
--config-path Custom configuration file path
--neural Enable neural capabilities (default: true)
--simd Enable SIMD optimization (default: true)
code-mesh configManage Code-Mesh configuration settings.
code-mesh config <SUBCOMMAND>
SUBCOMMANDS:
list List all configuration settings
get <KEY> Get a specific configuration value
set <KEY> <VALUE> Set a configuration value
reset Reset to default configuration
code-mesh statusDisplay comprehensive system status and health information.
code-mesh status [OPTIONS]
--verbose Show detailed status information
--json Output in JSON format
--watch Continuously monitor status
code-mesh swarmManage distributed agent swarms.
code-mesh swarm <SUBCOMMAND>
SUBCOMMANDS:
create Create a new swarm
list List active swarms
destroy Destroy a swarm
monitor Monitor swarm performance
optimize Optimize swarm topology
code-mesh agentManage individual agents within swarms.
code-mesh agent <SUBCOMMAND>
SUBCOMMANDS:
spawn Spawn a new agent
list List all agents
metrics Get agent performance metrics
kill Terminate an agent
communicate Send messages between agents
code-mesh taskExecute and manage tasks across the swarm.
code-mesh task <SUBCOMMAND>
SUBCOMMANDS:
run Execute a new task
status Check task status
results Get task results
cancel Cancel a running task
history View task execution history
code-mesh perfPerformance monitoring and optimization tools.
code-mesh perf <SUBCOMMAND>
SUBCOMMANDS:
monitor Real-time performance monitoring
benchmark Run performance benchmarks
profile Profile system performance
optimize Optimize system settings
# Initialize workspace
code-mesh init --neural
# Create a specialized analysis swarm
code-mesh swarm create \
--topology mesh \
--agents 3 \
--name "code-analysis-swarm"
# Spawn specialized agents
code-mesh agent spawn researcher --capabilities "static-analysis,dependency-analysis"
code-mesh agent spawn analyst --capabilities "performance-analysis,security-analysis"
code-mesh agent spawn coder --capabilities "optimization,refactoring"
# Execute comprehensive code analysis
code-mesh task run "Analyze the entire codebase for performance bottlenecks, security vulnerabilities, and optimization opportunities. Provide detailed recommendations with code examples."
# Monitor progress
code-mesh task status --watch
# Get detailed results
code-mesh task results --format detailed --export analysis-report.json
# Create high-performance swarm
code-mesh swarm create \
--topology hierarchical \
--agents 8 \
--strategy performance
# Run performance benchmarks
code-mesh perf benchmark --suite comprehensive
# Execute optimization task
code-mesh task run "Optimize this Rust project for maximum performance. Focus on SIMD utilization, memory allocation patterns, and async optimization."
# Monitor real-time performance
code-mesh perf monitor --metrics "cpu,memory,neural,swarm" --live
#!/bin/bash
# ci-analysis.sh - CI/CD integration script
# Initialize Code-Mesh for CI environment
code-mesh init --config ci-config.toml
# Create lightweight analysis swarm
code-mesh swarm create --topology ring --agents 3 --name "ci-swarm"
# Analyze changed files only
CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD)
code-mesh task run "Analyze these changed files for potential issues: $CHANGED_FILES"
# Wait for completion and get results
code-mesh task status --wait
RESULTS=$(code-mesh task results --format json)
# Parse results and set exit code
if echo "$RESULTS" | jq -r '.issues | length > 0'; then
echo "Code issues detected!"
exit 1
fi
echo "Code analysis passed!"
exit 0
~/.config/code-mesh/config.toml)[swarm]
default_topology = "mesh"
max_agents = 8
auto_scaling = true
fault_tolerance = true
[neural]
enabled = true
cognitive_pattern = "adaptive"
learning_rate = 0.01
simd_optimization = true
[performance]
memory_limit = "1GB"
enable_profiling = true
metrics_interval = 1000
[integrations]
claude_flow = true
vscode_extension = true
github_actions = true
[auth]
anthropic_api_key = "${ANTHROPIC_API_KEY}"
github_token = "${GITHUB_TOKEN}"
# Core settings
export CODE_MESH_MAX_AGENTS=10
export CODE_MESH_MEMORY_LIMIT=2GB
export CODE_MESH_NEURAL_ENABLED=true
# Performance tuning
export CODE_MESH_SIMD_ENABLED=true
export CODE_MESH_PARALLEL_TASKS=true
export CODE_MESH_CACHE_SIZE=256MB
# Monitoring
export CODE_MESH_METRICS_ENABLED=true
export CODE_MESH_LOG_LEVEL=info
export CODE_MESH_TELEMETRY_ENDPOINT=https://metrics.example.com
# API Keys
export ANTHROPIC_API_KEY=your_key_here
export GITHUB_TOKEN=your_token_here
Based on comprehensive testing across different scenarios:
# VS Code extension
code-mesh ide install vscode
# IntelliJ plugin
code-mesh ide install intellij
# Vim plugin
code-mesh ide install vim
# GitHub Actions
- name: Code-Mesh Analysis
uses: ruvnet/code-mesh-action@v1
with:
agents: 5
tasks: "analyze,optimize,test"
# GitLab CI
code_mesh_analysis:
image: ruvnet/code-mesh:latest
script:
- code-mesh task run "CI analysis pipeline"
Issue: code-mesh: command not found
Solution: Ensure ~/.cargo/bin is in your PATH
Issue: High memory usage
Solution: Reduce max_agents or set memory_limit in config
Issue: Slow neural operations
Solution: Enable SIMD optimization with --simd flag
Issue: Agent spawn failures Solution: Check system resources and increase limits if needed
# Enable verbose logging
export CODE_MESH_LOG_LEVEL=debug
# Run with debug output
code-mesh --verbose task run "debug task"
# Generate diagnostic report
code-mesh diagnostics generate --output debug-report.json
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under either of
at your option.
Created by ruv - Innovator in AI-driven development tools and distributed systems.
Repository: github.com/ruvnet/code-mesh
Code-Mesh CLI - Command Your Swarm Intelligence 🚀⌨️
Unleash the power of distributed computing from your terminal