Awesome Command Line Tools

A

As a developer, I spend lot’s of time in my terminal and thus use CLI tools like git, curl,  and others quite heavily. There are several less-known tools which I can’t imagine my workflow without.

They are very impressive, and I’m pretty sure you either use them already or will start using them after reading it.

tldr

TLDR as a man replacement
TLDR as a man replacement

Man pages are very useful when you need to know how to run a specific program. At the same time, the documentation can be quite verbose. The alternative way is to use tldr, which prints a very short description of a program along with several most common examples, and thus saving so much time.

 

 

Bat

If you need to display content of a file you would usually use cat. The only problem with it is that output is a plain text which is no fun. The solution is: use bat instead. Bat is a cat clone with syntax highlighting and Git integration. Once you use it you will never want to go back, so here’s a useful alias for you alias cat=bat.

Bat is a cat replacement
Bat is a cat replacement

rupa/z

This one if one of my favorite. It’s a simple script that tracks all of your moves between directories and allows to quickly jump to a specific directory.

For example, if I have a project located in ~/projects/web/candl I can quickly navigate there by typing z candl. The only problem with it is that z is not an easy letter to type, so I have it remapped.alias j=z.

FZF

FZF is a command line fuzzy finder. You can use it for all sorts of different tasks. Basically, you can send any list to it and use it to fuzzy-search within that list. This is pretty handy in Vim, where it’s used as a replacement for a similar Ctrl-P plugin.

FZF search through the bash history
FZF search through the bash history

But when you install it also comes with several nice additions to your workflow out of the box. For example, when you press Ctrl+R to search through the history of bash commands, the FZF kicks in and you are able to search it in a fuzzy way.

 

It also integrates with rupa/z script quite nicely, plus you can use it for git branches, processes, the sky is the limit. Make sure to read the page with the examples.

thefuck

Yeah, that’s the real name. The fuck is a magical thing that corrects your previous terminal command. It sounds like magic and it feels the same. Obviously, the most natural thing to do is to alias it to something faster alias f=fuck.

Thefuck for correcting commands
Thefuck for correcting commands

More awesome command line tools

  • Have you heard about jq? It’s a simple but powerful tool for processing JSON.
  • Use prettyping instead of ping
  • For text search within a tree of files: grep < ack < agripgrep
  • Hub extends git functionality with GitHub pull-requests, etc
  • icdiff for better diff-ing
  • Moro tracks your working hours
  • Weather forecast we="curl http://wttr.in/ | less" 😉

where to go from here

Recent Posts

Categories

Meta