I recently discovered the brew bundle tap. This tap saves all your installed homebrew packages to a file. This makes it easy to version control your installed packages or make a list easy list of packages to share with others.
Install the Homebrew bundle tap, to activate the
brew bundle command
brew tap Homebrew/bundle
To dump all your installed packages to a
brew bundle dump
The dump command creates a
Brewfile in the current working directory with
all packages installed by Homebrew as entries.