ruflo icon indicating copy to clipboard operation
ruflo copied to clipboard

Does claude-flow works on WSL?

Open assafnoahkoren opened this issue 1 year ago • 4 comments

It seems that things aren't going smooth on WSL. claude-flow start is closed right after the last console print.

Image

Moreover, when running claude-flow start --ui it stays up but it seems its not "seeing" agents or tasks.

My question is: is there someone that uses claude-flow on WSL?

assafnoahkoren avatar Jun 18 '25 23:06 assafnoahkoren

Yeah same problem here, and also strugled to conect to the dev server, had to set --host 0.0.0.0

arthurlongue avatar Jun 19 '25 02:06 arthurlongue

Does claude-flow works?)

RuKapSan avatar Jun 19 '25 08:06 RuKapSan

Running any task leads to Ink erros about RawMode not being active...

PabTorre avatar Jun 19 '25 15:06 PabTorre

Hi @assafnoahkoren! 👋

Yes, Claude-Flow v2.0.0 fully supports WSL (Windows Subsystem for Linux)! The issues you're experiencing are likely due to WSL-specific configuration requirements. Here's how to get it working:

WSL Installation Guide

1. Prerequisites for WSL

# Update WSL to latest version
wsl --update

# Ensure you're using WSL2 (recommended)
wsl --set-default-version 2

# Install required dependencies
sudo apt update
sudo apt install -y nodejs npm build-essential

2. Fix Common WSL Issues

Issue: Process closes immediately

This is often due to WSL's terminal handling. Solution:

# Use the --persist flag
claude-flow start --persist

# Or run in background mode
claude-flow start --daemon

Issue: UI not showing agents/tasks

WSL requires explicit network configuration:

# Start with explicit host binding
claude-flow start --ui --host 0.0.0.0 --port 3000

# Access from Windows browser at:
# http://localhost:3000

3. WSL-Specific Configuration

Create .claude/config.wsl.json:

{
  "runtime": {
    "platform": "wsl",
    "persistMode": true,
    "host": "0.0.0.0",
    "autoRestart": true
  },
  "ui": {
    "autoOpen": false,
    "browserPath": "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
  }
}

4. Complete WSL Setup

# Clean install
npm uninstall -g claude-flow
npm cache clean --force

# Install latest version
npm install -g claude-flow@latest

# Initialize with WSL config
claude-flow init --sparc --wsl

# Start with WSL-optimized settings
claude-flow start --ui --wsl-mode

5. Troubleshooting Script

# Run diagnostics
claude-flow doctor --wsl

# This will check:
# - Node.js version compatibility
# - WSL version (1 vs 2)
# - Network configuration
# - File system permissions
# - Process persistence

Known WSL Considerations:

  1. File watching: WSL2 has better file watching support than WSL1
  2. Network access: May need Windows Firewall exceptions
  3. Performance: Native Linux performs better than WSL for I/O operations
  4. GPU access: WSL2 supports GPU acceleration if needed

Alternative: Docker on WSL

# Use our Docker image for consistent experience
docker run -it -p 3000:3000 -v $(pwd):/workspace \
  ruvnet/claude-flow:latest start --ui

Many users successfully run Claude-Flow on WSL daily. The key is proper configuration for the WSL environment. Let me know if you need help with any specific aspect!

🐧 Happy coding on WSL!

ruvnet avatar Jul 04 '25 21:07 ruvnet