Installation Guide
Complete installation guide for claude-force.
Quick Install
From PyPI (Recommended)
pip install claude-force
claude-force --version
That’s it! You’re ready to use claude-force.
Detailed Installation
Prerequisites
Python 3.8+ (Python 3.10+ recommended)
pip package manager
Anthropic API Key (Get one here)
Check Python Version
python3 --version
# Should show: Python 3.8.0 or higher
Installation Methods
Method 1: PyPI (Recommended)
Install the latest stable version:
# Install
pip install claude-force
# Verify installation
claude-force --help
# Upgrade to latest
pip install --upgrade claude-force
Method 2: From Source (For Development)
Install from GitHub for the latest development version:
# Clone repository
git clone https://github.com/khanh-vu/claude-force.git
cd claude-force
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
# Install with dev dependencies
pip install -e ".[dev]"
Method 3: Install from GitHub
Install directly from GitHub without cloning:
pip install git+https://github.com/khanh-vu/claude-force.git
Optional Dependencies
Semantic Agent Selection
For AI-powered agent recommendation:
pip install sentence-transformers numpy
Development Tools
For development and testing:
pip install pytest pytest-cov black pylint mypy
Configuration
Set Up API Key
Option 1: Environment Variable (Recommended)
Linux/macOS:
export ANTHROPIC_API_KEY='your-api-key-here'
# Add to shell profile for persistence
echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.bashrc
# or for zsh:
echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.zshrc
Windows (PowerShell):
$env:ANTHROPIC_API_KEY = "your-api-key-here"
# For persistence:
[System.Environment]::SetEnvironmentVariable('ANTHROPIC_API_KEY', 'your-api-key-here', 'User')
Option 2: Pass to CLI
claude-force --api-key your-api-key-here run agent code-reviewer --task "..."
Option 3: Python API
from claude_force.orchestrator import AgentOrchestrator
orchestrator = AgentOrchestrator(
anthropic_api_key="your-api-key-here"
)
Verification
Verify Installation
# Check version
claude-force --version
# List available commands
claude-force --help
# Test with a simple command
claude-force init ./test-project \
--description "Test project" \
--name "test"
Run Tests
# Run all tests
pytest test_claude_system.py -v
# Run with coverage
pytest test_claude_system.py --cov=claude_force --cov-report=html
Troubleshooting
Command Not Found
Problem: command not found: claude-force
Solution:
# Ensure virtual environment is activated
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
# Or reinstall
pip install --force-reinstall claude-force
Import Errors
Problem: ModuleNotFoundError: No module named 'claude_force'
Solution:
# Install package
pip install claude-force
# Or for development
pip install -e .
API Key Errors
Problem: ValueError: Anthropic API key required
Solution:
# Set environment variable
export ANTHROPIC_API_KEY='your-key'
# Or pass to command
claude-force --api-key your-key ...
Sentence Transformers Not Found
Problem: ImportError: No module named 'sentence_transformers'
Solution:
# Install optional dependency
pip install sentence-transformers
Platform-Specific Notes
macOS
# Install Python via Homebrew
brew install python@3.11
# Install claude-force
pip3 install claude-force
Linux (Ubuntu/Debian)
# Install Python and pip
sudo apt update
sudo apt install python3 python3-pip python3-venv
# Install claude-force
pip3 install claude-force
Windows
Download Python from python.org
Check “Add Python to PATH” during installation
Open PowerShell and run:
pip install claude-force
Next Steps
Quick Start: See Quick Start Guide
API Reference: Explore API Documentation
Examples: Check out Examples
Need help? Open an issue on GitHub.