The Command Line.
A developer's best mate, and also one of the main sources of our frustration (it's
: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.
Oh-My-Zsh 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 and Docker, 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 to choose from — my favourite is
Note that Oh-My-Zsh is for the ZSH/Z-Shell (not bash or any other), so make sure you’ve got ZSH going first.
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 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, 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 to learn more.
Full disclosure: I am part of the HTTPie team. However, I have been using it even before I joined!
Using a command line just for the sake of using a command line?
Sign. me. up.
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
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.
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.
Kalk 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.
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 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 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
weather is too nice for it.
Oldest comments (2)
kalkdoesn't seem to be in brew anymore:
kalkeris a different tool, but does seem to do something similar.
Good catch! This is the correct way to install it: