-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Installation Guide
rUv edited this page Jul 24, 2025
·
1 revision
- Node.js 18+ (LTS recommended)
- npm 9+ or equivalent package manager
- Windows users: See Windows Installation for special instructions
# 1. Install Claude Code globally
npm install -g @anthropic-ai/claude-code
# 2. Activate Claude Code with permissions
claude --dangerously-skip-permissions# 3. Install Claude-Flow Alpha globally
npm install -g claude-flow@alpha
# 4. Verify installation and initialize
claude-flow --version
claude-flow init# Check Node.js version (18+ required)
node --version
# Update npm to latest version
npm install -g npm@latest
# Clear npm cache if needed
npm cache clean --force# Install Claude Code CLI
npm install -g @anthropic-ai/claude-code
# Verify Claude Code installation
claude --version
# Initialize Claude Code (required for Claude-Flow)
claude --dangerously-skip-permissions# Install Claude-Flow Alpha version
npm install -g claude-flow@alpha
# Verify installation
claude-flow --version
# Expected output: claude-flow v2.0.0-alpha.53
# Initialize Claude-Flow
claude-flow init# Test basic functionality
claude-flow hive status
# Test MCP tools availability
claude-flow mcp tools list
# Test SPARC modes
claude-flow sparc modes# Add Claude-Flow as MCP server to Claude Code
claude mcp add claude-flow npx claude-flow@alpha mcp start
# Verify MCP integration
claude mcp list# Initialize SQLite memory system
claude-flow memory init
# Configure memory retention
claude-flow config set memory.retention 30d
claude-flow config set memory.maxSize 1GB# Enable advanced hooks (optional)
claude-flow hooks enable --all
# Configure auto-formatting
claude-flow hooks set post-edit "prettier --write {file}"
# Setup performance monitoring
claude-flow hooks set post-task "claude-flow metrics collect"# Pull Claude-Flow Docker image
docker pull ruvnet/claude-flow:v2-alpha
# Run Claude-Flow container
docker run -it --name claude-flow \
-v $(pwd):/workspace \
-e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
ruvnet/claude-flow:v2-alpha
# Initialize inside container
claude-flow init --dockerFor contributors and advanced users:
# Clone the repository
git clone https://github.com/ruvnet/claude-flow.git
cd claude-flow
# Install dependencies
npm install
# Build from source
npm run build
# Link globally for development
npm link
# Run tests
npm test# Check all installations
claude --version # Claude Code
claude-flow --version # Claude-Flow
node --version # Node.js 18+
npm --version # npm 9+
# Test core functionality
claude-flow hive init --topology mesh --agents 3
claude-flow sparc run dev "test installation"
claude-flow mcp tools list | head -10# Set Anthropic API key (if not already set)
export ANTHROPIC_API_KEY="your-api-key-here"
# Add to shell profile for persistence
echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.bashrc
source ~/.bashrc# Create a new project with Claude-Flow
mkdir my-ai-project
cd my-ai-project
# Initialize Claude-Flow project
claude-flow project init --template full-stack# Test complete hive-mind workflow
claude-flow hive init --topology hierarchical --agents 5
claude-flow orchestrate "create hello world API" --parallel-
Permission Errors
# Fix npm permissions sudo chown -R $(whoami) ~/.npm
-
Claude Code Not Found
# Reinstall Claude Code npm uninstall -g @anthropic-ai/claude-code npm install -g @anthropic-ai/claude-code -
Memory Database Errors
# Reset memory system claude-flow memory reset --force claude-flow memory init -
MCP Server Issues
# Restart MCP server claude-flow mcp restart
- Documentation: Visit our Troubleshooting guide
- GitHub Issues: Report bugs
- Community: Join Discord
Next Steps:
- Read the Quick Start guide
- Explore Core Concepts
- Try SPARC Methodology