I set up Homebrew on my iMac. (If you go to their site, the Homebrew project has documentation there, which explains the whole not-use-sudo philosophy and using /usr/local
 now that Apple makes it hard not to, but I don’t understand it, so it seems like an invitation to having your machine rooted. But I’m a greybeard and I quit understanding internet security back when we used uucp because we didn’t have a real internet. Hopefully someone has thought it through.)
Because I’m too lazy and ignorant (and possibly stupid) to RTFM, I found a set of color-by-number instructions handy, although I didn’t use anything after XCode (a mere 4GB download) and Homebrew.
$ brew doctor
$ brew update
$ brew doctor
$ brew install {lots of good stuff}
At some point I ran into keg-only and Cellar jabber jabber messages, but (see above) I don’t understand any of that. I just take whatever advice brew doctor
gives me and move on from there.
Some of the things I always want on a new Mac (or even one that’s 10 years old) include:
$ brew install imagemagick --with-fontconfig
$ brew install colordiff pwgen tree wdiff pstree
$ brew install pngquant
$ brew install jhead antiword poppler
$ brew install sox lame eye-D3
$ brew install gnupg
$ brew install sqlite