Configuration Hierarchy
Forge uses a hierarchical configuration system:- Environment Variables - System-level settings for runtime behavior
- Provider Credentials - AI provider API keys and authentication
- forge.yaml - Project-specific workflow configuration
- Command-Line Options - Execution-time overrides
Quick Start
The minimal setup requires only provider credentials:Configuration Files
forge.yaml
The main configuration file for customizing Forge’s behavior. Place it in your project root:.env File
Environment variables can be set in a.env file in your project root or globally in your shell:
Configuration Precedence
When multiple configuration sources are present, Forge applies them in this order:- Command-line arguments (highest priority)
- Environment variables
- forge.yaml in current directory
- Default values (lowest priority)
Common Configuration Tasks
Provider Setup
Configure AI provider credentials and authentication
Workflow Settings
Customize model behavior, limits, and rules
Environment Variables
Fine-tune runtime behavior and performance
Custom Rules
Define project-specific coding guidelines
Configuration Examples
Performance Tuning
Team Standards
Research and Exploration
Best Practices
Start Simple
Start Simple
Begin with minimal configuration and add settings as needed. The defaults work well for most use cases.
Version Control
Version Control
Commit your
forge.yaml to version control so the team shares the same configuration.Environment-Specific Settings
Environment-Specific Settings
Use environment variables for machine-specific settings like timeouts and API URLs.
Document Custom Rules
Document Custom Rules
Keep custom rules clear and concise. Update them as team standards evolve.
Next Steps
Provider Configuration
Set up your AI provider credentials
forge.yaml Reference
Explore all configuration options