# Build for your current platformgo build -o brightpath ./cmd/brightpath# Or use the Makefilemake build
Install Globally
Code
# Install to your $GOPATH/bingo install ./cmd/brightpath# Or copy the binary to your PATHsudo cp brightpath /usr/local/bin/
Verify Installation
Code
brightpath --version
You should see output similar to:
Code
brightpath version 0.1.0
Cross-Platform Builds
Build for different platforms using cross-compilation:
Code
# Linux (x86_64)GOOS=linux GOARCH=amd64 go build -o brightpath-linux ./cmd/brightpath# macOS (Apple Silicon)GOOS=darwin GOARCH=arm64 go build -o brightpath-macos-arm64 ./cmd/brightpath# macOS (Intel)GOOS=darwin GOARCH=amd64 go build -o brightpath-macos-amd64 ./cmd/brightpath# WindowsGOOS=windows GOARCH=amd64 go build -o brightpath.exe ./cmd/brightpath
Environment Setup
Brightpath requires several environment variables depending on which providers you plan to use.
Required Environment Variables
Create a .env file in your project directory or set these in your shell:
Code
# Cursor API Configurationexport CURSOR_API_KEY="your-cursor-api-key"export CURSOR_API_URL="https://api.cursor.sh" # Optional, defaults to production# XAI/Grok Configuration (if using XAI models)export XAI_API_KEY="your-xai-api-key"export XAI_API_URL="https://api.x.ai/v1" # Optional# Linear Configuration (if using Linear provider)export LINEAR_API_KEY="your-linear-api-key"export LINEAR_TEAM_ID="your-team-id" # Optional# GitHub Copilot Configuration (if using Copilot provider)export GITHUB_TOKEN="your-github-token"export COPILOT_API_URL="https://api.github.com" # Optional# General Configurationexport BRIGHTPATH_LOG_LEVEL="info" # debug, info, warn, errorexport BRIGHTPATH_CACHE_DIR="$HOME/.brightpath/cache"export BRIGHTPATH_CONFIG_DIR="$HOME/.brightpath"
Setting Up Environment Variables
On Linux/macOS
Add to your ~/.bashrc, ~/.zshrc, or ~/.profile:
Code
# Add to shell configuration fileecho 'export CURSOR_API_KEY="your-cursor-api-key"' >> ~/.bashrcecho 'export XAI_API_KEY="your-xai-api-key"' >> ~/.bashrc# Reload your shell configurationsource ~/.bashrc
On Windows (PowerShell)
Code
# Set environment variables for current session$env:CURSOR_API_KEY = "your-cursor-api-key"$env:XAI_API_KEY = "your-xai-api-key"# Set permanently[Environment]::SetEnvironmentVariable("CURSOR_API_KEY", "your-cursor-api-key", "User")[Environment]::SetEnvironmentVariable("XAI_API_KEY", "your-xai-api-key", "User")
Configuration File
Brightpath uses a YAML configuration file (.brightpath.yaml) to customize behavior and set defaults.
Default Configuration Location
Brightpath looks for configuration in the following order:
./.brightpath.yaml (current directory)
$HOME/.brightpath/config.yaml (user home)
/etc/brightpath/config.yaml (system-wide)
Configuration File Structure
Create a .brightpath.yaml file in your project or home directory:
Code
# .brightpath.yaml# Default provider to use when none is specifieddefault_provider: cursor# Global budget limit (in USD)budget: default_per_task: 5.00 max_total: 100.00 warn_threshold: 80.00# Logging configurationlogging: level: info format: json # json or text output: stdout # stdout, stderr, or file path# Provider-specific configurationsproviders: cursor: api_url: https://api.cursor.sh timeout: 300s retry_attempts: 3 model: gpt-4 # default model to use linear: api_url: https://api.linear.app timeout: 60s default_team: YOUR_TEAM_ID copilot: api_url: https://api.github.com timeout: 120s xai: api_url: https://api.x.ai/v1 timeout: 300s model: grok-beta# Batch operation defaultsbatch: max_concurrent: 5 retry_failed: true merge_strategy: auto # auto, manual, or skip# Multi-round orchestration defaultsorchestration: max_rounds: 10 default_split_strategy: parallel default_merge_strategy: consensus checkpoint_interval: 1 # Save state every N rounds# Server mode configurationserver: host: 0.0.0.0 port: 8080 enable_websocket: true auth_enabled: true rate_limit: 100 # requests per minute# Cache configurationcache: enabled: true ttl: 24h directory: ~/.brightpath/cache max_size: 1GB# Output configurationoutput: format: json # json, yaml, or text pretty: true include_metadata: true
Minimal Configuration
For a quick start, you can use a minimal configuration:
After installation and configuration, verify everything is working:
Code
# Check versionbrightpath --version# Validate configurationbrightpath config validate# Test provider connectionbrightpath provider test cursor# List available commandsbrightpath --help
Directory Structure
Brightpath creates the following directory structure:
If brightpath command is not found after installation:
Code
# Check if $GOPATH/bin is in your PATHecho $PATH | grep "$GOPATH/bin"# If not, add it to your PATHexport PATH="$PATH:$GOPATH/bin"# Make it permanent (add to ~/.bashrc or ~/.zshrc)echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc
API Key Issues
If you get authentication errors:
Code
# Verify environment variables are setecho $CURSOR_API_KEYecho $XAI_API_KEY# Test provider connectivitybrightpath provider test cursor --verbose
Configuration Not Loading
If Brightpath doesn't seem to use your configuration:
Code
# Check which config file is being usedbrightpath config path# Validate configuration syntaxbrightpath config validate# Show loaded configurationbrightpath config show
Permission Denied
If you get permission errors when building or installing:
Code
# For buildingchmod +x ./build.sh# For installing globallysudo cp brightpath /usr/local/bin/sudo chmod +x /usr/local/bin/brightpath