bunfig.toml Configuration in Bun

From the Bun cheat sheet ยท Installation & Setup ยท verified Jul 2026

bunfig.toml Configuration

Configure Bun behavior with the bunfig.toml config file

toml
# bunfig.toml โ€” project-level Bun config

[install]
peer = false              # Don't install peer deps
exact = true              # Use exact versions

[test]
coverage = true           # Enable code coverage
๐Ÿ’ก bunfig.toml is optional โ€” Bun works with sensible defaults out of the box
โšก Use ~/.bunfig.toml for global settings that apply to all projects
๐Ÿ“Œ Environment variables can be referenced with $VAR_NAME syntax in the config
๐ŸŸข install.exact = true pins versions without ^ or ~ โ€” great for reproducible builds
configbunfigtoml

More Bun tasks

Back to the full Bun cheat sheet