This is how to install Tree on macOS in the Terminal.app. It assumes Homebrew is installed. Homebrew is a package manager for OSx.
To install run this command using Homebrew:
brew install tree
Now that it is installed, here’s how to use it:
An aside, previously I never really understood the power (and thrill) of using the command line. It’s relatively simple to install and use this binary, and yet it gave me such satisfaction from discovering tree to instal/use. I think this is a sign that pursuing learning to code is the right thing for me.