Homebrew was the first program I installed on my Mac after wiping it. This is because the second thing is my org files, which get copied over with Syncthing, which I install with Homebrew.

Listing the apps Homebrew installs is important then. Here’s how I list what I need in a file (in this case, on my Desktop):

brew leaves > ~/Desktop/this.txt && brew list --cask >> ~/Desktop/this.txt

First, what are formulas vs casks, in an over-simplified way:

Formulas are terminal command tools, like ffmpeg or yt-dlp. Casks are generally more complex and come with a UI (“full” apps). These include apps like Signal and LibreWolf.

Now, what does the command above do:

brew leaves lists top-level formulas, meaning no dependencies. Since Homebrew installs dependencies as needed, we’re probably not even aware of those (but it’s not a bad idea to get more familiar with them), and we don’t need to install them on their own.

brew list –cask lists casks.

In the example above, we output the data of brew leaves into this.txt, and then if (if the first command is completed successfully), we’re upending brew list --casks into the same file, using >> instead of just >.