15 Command Line Tools which Spark Joy in Your Terminal
Tags: productivity, linux, beginners, bash
Published: 2021-05-06 17:37:10

Put joy and productivity inside your Terminal with those cool command line tools.

But before we start, let's cover how you can install and uninstall them.

**Table of contents**

<!-- TOC -->
- [Quick install](#quick-install)
- [Put in .bash_profile or .zshrc](#put-in-bash_profile-or-zshrc)
- [Try, adopt or uninstall](#try-adopt-or-uninstall)
- [The 15 Command Line Tools which Spark Joy in Your Terminal](#the-15-command-line-tools-which-spark-joy-in-your-terminal)
- [*tldr-pages/tldr: 📚 Collaborative cheatsheets for console commands](#tldr-pagestldr--collaborative-cheatsheets-for-console-commands)
- [stedolan/jq: Command-line JSON processor](#stedolanjq-command-line-json-processor)
- [direnv/direnv: unclutter your .profile](#direnvdirenv-unclutter-your-profile)
- [jonas/tig: Text-mode interface for git](#jonastig-text-mode-interface-for-git)
- [tmux/tmux: terminal multiplexer](#tmuxtmux-terminal-multiplexer)
- [santinic/how2: stackoverflow from the terminal](#santinichow2-stackoverflow-from-the-terminal)
- [BurntSushi/ripgrep : like grep, but better](#burntsushiripgrep--like-grep-but-better)
- [sharkdp/bat: A cat(1) clone with wings.](#sharkdpbat-a-cat1-clone-with-wings)
- [junegunn/fzf: A command-line fuzzy finder](#junegunnfzf-a-command-line-fuzzy-finder)
- [sharkdp/fd: like find, but better](#sharkdpfd-like-find-but-better)
- [wting/autojump](#wtingautojump)
- [inconshreveable/ngrok: Introspected tunnels to localhost](#inconshreveablengrok-introspected-tunnels-to-localhost)
- [github/hub:](#githubhub)
- [Any cool tool that I'm missing?](#any-cool-tool-that-im-missing)

<!-- /TOC -->


## Quick install

I don't know about you, but I don't enjoy spending lots of time installing stuff.

So here is my executive summary

```bash
PROGRAMS="hub httpie ripgrep bat fzf fd fd-find jq autojump direnv tig tmux neovim exa just lazygit jump"
NPM="how-2 tldr"
export INSTALLER="sudo apt-get"    # on Debian/Ubuntu
export INSTALLER="something else"  # on another Linux
export INSTALLER="brew"            # on macOS
for program in $PROGRAMS ; do $INSTALLER install $program ; done
for program in $NPM ; do npm install -g $program ; done
```

You may want to configure your .profile

```
## Put in .bash_profile or .zshrc
alias ls=exa
alias cat=bat
```

## Try, adopt or uninstall

Try out the CLI tools. If you don't like them, uninstall them the same way

```bash
PROGRAMS="neovim exa"
export INSTALLER="brew"            # on macOS
for program in $PROGRAMS ; do $INSTALLER uninstall $program ; done
```

This being done, let's move on to the tools!

## The 15 Command Line Tools which Spark Joy in Your Terminal

## *tldr-pages/tldr: 📚 Collaborative cheatsheets for console commands

A must have

The man page is too long, didn't read.

Replace `$ man git-checkout` by `$ tldr git-checkout`

You will find what you need in 5s or less, 80% of the time or more

{% github tldr-pages/tldr %}


## stedolan/jq: Command-line JSON processor

Unix scripts are based on the idea that you have a stdout with lines of outputs.

How do you autoamte things if you have JSON instead? (and JSON is everywhere)

jq is the answer

{% github stedolan/jq %}

## direnv/direnv: unclutter your .profile

My .profile is horrible so I'm looking forward to try this one

{% github direnv/direnv %}

## jonas/tig: Text-mode interface for git

{% github jonas/tig %}

## tmux/tmux: terminal multiplexer

tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.

{% github tmux/tmux %}

## santinic/how2: stackoverflow from the terminal

StackOverflow being such a massive part of a developer workflow, why not automating it?

{% github santinic/how2 %}

## BurntSushi/ripgrep : like grep, but better

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

{% github BurntSushi/ripgrep %}

## sharkdp/bat: A cat(1) clone with wings.

Syntax highlighting for a large number of programming and markup languages, because why not?

You can alias it

` $ alias cat=bat`

{% github sharkdp/bat %}

## junegunn/fzf: A command-line fuzzy finder

Makes looking for a file as easy as in Visutal Studio Code or IntelliJ

{% github junegunn/fzf %}

## sharkdp/fd: like find, but better

A simple, fast and user-friendly alternative to 'find'

{% github sharkdp/fd %}

## wting/autojump

A cd command that learns - easily navigate directories from the command line

{% github wting/autojump %}

## inconshreveable/ngrok: Introspected tunnels to localhost

You have your web app working on localhost, the CI is broken and you can't share your work with your colleagues.

Except that with ngrok, you can!

{% github inconshreveable/ngrok %}

## github/hub: 

A command-line tool that makes git easier to use with GitHub.

{% github github/hub %}

# Build your own CLI tools, but maybe not in Bash

Command-line tools are great to automate and simplify your developer workflow.

Tools written by others are good, but why would you not write your own tools?

I have a strong opinion weakly held on this topic:

After 15 years of trying to program in Bash and being stuck at trials and errors, I think it's time to retire Bash.

Why not using your favorite programming language instead?

I found they are 10x time better than Bash.

Python, Go and JavaScript are all good choices to write a CLI tool.

Now my favorite language being Kotlin, I wanted to write a starter project for my own CLI tools using Kotlin multiplatform.

So if you allow me this shameless plug, have a look at the **kotlin-cli-starter** GitHub template

{% github jmfayard/kotlin-cli-starter %}

## Any cool tool that I'm missing?

No such list would be ever complete, so please add your recommandation in the comments.

### Updates from my readers

##  jesseduffield/lazygit   simple terminal UI for git commands 

lazygit is a very cool git client

{% github jesseduffield/lazygit %}

See the demo

{% youtube CPLdltN7wgE %}


###  casey/just: 🤖 Just a command runner 

Inspired by make

{% github casey/just %}

## gsamokovarov/jump:  Jump helps you navigate faster by learning your habits. ✌️ 

An alternative to `cd` that feels like it can read your mind

{% github gsamokovarov/jump %}