Configuration
Configuration examples for different use cases
Configuration File
LazyPR stores configuration in ~/.lazypr. You can edit this file directly or use the lazypr config commands.
Minimal Configuration
The simplest setup to get started. Perfect for personal projects and first-time users.
# LazyPR Minimal Configuration
# The only required setting is your API key
GROQ_API_KEY=your-groq-api-key-here
# Provider defaults to groq if not specified
# PROVIDER=groqGet a free API key at console.groq.com
Setting Up Minimal Config
# Set your API key
lazypr config set GROQ_API_KEY=gsk_xxxxxxxxxxxxx
# Verify configuration
lazypr config listTeam Configuration
Standardized configuration for team environments. Ensures consistent PR descriptions across all team members.
# LazyPR Team Configuration
# Recommended settings for team consistency
# API Keys
GROQ_API_KEY=your-groq-api-key-here
CEREBRAS_API_KEY=your-cerebras-api-key-here
# Provider Settings
PROVIDER=groq
MODEL=llama-3.3-70b-versatile
# Team Standards
DEFAULT_BRANCH=main
LOCALE=en
FILTER_COMMITS=true
# Context for consistent style
CONTEXT=Please review this PR carefully and provide feedback
# Reliability Settings
MAX_RETRIES=3
TIMEOUT=30000Team Setup Instructions
Each team member configures their own machine:
# Set required values
lazypr config set GROQ_API_KEY=gsk_xxxxxxxxxxxxx
lazypr config set PROVIDER=groq
lazypr config set MODEL=llama-3.3-70b-versatile
lazypr config set DEFAULT_BRANCH=main
lazypr config set LOCALE=en
lazypr config set FILTER_COMMITS=true
lazypr config set MAX_RETRIES=3
lazypr config set TIMEOUT=30000Never commit API keys to version control. Each team member should have their own key.
Multi-Provider Configuration
Configuration supporting multiple AI providers with easy switching. Ideal for production environments and cost optimization.
# LazyPR Multi-Provider Configuration
# Supports multiple providers for flexibility and fallback
# Provider API Keys
GROQ_API_KEY=your-groq-api-key-here
CEREBRAS_API_KEY=your-cerebras-api-key-here
# Active Provider (groq or cerebras)
PROVIDER=groq
# Model Selection
MODEL=llama-3.3-70b-versatile
# Common Settings
DEFAULT_BRANCH=main
FILTER_COMMITS=true
# Increased reliability for production
MAX_RETRIES=5
TIMEOUT=45000Switching Providers
# Switch to Cerebras
lazypr config set PROVIDER=cerebras
# Or use flag for one-time override
lazypr main --provider cerebras
# Check current provider
lazypr config get PROVIDERManual Fallback Strategy
# Try Groq first, fallback to Cerebras
lazypr main --provider groq || lazypr main --provider cerebrasConfiguration Reference
All Available Settings
| Setting | Description | Default |
|---|---|---|
GROQ_API_KEY | Groq API key | - |
CEREBRAS_API_KEY | Cerebras API key | - |
PROVIDER | AI provider (groq or cerebras) | groq |
MODEL | Model to use | Provider default |
DEFAULT_BRANCH | Target branch for comparison | main |
LOCALE | Output language | en |
FILTER_COMMITS | Filter merge/dependency commits | true |
CONTEXT | Custom context for AI | - |
MAX_RETRIES | Retry attempts on failure | 3 |
TIMEOUT | Request timeout in ms | 30000 |
Config Commands
# Set a value
lazypr config set SETTING=value
# Get a value
lazypr config get SETTING
# List all settings
lazypr config list
# Remove a setting
lazypr config set SETTING=Environment Variables
You can also configure LazyPR using environment variables. These override config file settings.
# In your shell profile (~/.bashrc, ~/.zshrc)
export GROQ_API_KEY=gsk_xxxxxxxxxxxxx
export LAZYPR_PROVIDER=groq
export LAZYPR_MODEL=llama-3.3-70b-versatileEnvironment variables take precedence over config file settings.
Security Best Practices
- Never commit API keys - Use environment variables or local config files
- Use separate keys - Each team member should have their own API key
- Rotate keys regularly - Update keys periodically for security
- Limit key permissions - Use keys with minimal required permissions
Validation
Verify your configuration is correct:
# Check all settings
lazypr config list
# Test with a dry run
lazypr main -u # Shows token usage to verify API connection