One of the main reasons I love and continue to stick with macOS is because it’s based on Unix. Having macOS run on Unix has made the transition to Linux much more seamless and I also just find the Unix filesystem more intuitive over Windows and PowerShell.
With that being said, macOS’s version of Unix (Darwin) doesn’t come without its flaws. For instance, where the heck is the package manager?
Well, this is where Homebrew comes in, but before we go down that rabbit hole, let’s have a package manager primer 101.
If you’re new to macOS or software development, you may be wondering what a package manager is and what its purpose is. Package managers allow users to automate the process of installing, upgrading, configuring, and removing computer programs from systems.
I’d guesstimate 95% of Mac users have no business using a package manager or even care about how fast they can install applications on their workstations. But when you’re an administrator of a school district with 500 endpoints and no MDM in place (think JAMF), something like Homebrew really comes in handy.
Having Homebrew installed on endpoints allows you to install CLI tools. Once you add the
cask extension, you also have the ability to daily user applications through the CLI, making onboarding/offboarding and workstation configuration as easy as a few commands in the Terminal.
You can learn more about Homebrew by visiting their homepage here.
Let's get started with my favorite packages.
htop** **is an interactive system-monitor, process-viewer, and process-manager. If you ever worked on an Ubuntu server you should be familiar with this. Mac only comes with
Basically, it shows a frequently-updated list of the processes running on a computer, normally ordered by the amount of CPU usage. What makes
htop better than the standard
top is the advanced GUI that makes browsing processes intuitive and simple and tells you how many cores, how loaded they are, and how much memory it has.
tldr** **is a simplified and community-driven version of usual Unix man pages that cuts to the chase.
Tldr leaves all the excess fat from a lot of the standard man pages and outputs the commands you’re probably looking for.
Word to the wise though, I wouldn’t rely on
tldr if I were new to coding. If you’ve ever played Dark Souls, think of it as the messages other players leave when they die. Most of them are helpful and correct, but there are some stale or odd notes.
jq is a lightweight and flexible command-line JSON processor. If you are a command-line addict or find yourself working with APIs and haven’t been using jq, you’ve been missing out. Jq is like sed, but for JSON data. That means you can use it to slice, filter, map, and transform structured data with the same ease as awk, sed, and grep. It’s especially useful for parsing large API payloads.
The gif above is an example of the simple, yet powerful
jq parsing a giant payload of JSON data from one giant blob of iOS photo metadata to a clean and human-readable output.
ncduis a disk utility for Unix systems. Its name refers to its similar purpose to the du utility, but
ncdu uses a text-based user interface under the
[n]curses programming library. Users can navigate the list using the arrow keys and delete files that are taking up too much space by pressing the ‘d’ key.
taskwarrior is an open-source, cross-platform, time, and task management tool. Or in short, a TODO list built for the command-line.
As a command-line todo list manager, Taskwarrior maintains a list of tasks that you manage via commands, allowing you to manipulate tasks and organize by priority, date, or project.
One might wonder “why go to the trouble of using all these CLI tools when there are desktop versions with easy-to-use GUIs and cloud syncing capabilities?”
It may appear I want to seem like a “leet hacker” by wanting to stare at a black terminal with green text all day, but the reality is that working within the terminal and using CLI-based tools has increased my productivity tenfold within the last year. A lot of that has to do with
tmux is a terminal multiplexer for Unix-like operating systems. Think of Visual Studio Code but strictly in the CLI. It allows multiple terminal sessions to be accessed simultaneously in a single window. It’s useful for running more than one command-line program at the same time.
In the screenshot below, I’m running
tty-clock all within one Terminal window for a makeshift, customized command-line IDE.
Having the ability to run my command-line utilities all within one window allows me to focus without the need to use desktop apps. Using desktop apps is the death of productivity (at least for me).
Any time you need to go to your desktop, you risk the chance of getting distracted by YouTube, Instagram, Facebook, Reddit, Twitter, etc. Using
tmux with Homebrew has boosted my productivity and delivery rate 10x.
While that’s fun, I also find
tmux extremely useful when I need to SSH into another server and end the session without killing the process.
Tmux allows me to start a session, run a command, exit the server, and return with the process still intact. Great for those long archives or transfers.
I hope you can see the power, agility, and customization of Homebrew and using CLI tools to become more productive or even creative.
Some of my most creative ideas and projects have come when I’ve cut out all the excess fat from my workflow and just started with a blank slate. Sometimes too many tools just complicate the process — a streamlined, minimalistic workflow is what we need to get the ball rolling.