The crown jewl of software development, a terminal to access the command line interface. In the land between graphical interfaces and command line is where one of the greatest wars among programmers is fought. Do you go all-in on keyboard navigation to everything and utilize the terminal with brutal efficiency? Or do you choose to relax your mental load and use point-and-click interfaces to get things done?
Either way you land on that fight, doesn’t matter. I happen to gleefully use both CLI and GUI in various situations. But, if you’re going to be in the CLI, you might as well enjoy it. Here are some of the details of my terminal configuration.
The shell I use is Z shell, more normally known as ZSH. It is the default in Mac now, so no OS-level configuration changes are necessary. This shell has TONS of community tooling support. If you search around, you can find ways to make this shell do just about anything you want. The downside is, it does require installing extra tools to support expanded functionality.
If you’re looking for something a bit more friendly to new users, take a look at Fish Shell. It has more helpers built in, but it is not POSIX compliant. Meaning many scripts or complex commands you find online won’t natively work in it. For simple navigation and usage though, it is a good option. Many of the prompt configuration tools in this post won’t work with Fish. But they are largely not necessary either.
To any seasoned developer for Mac already, skip ahead a section. Whomever is leftover, welcome to app installation made too easy. Homebrew is a tool known as a package manager. Package managers allow for easier installation and updates of software. So long as you know what the name of the software you want is, you can install it from the command line if they are supported by Homebrew.
Some software does prevent 3rd party redistribution or installation aids. So not everything is available. But in general, most of what you desire can be installed through homebrew. This does make automating your installation easier as you don’t need to manually re-install every piece of software you need. Also, software with built-in updaters don’t conflict with homebrew, since they can update on their own just fine. You only need to upgrade through homebrew what does not have self-update support.
Homebrew has a a nifty
search feature to look for parts of a string across all of what is available and known to your configuration. Let’s say you are looking for the Chrome browser. As you run
brew search chrome you will see the resulting packages available. You can then determine safely that the package you are looking for is named
google-chrome and thus can install that to get your browser.
For the terminal application of choice, for me it is Warp. This program provides one really useful feature that I haven’t seen anywhere else, “Automated Intelligence”. Truly, I do not feel this is classified as AI in any way. It is in particular a specific way of searching for a command and it helping find what should work.
This works by writing a comment into the terminal prompt. The text content will be interpreted and a potentially suitable command provided as a starting point. I often have to still go in and tweak some bits, but it at least helps keep me from going to online search engines so often. Particularly since it recognizes differences when asked about Mac vs Linux commands.
The part of the shell you enter commands into is known as the prompt interface. The defaults in most shells are, bland and basic. Intended to give you just the information you need and then get out of your way. Better can be done. For getting a quick attempt at something with more information and prettier, look to Starship.
Starship is a quick way to get some useful information onto your prompt. These include:
- Current git branch
- Language runtime version based on the contents of the folder you are in
- If you are in a package folder, what version of the package you are on
- Command execution time for things that take longer than a couple seconds to run
I have not driven too deep into configuring Starship since I find the defaults are generally acceptable. Feel free to dig through their configuration docs to see what peeks your interest. You may find modifying the prompt enjoyable for once.