DEV Community

OscarDOM
OscarDOM

Posted on

Faster and colourful Command-Line tools 🌈⚡

Today is Sunday, and I decided I wanted to look into some of the Command-Line tools written in Rust out there. Some of them have a lot of stars ⭐ on GitHub, so I have a good feeling these will be tools I will enjoy as a user and improve my productivity.

Rust is a programming language I want to get involved with. I came up with the idea of integrating some Command Line tools written in Rust in my day-to-day could be an excellent opportunity to get in touch with them as a user and, from there, maybe get involved in opening a new issue or drafting a Pull Request. Why not!

Here's the list of Command-Line tools I installed today on my personal computer:

  • bat: A cat(1) clone with wings. It offers Syntax highlighting and Git integration
  • bandwhich: A terminal bandwidth utilization tool. This CLI utility displays current network utilization by process, connection and remote IP/hostname.
  • bottom: A customizable cross-platform graphical process/system monitor for the terminal.
  • delta: A syntax-highlighting pager for git, diff, and grep output.
  • dust: A more intuitive version of du in Rust.
  • exa: A modern replacement for ls.
  • fd: A simple, fast and user-friendly alternative to 'find'.
  • hyperfine: A command-line benchmarking tool.
  • prox: A modern replacement for ps written in Rust.
  • ripgrep: ripgrep recursively searches directories for a RegEx pattern while respecting your .gitignore. Similar to popular search tools like The Silver Searcher, ack and grep.
  • sd: Intuitive find & replace CLI (sed alternative).
  • tealdeer: A very fast implementation of tldr in Rust. A more approachable complement to traditional man pages.
  • zoxide: A smarter cd command. Supports all major shells. Thanks for this one Stefan! @buckstefan

Some of these tools promise to give a better performance ⚡ than the common UNIX commands they are replacing. Others expand its functionality and improve the colouring 🌈 and presentation of the outputs, which is something I'm already enjoying.

To make them more traction, I added some aliases in my .bash_profile to ensure I use them in my daily work. Here's the snippet of bash just in case you want to apply the same aliases I did:

defineAlias () {
   type "$2" >/dev/null 2>&1 && alias "$1"="$2"
}

defineAlias cat bat
defineAlias ls exa
defineAlias top btm
defineAlias du dust
defineAlias find fd
defineAlias ps procs
defineAlias grep rg
defineAlias sed sd
Enter fullscreen mode Exit fullscreen mode

The defineAlias() function does not define the alias if the command does not exist. It is handy if we decide to uninstall one of these tools and forget to remove the alias from our bash profile. I found this code snippet in this StackOverflow post.

This post was initially published on my blog. Come by and check other publications I have at https://oscardom.dev or say hi to me on Twitter: @oscard0m_

Top comments (0)