brew
The brew module manages Homebrew packages from Lua. Declare your formulae, casks, and Mac App Store apps; Rootbeer generates a Brewfile and applies it with brew bundle.
lua
local brew = require("rootbeer.brew")Configure Homebrew
lua
brew.config({
formulae = { "git", "ripgrep", "fzf", "jq", "mise" },
casks = { "ghostty", "raycast", "1password" },
mas = {
{ name = "Things", id = 904280696 },
},
})For packages that only belong on some machines, use Profiles.
API Reference
brew.config(cfg)
Generates a Brewfile at cfg.path and runs brew bundle to apply it.
Parameters — cfg: brew.Config
casksstring[]optionalHomebrew casks to install.
formulaestring[]optionalHomebrew formulae to install.
Mac 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.