loading...
Cover image for Must have command line tools!

Must have command line tools!

flrnd profile image Florian Rand Updated on ・2 min read

It's been a while since my last post, and I thought it would be a nice new year start sharing my favourite command-line tools.

Here we go:

$ hub clone rtomayko/tilt

# expands to:
#=> git clone git://github.com/rtomayko/tilt.git
  • httpie, Modern command line HTTP client – user-friendly curl alternative with intuitive UI, JSON support, syntax highlighting, wget-like downloads, extensions, etc. https://httpie.org/
    httpie gif

  • jq, A lightweight and flexible command-line JSON processor.

  • exa, A modern version of ‘ls’. https://the.exa.website/ (Thanks to Mr F.)

Michael Kohl Suggestions:

  • lab, like hub but for Gitlab (also wraps hub, so can manage both from one tool).

  • broot Instead of tree.

  • rq record query, like jq but supporting more data formats.

Discussion

pic
Editor guide
Collapse
citizen428 profile image
Michael Kohl

Since you seem to like Rust tools, how about ripgrep instead of ag?

Further suggestions:

  • lab, like hub but for Gitlab (also wraps hub, so can manage both from one tool).
  • broot instead of tree.
  • rq, record query, like jq but supporting more data formats.
Collapse
flrnd profile image
Florian Rand Author

Many thanks Michael! I forgot about ripgrep (this memory of mine 😅). rq seems pretty cool also lab and broot, added to the list!

Collapse
hugecoderguy profile image
Christian Kreiling

Most notable (and new) to me in your list are exa and bat, which are both much more modern and intuitive versions of the increasingly outdated ls and cat. exa's -T option is especially useful.

ag is also a personal favorite of mine, especially for finding TODOs in a codebase, since it ignores paths specified in the .gitignore file.

To anyone reading this: note that you can just alias those commands in your ~/.bash_profile to make the transition from ls, cat, and ack feel more seamless.

I've been using HTTPie for a long time now - I think it's a very intuitive and a useful tool for web developers who prefer to stay close to the command line. The most popular GUI alternative is Postman, however in some ways its UI is clunky and unjustified when you want to do some quick & simple API tinkering. If anyone knows of a more intuitive alternative to Postman, I'd love to know.

I'd argue that these tools are most notable since they seek to be more intuitive (and in some cases performant) alternatives to their increasingly outdated but most widely-used counterparts.

Collapse
vonheikemen profile image
Heiker

If you don't mind having Node.js installed, I created this script for myself to avoid using postman for simple tasks. It reads data from a json file and executes one or more requests. It also has a somewhat limited interactive mode so you can inspect/modify the request data before sending it.

Collapse
flrnd profile image
Florian Rand Author

I use a few nodejs clis, I'll save yours to try it later, but httpie has me really well-covered atm.

And by the way, Tiny Tina, is that a Borderlands reference? Pretty cool!

Thread Thread
vonheikemen profile image
Heiker

I hope you can find it useful.

It is a Borderlands reference. I was going to call it tinypost but I changed before uploading it to github.

Collapse
0xdonut profile image
Mr F.

thank you for sharing, this is a great list. bat and httpie look great. I have been using exa as a replacement for ls. I wonder how it would compliment ranger.

Collapse
flrnd profile image
Florian Rand Author

Thank you! I didn't know exa, added to the list :) (I must admit I have some unhealthy attraction to command-line tools written in rust :)

Collapse
0xdonut profile image
Mr F.

I installed almost all of the tools you listed. As a result ended staying up all night searching for more!

I think forgit is a great extension to fzf

screenshot

Thread Thread
flrnd profile image
Florian Rand Author

As a result ended staying up all night searching for more!

That happens to me more often than I'd admit with nvim 😂.

I think forgit is a great extension to fzf

Interesting! right now I use the git cli directly, I'm going check it out, thanks for sharing! Cheers :D

Collapse
0xdonut profile image
Mr F.

I wrote a less thorough article similar to yours a few weeks back. Couple more things in there. My favourite is thefuck

Collapse
gypsydave5 profile image
David Wickes

TBH the only useful tool in this lot is jq - it's useful for breaking down blobs of JSON in a shell pipeline. No other real alternative.

The rest of them are for developers who want the warm happy glow of working on the command line, but don't actually want to learn how to use it properly.

Collapse
flrnd profile image
Florian Rand Author

Don't be a lemon David! You are half right. I've been using cli tools since 1995. Awk, sed, ack, find... Are you one of those Who dictate which is the proper way of using things? Because in my opinion tools are there to fix problems, not create new ones 😜

Collapse
rhymes profile image
rhymes

ripgrep makes a real difference, especially with a large codebase. I'm not surprised VSCode integrated it for its search. I can literally see the difference between grepping with ripgrep and grep on the DEV's codebase. BTW they kind have the same options so there's no re-learning there.

I've aliased exa to ls and forgotten about it.

I've ditched httpie because it's completely different from curl.

I use hub everyday because I review tons of PRs and it saves a lot of typing :D

I tried bat for a while months ago but it's not that useful so I ditched it.

The rest seem very specific, not particularly interesting :D

Collapse
flrnd profile image
Florian Rand Author

Hey @rhymes , yeah, ripgrep is wonderful.

I use httpie because of its simplicity but not as substitution of curl. In my opinion, in terms of versatility curl is ahead of httpie.

tig and ranger are a nice addition, but I admit that I don't use them a lot.

I tried exa but after a few hours found the coloured output annoying. Weird, I know.

But I agree, depending on your background and needs, some of them can be more interesting than others, or not interesting at all.

Collapse
kodekat profile image
KodeKat

Check out nnn for blazing fast navigation and workflows in the terminal.

Collapse
flrnd profile image
Florian Rand Author

Hey, thanks for the suggestion, seems pretty neat, I'll check it out!

Collapse
claudiumarginean profile image
Collapse
rslhdyt profile image
Risal Hidayat

+1 for Httpie

Collapse
heytimapple profile image
Tim Apple

Don't forget cmus if you want to listen to some tunes. 😉

Collapse
flrnd profile image
Florian Rand Author

Thanks Tim, that's a good one! I used to like mpd before the streaming era, now I don't have a single mp3/ogg/flac in my computer anymore.

Collapse
tierbolg profile image
tierbolg

Hi, what about Cmder? Is a very nice terminal emulator