brew
Declarative Homebrew package management. Define your formulae, casks, and Mac App Store apps as a Lua table — rootbeer generates a Brewfile and runs brew bundle to apply it.
lua
local brew = require("rootbeer.brew")Example
lua
brew.config({
formulae = { "git", "ripgrep", "fzf", "jq", "mise" },
casks = { "ghostty", "raycast", "1password" },
mas = {
{ name = "Things", id = 904280696 },
},
})For conditional packages per machine, see Multi-Device Config.
API Reference
config(cfg)
Generates a Brewfile at cfg.path and runs brew bundle to apply it.
casksstring[]optionalHomebrew casks to install.
formulaestring[]optionalHomebrew formulae to install.
masbrew.MasApp[]optionalMac App Store apps to install.
pathstringoptionalWhere to write the Brewfile. Defaults to
"~/.config/Brewfile".brew.MasApp
idnumberMac App Store ID.
namestringDisplay name of the app.