Five useful terminal tools for Developers

Five useful terminal tools for Developers

August 25, 2020

As a software developers, the terminal is an essential tool in our workflow. It provides a powerful interface to interact with the operating system and execute various commands. While most developers are familiar with basic terminal commands, there are many useful applications that can streamline your workflow and improve productivity. In this blog post, we will discuss five such terminal applications that every developer should know about. Whether you are a seasoned developer or just starting, these applications cah help you work more efficiently and effectively in the terminal.

Chezmoi

Github: twpayne/chezmoi

Chezmoi Logo

I’ve been researching a better way to sync my dotfiles, and I’ve stumbled upon chezmoi. If you are not familiar with Dotfiles, it typically refers to plain text configuration files (in Unix systems, adding a dot to the beginning of files and folders makes them hidden, hence the name). If you are like me, you’ve spent some time configuring your bash/fish/zsh configurations.

Chezmoi allows you to easily track changes over time, back your configurations files to a git repository and allows you to sync them between computers. There are multiple ways of dealing with dotfiles out there, but I truly appreciate the simplicity offered by chezmoi.

⌥ Worthwhile Alternative: Workbench

Delta

Github: dandavison/delta

Delta terminal screenshot

Reading diff outputs can be a daunting task. You may get used to the [less than ideal] text format/colors, but there are many tools out there that make it a lot easier to read. I have been using diff-so-fancy to solve this problem, which aims to make diffs more human-readable. But I’ve recently discovered Delta, which has all the same benefits as diff-so-fancy, but adds a few valuable features like side-by-side split view, really powerful configuration options, and even easier to read the output.

If you use the terminal to see the diffs of changed files, you will want to check out Delta.

⌥ Worthwhile Alternative: diff-so-fancy

Lazydocker

Github: jesseduffield/lazydocker

lazydocker terminal screenshot

By happy accident, I’ve discovered a few neat projects being developed by Jesse Duffield. Lazydocker is probably my favorite one. I’ve always had a hard time remembering terminal commands, which usually force me to create a good amount of aliases, scripts, and project makefiles to abstract it and make it easier to remember. Docker is no exception. Lazydocker makes it much easier to visualize and interact through a UI terminal with Docker.

It is incredibly easy to use and feature-rich. A few features include:

  • Visualize logs of containers/services
  • View container metrics (with ASCII graphics).
  • View container configurations.
  • Interact with containers: attaching, removing, rebuilding, restarting.
  • Pruning containers, images, volumes, networks, and more with a single keypress.

All of this with simple navigation and mouse support. No need to memorize unintuitive key bindings or obscure commands. As someone who works with docker daily, this nice little app has become an indispensable part of my daily work.

Lazygit

Github: jesseduffield/lazygit

lazygit terminal screenshot

Another one of his projects that I’ve been using is Lazygit, which offers a nice git GUI without leaving your terminal.

It allows you to easily:

  • Commit, squash, create fixups, rebase, push, etc.
  • Resolve merge conflicts.
  • Check out branches.
  • Visualize logs/diffs.
  • Rename commits
  • Cherry-pick
  • Undo/Redo (experimental at the moment)

Etc.

⌥ Worthwhile Alternative: gitui

Bat

Github: sharkdp/bat

bat terminal screenshot

Last but not least, this is a small but useful one. Bat is essentially cat with great syntax highlight support. It also adds some useful new features, like automatic paging, showing non-printable characters (tabs, spaces, and newline for example).

Bat is tiny (the source file is under 2 MB) and it greatly improves the readability of cat, making it a worthy replacement in my opinion.

⌥ Worthwhile Alternative: pygments