Homebrew refers to itself as "the missing package manager for macOS." But how can you put it to use?

As you can probably tell from the name, a package manager is a program that lets you manage software packages. These install apps, applets, and other little goodies to enhance and improve your day-to-day computing experience.

Let's take a look at what Homebrew can do with some handy apps for your Mac.

Prerequisites to Using Homebrew

Follow these steps to set up everything you need to install the apps discussed here.

Install Homebrew

First, you'll need to open Terminal to install Homebrew on your Mac. While you're at it, go ahead and install cask as well. It'll open up the range of options available to you.

Install Python

Installing programming languages is one of Homebrew's bread-and-butter tasks. A lot of open source software, in particular, is built with Python.

Python 2 is standard in macOS, but you need to install Python 3 separately. In addition, you should install pip, the Python package manager.

Command to install Python:

        brew install python
    

Command to install pip:

        sudo easy_install pip
    

Xcode Command Line Tools (CLT)

Next, make sure you have Xcode installed. You can download Xcode free on the Mac App Store.

Once that's all set, you can install the Command Line Tools through Xcode itself, or via the command line with the following command:

        xcode-select -install
    

Now you're all set to take advantage of the awesome power of Homebrew.

1. ql plugins

When you select a file on your Mac and hit space, Quick Look will bring up a preview image of the file you want to open. macOS Mojave greatly enhanced this feature, allowing you to even make markups and edits within Quick Look itself.

You can enhance the Quick Look feature with ql, a series of plugins that improves what Quick Look can tell you.

  • qlimagesize: Preview the size of images in megabytes, along with their resolution in pixels.
  • qlcolorcode: Preview source code files and display their syntax highlighting.
  • qlmarkdown: Preview Markdown-compatible files.
  • suspicious-package: Preview any standard Apple installer package (ones that end in PKG) and see exactly what it will install and where, including pre- and post-install scripts.

There's a plethora of additional ql plugins available. These allow you to preview everything from JSON files to ZIP files.

Command to install all ql plugins:

        brew install qlcolorcode qlstephen qlmarkdown quicklook-json webpquicklook suspicious-package quicklookase qlvideo qlImageSize
    

2. mas

Take the GUI out of your Mac app downloads entirely by installing mas, the Mac App Store CLI installer. This allows you to install apps from the App Store directly from the command line.

You can search for apps, install all existing updates, print the version number of an app in the store, and more. There's even a fun option called lucky that will install the very first search result. Try it if you dare.

Command to Install:

        brew install mas
    

3. midnight-commander

Midnight Commander in Action

This powerful app attempts to combine the best of both Finder and the command line by creating an interactive file manager directly in the Terminal window.

Midnight-commander allows you to search your directory structure using clicks or the keyboard arrows. You can compare the directories on the right with those on the left to get a quick sense of file sizes, directory structure, and more.

After you install, you can launch midnight-commander with the

        mc
    

command.

Command to install:

        brew install midnight-commander
    

4. speedtest-cli

speedtest-cli installed via homebrew

Note: This program requires pip, the Python package manager. We provided instructions to install pip earlier.

speedtest-cli allows you to do a quick test of the speed of your internet connection right from the command line.

Popular options include:

        --bytes
    

: Displays the output in bytes instead of bits (remember there are eight bits to one byte, so a one gigabit per second connection is really 125 megabytes per second).

        --simple
    

: Displays only basic information (ping speed, download speed, and upload speed), which is most likely all you want to know.

Command to install:

        pip install speedtest-cli
    

5. wifi-password

Note: You need XCode's updated CLT for this to work (see above).

The app wifi-password will, after a Keychain authentication, display the Wi-Fi password of the network you're currently connected to, or another network in your Keychain.

Command to install:

        brew install wifi-password
    

6. tldr

tldr in action

Anybody who has ever dabbled in bash scripting knows how valuable (and how dense and unreadable) the man pages can be.

If all you want to do is get a quick list of the available options for ls or the syntax for find, tldr is a priceless resource. It's like having your very own coding buddy sitting right next to you, translating the man command into friendlier terms.

Command to install:

        brew install tldr
    

7. archey

Archey Displays System Information in a Fun Way

Have you ever wanted to display the blazing-fast speed of your modern system and contrast it with just a hint of nostalgia? archey is here to help. This cute, single-function app will display your system information in Terminal next to a text-based retro-style Apple icon. It's just one fun way to get a retro look on your Mac.

Command to install:

        brew install archey
    

8. htop

As a command line version of Activity Monitor, top is powerful but leaves much to be desired. It displays a lot of useful information about the processes running on your computer, but it's almost impossible to navigate. If you want to select a process or kill it, you might as well just restart your whole machine in the amount of time it takes to figure out how to do it with top.

Enter htop, the homebrew-installable command line app that tops top. It is easy to navigate, makes it simple to select processes, and killing them isn't a puzzle. The app highlights different kinds of data using different colors, making it also easy to read and digest the information you're seeing.

Command to install:

        brew install htop
    

Dive Deeper With Open Source Software

Hopefully these apps have turned you on to how powerful command line tools can be. Now that the potential of Homebrew has whet your appetite, get lost in some more excellent free and open source software for Mac. Once you dive in, it's tough to go back.