Installation Guide
Complete installation and setup instructions for Sugar.
Prerequisites
Before installing Sugar, ensure you have:
- Python 3.11 or higher
- Claude Code CLI (installation guide)
- Git (for project management)
Install Claude Code CLI
# Install via npm
npm install -g @anthropic-ai/claude-code
# Verify installation
claude --version Install Sugar
Option 1: PyPI (Recommended)
# Install from PyPI
pip install sugarai
# Or use uv (much faster)
uv pip install sugarai Option 2: From Source
# Clone the repository
git clone https://github.com/roboticforce/sugar.git
cd sugar
# Install in development mode
pip install -e . Verify Installation
# Check Sugar version
sugar --version
# Show help
sugar help Initialize in Your Project
# Navigate to your project
cd /path/to/your/project
# Initialize Sugar
sugar init This creates:
.sugar/- Sugar configuration directory.sugar/config.yaml- Configuration file.sugar/sugar.db- SQLite task databaselogs/errors/- Error log monitoring directory
Configuration
Edit .sugar/config.yaml to customize Sugar:
sugar:
dry_run: true # Set to false when ready
loop_interval: 300 # 5 minutes between cycles
claude:
command: "claude" # Path to Claude CLI
timeout: 1800 # 30 minutes max per task
discovery:
error_logs:
enabled: true
paths: ["logs/errors/"]
code_quality:
enabled: true
source_dirs: ["src", "lib", "app"] Test Your Setup
# Validate configuration
sugar run --validate
# Run in safe mode (dry run)
sugar run --dry-run --once
# Check status
sugar status Add to .gitignore
Add Sugar's data directory to your .gitignore:
# Sugar
.sugar/sugar.db
.sugar/sugar.log
.sugar/logs/ Keep .sugar/config.yaml in version control to share settings.
Updating Sugar
# Update via pip
pip install --upgrade sugarai
# Or with uv
uv pip install --upgrade sugarai Uninstalling
# Remove Sugar package
pip uninstall sugarai
# Remove project data (optional)
rm -rf .sugar/ Next Steps
- Quick Start Guide - Get running in 5 minutes
- CLI Reference - All commands and options
- Configuration - Customize for your workflow