Configuration
Foundry uses foundry.toml for project configuration. This file controls compiler settings, test behavior, formatting rules, and more.
Quick start
A minimal configuration:
foundry.toml
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
solc_version = "0.8.28"View your resolved configuration:
$ forge configKey capabilities
| Feature | Description |
|---|---|
| Profiles | Switch between configurations for development, CI, and production |
| Environment variables | Override settings without modifying files |
| Global config | Share settings across all your projects |
| Remappings | Customize import paths for dependencies |
Learn more
Profiles
Configure different settings for development, CI, and production.
CI Integration
Set up GitHub Actions and other CI systems.
Editor Setup
Configure VS Code and other editors for Foundry projects.
Compiler and optimizer
Tune solc settings, via IR, and dynamic test linking.
Testing configuration
Control fuzzing, invariants, and test behavior.
MESC
Manage RPC endpoints across all your crypto tools from a single config file.
Configuration Reference
Complete reference for all configuration options.
Was this helpful?
