I often need to drown out distractions when trying to concentrate, and sometimes to do that I opt for using a noise generator. Searching for how to generate noise at the command line, I discovered this great answer on the Ubuntu Stack Exchange about using SoX.
Adapted for macOS (and assuming
brew is installed):
brew install sox play -n synth brownnoise synth pinknoise mix synth sine amod 10 100