Sure, the brew commands can be bundled into a separate Brewfile. However, the check if brew is installed
if test ! $(which brew); then
echo “Installing homebrew…”
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
would not work in a Brewfile, would it?