Homebrew Installation
The missing package manager for macOS
By Software Freedom Conservancy
Extended installation instructions are available here.
Please consider also to donate to the package manager your're using. Without it installing CLI apps would be much more complicated. The icons link to their pages.