5 Handy CLI Tools to Spice up Your Terminal
Tags: githunt, productivity, tooling, todayilearned
Published: 2021-07-09 15:09:02

The Command Line.

A developer's best mate, and also one of the main sources of our frustration (it's `esc`, then `:q` to quit Vim, by the way).

Regardless of its social status, there are plenty of great CLI tools that can make quite a difference in the overall terminal experience.

Here are some of my favourites, in no particular order. Some are tools that I use every day in my work, and others are just fun apps to try if you get bored of a GUI.

Shall we?

## 1. [Oh-My-Zsh](https://ohmyz.sh/)

![oh-my-zsh screenshot with wedisagree theme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/467bung2smmypgklrfk9.jpg)

[Oh-My-Zsh](https://ohmyz.sh/) is a framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, and themes.

In short — Oh-My-Zsh makes the terminal less intimidating by bringing some colour and autocompletion to tools like [Git](https://git-scm.com/) and [Docker](https://www.docker.com/), as well as plenty of package managers and other popular command line utilities.

```
# To install
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# To configure your plugins, themes, aliases etc.
$ vi ~/.zshrc
```

Admittedly, my favourite part is that there are lots of different [themes](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes) to choose from — my favourite is [`wedisagree`](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#wedisagree).

Note that Oh-My-Zsh is for the **ZSH/Z-Shell** (not bash or any other), so make sure you’ve got [ZSH](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH) going first.


## 2. [HTTPie](https://httpie.io)

![HTTPie in the terminal](https://raw.githubusercontent.com/httpie/httpie/master/httpie.gif)

Ever wanted to make a request to an API or a website, without having to pull out an arsenal of devtools?

Say no more — [HTTPie](https://httpie.io) is here to save the day.

HTTPie is a CLI HTTP client that comes with colourised output (that goes fashionably well with Oh-My-Zsh's `wedisagree`), really intuitive syntax, and a number of other features to make testing and debugging APIs as simple as it gets.

```
# To install with brew
$ brew install httpie

# To make a request
$ http httpie.io/hello
```

One feature I find particularly handy is the [`--offline` mode](https://httpie.io/docs/2.4.0#offline-mode), which lets you build and print out a (colourised and formatted) HTTP request without sending it. That way, you can see exactly the stuff the API in question is going to receive.

Check out my recent [Getting started with HTTPie guide](https://dev.to/elenalape/apis-101-getting-started-with-httpie-2o9g) to learn more.

Full disclosure: I am part of the HTTPie team. However, I have been using it even before I joined!

## 3. [Wttr.in](https://github.com/chubin/wttr.in)

![wttr.in weather forecast preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/te5m2bi8mg9sezcdvs0v.png)

Using a command line just for the sake of using a command line?

Sign. me. up.

[Wttr.in](https://github.com/chubin/wttr.in) is a console-based weather report app. Just add your city to the URL, and send a request like so:

```
# Using HTTPie
$ http wttr.in/london 

# Or, using cURL
$ curl wttr.in/london 
```

I’ve aliased `http wttr.in/London` with `weather`. So now, each time I want to see the weather forecast for London, I am able to simply type `weather` and save all those precious seconds of having to pick up my phone and navigate to the weather app. 


## 4. [Kalk](https://kalk.dev/)

![Kalk calculator preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zwsgl326s2oaf4ohx5wo.gif)

Computers have evolved so far ahead from their original purpose, which was to calculate things.

Sure, you can and create some sick beats with your machine, or run Overwatch at one bazillion frames per second. 

But something as simple as _calculating_ what grade you need to score in an exam to pass the course is more tricky than it should be. Your default OS calculator is an option, but it's very basic. Google kiiind of does the job, but requires internet connection. So do more advanced tools like [Wolfram Alpha](https://www.wolframalpha.com/).

[Kalk](https://kalk.dev/) is... a CLI for a calculator.

```
# To install using brew
$ brew tap xoofx/kalk 
$ brew install kalk


# To launch
$ kalk
```

```
kalk 0.4.0+3fb73b1 - Copyright (c) 2020-2021 Alexandre Mutel
# Type `help` for more information and at https://github.com/xoofx/kalk

>>> # You can do things such as
>>> x=2; round((54+4)/(4+x))

# x = 2; round((54 + 4) / (4 + x))
x = 2
out = 10
```

It's simply brilliant both as your regular everyday calculator, and a more advanced one that will solve your equations using the same syntax you'd use in a maths class. 

## 5. [Taskwarrior](https://taskwarrior.org/)

![taskwarrior screenshot from wikipedia.org](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yl24k97hju6b6yd5vzze.png)

It's an open secret that creating to-do lists is peak procrastination, as a queen of procrastination, I'd like to introduce you to one more way _to-do_ it.

[Taskwarrior](https://taskwarrior.org/) is a nifty tool if you want to keep all your _actual_ to-dos separate from shopping lists and song lyric ideas that you've got sitting in your note taking app.

```
# To install with brew
$ brew install taskd

# To create a new task (it will prompt you to create a ~/.taskrc file upon the first run; select yes
$ task add 'Write a dev.to article about CLI tools'

# To view all pending tasks
$ task

# To mark task as complete
$ task <task_id> done
```

You can also annotate, set a priority level or a by-date to individual tasks or their groups.

Taskwarrior's [30 second tutorial](https://taskwarrior.org/docs/30second.html) has got everything you need to get started.

________

Do you have any favourite CLI tools you'd like to share? Please let me know if you give any of the ones listed above a try! 

I'm going to go finish that burning `task` now.

Unless the `weather` is too nice for it.