I am genuinely having difficulty seeing value of using brew bundle now that options are no longer going to be part of the brew ecosystem. Do people have examples of when using a brewfile would still be more useful than a bash script that just runs many brew commands? I’m trying to decide if I want to build a wrapper script for running bundle or just completely replace the brewfile with that script.
What is the value of a Brewfile in the new optionless paradigm?
brew bundle
provides a way of installing Homebrew formulae, Homebrew taps, Homebrew casks and Mac App Store applications in an immutable fashion. It handles the logic of knowing whether something needs linked/unlinked/installed/upgraded and starting/stopping/restarting brew services
.
It is used to provide user-customisable system bootstrapping combined with tools like Strap. It is used to provide project-specific dependency specification. It is used to cleanup installed packages that are outside of those specified. It is used to set the environment variables to build against a whitelist of dependencies.
In the case of your wrapper script: if literally all it’s doing is calling brew install
unconditionally and checking the exit code: yes, there’s perhaps no value in brew bundle
over brew install foo
. In that case, though, I’m not sure how I understand how it added much more value than brew install foo --with-option
did, either.