Five game-changing terminal tools

4 min read

I love stumbling upon tools that are very easy to install and get setup, but make a huge difference on a day-to-day basis. Usually these tools get rid of a small annoyance, rather than trying to reinvent the wheel. Equally important, they shouldn’t require a huge amount of commitment that locks you in if the tool ever disappears. I’ve tried to include a variety of tools, and I hope that one of them gives you an “ah!” moment, the same way they did for me. Also as a plus, this page isn’t filled with ads and gets straight to what you came for when you clicked the title!

zoxide

zoxide has to be number one on my list. I have this command aliased to cd. It automatically keeps track of previous paths that you have switched to so that you can get places faster.

Let’s say for example that I have the following path and want to change into the javascript-sites directory:

cd /Users/mark/code/personal-projects/javascript-sites

The first time, I cd I have to type out that full path. The next time however, I can just

cd javascript-sites

I don’t even have to type out the full name. Assuming I don’t have any other folders that I recently changed into that start with javascript, I can go

cd javascript

A huge amount of time saved every day. With the cd alias instead of the default z command, I never have to worry about losing muscle memory for systems that don’t have zoxide installed.

lazygit

One thing I originally missed when moving away from editors like visual studio code was a interface to see which files were changed and what the line changes were. Lazygit gives this ability, right at the point at which you are looking to make a commit, and never before.

Using the command is simple. Once you have some files that you would like to commit or push, simply run lg in the directory of the git repo. A pop-up will appear that allows you to get a better picture of what is going on. For those that use neovim, lazygit can also be called from directly in neovim through <leader>lg (or whatever keybinding you may fancy).

One warning, signing with a gpg-key in lazygit on mac was a bit of a hassle, on linux it is much easier.

cargo-update

I use a lot of rust tools, and prefer to keep my sources for installing things in general on my machine to either apt or cargo. Updating things on apt is quite straightforward, and so I sought a similar solution for crates. cargo-update updates all crates at once. It can take a while, but it is much easier than updating each individually. To update all tools currently installed on the system, just run:

cargo install-update -a

the % key (in vim)

Okay, okay, this isn’t technically a tool, but it took me way too long to find and I wanted to briefly include it in this list in case anyone else is missing out. The % key will jump to the matching closing bracket to the opening bracket that you are currently on. Combine this with visual mode, and you have a super easy way to delete entire sections of code without ever worrying about getting a syntax error. I was pulling my hair out before this one.

bat

This one is kind of similar to zoxide in the sense that it seeks to be a quality-of-life improvement for a command you likely use all the time, cat. bat offers syntax-highlighting, pagination, and showing git signs for a particular file in a repo. It can be integrated with many popular tools, but I’ll leave that up to the reader as they get more specific. I have it aliased to cat, and it seems to be a drop-in replacement.

Other tools

If you liked these tools, I have a full list of other tools I use here.