Modern CLI Applications: Part 1
Jan 8, 2021
5 minute read

    Following the post about colorizing the CLI, this time you will discover some interesting CLI application to enhance your workflow. For each app you will see its usage in real world examples and a comparison with the other applications. This showcase will be split over different posts with 4 applications each.

    Ready? Let’s begin the journey!

    Prerequisites: Basic knowledge about Unix command line and its applications.

    Notes: For each software listed here, a link to its repology page will be attached; this way you can check if it has been packaged for your distribution of choice and use the system package manager to install it.


    Written in:Rust
    Dependencies:libgit2 (optional)

    ls is the most used application while interacting with the CLI. For this reason the first application is its modern alternative: exa.

    The invocation is the same as ls:

    Exa invocation with no arguments

    Yay, exa printed out some colors. However, ls can do the same when using --colors=auto. Let’s try some advanced option.

    exa invoked with advanced options

    The options used above are self-documenting, but if you want to know more about them, just call the help page of exa ( exa --help ).

    You can personalize further how exa looks by adding more arguments. For example this is my personal preference:

    exa invoked with my personal options


    Wrapping up all the features highlighted above, here it is a function to use as ls alternative (here it is mapped to l but feel free to map it according to your preference):

    $ alias l='exa --icons --all --git --git-ignore --group-directories-first'

    You can notice that --long have been removed, so that it can be added when you need call l:

    $ l --long

    You can also use its abbreviated form -l or add another alias ll:

    $ alias ll='l --long'


    Written in:Rust

    The next application is a git diff viewer: delta.

    git diff output
    delta output

    Delta takes git output, formats it in a stylish way and add syntax highlighting. It supports many git commands like the following (and more):

    • git diff
    • git show
    • git log -p
    • git stash show -p
    • git reflog -p
    • git add -p

    To add delta to git, add the following to your ~/.gitconfig file:

        pager = delta
        diffFilter = delta --color-only


    delta supports many themes; you can see the complete list by running:

    $ git --list-syntax-themes

    After you have found one that you like or that pairs well with your terminal theme, add it to the config (~/.gitconfig):

        syntax-theme = Monokai Extended

    Plus and minus color have to be chosen manually. Here I use the ones for the Monokai theme (in delta section as used above):

        plus-color = "#ff6188"
        minus-color = "#a9dc76"

    Side by side

    delta with side-by-side option enabled

    To enable side by side comparison, add the following to ~/.gitconfig:

        side-by-side = true

    Bonus: color-moved

    Recent versions of git (>= v2.17, April 2018) supports new --color-moved argument that will highlight lines that have been moved with a different style than the one used with added/removed lines. delta will automatically decect when this feature has been enabled, and modify its output accordingly. All you have to do is enable --color-moved in git by default, by adding the following to your ~/.gitconfig:

        colorMoved = default

    delta when colorMoved has been enabled in git

    You can also customize the colors by adding:

    [color "diff"]
        oldMoved = "#ab9df2"
        newMoved = "#ffd866"

    Notes: delta detect color-moved usage by reading raw colors from git output. If it causes problem, disable this feauture in delta.

        inspect-raw-lines = false


    Written in:Rust
    Dependencies:OpenSSL (optional)

    How many of you use dig to perform a DNS query from the terminal? And how many of you use the newer drill to do the same? This application is aimed for you both!

    dog is a modern DNS client for the CLI, written by the developer of exa.

    dog output for domain

    It includes some cool features like emitting the output as JSON or printing the time spent for the request.

    jq pretty printing dog's JSON output

    dog printing the time spent for the request

    It also let you choose which protocol to use between the following:

    • DNS over UDP (default)
    • DNS over TCP
    • DNS-over-TLS
    • DNS-over-HTTPS

    dog printing the time spent for the request using DNS over TCP


    Written in:C
    Dependencies:ncurses, libxml2

    How many times have you came across a Markdown and had to read it as plain text? The syntax is easy and looks good when rendered. However, using projects like livedown just to read a 100 line Markdown file is overkill.

    Mandown is a Markdown pager for the command line.

    Let’s create a simple Markdown file to test mandown with. It will be called

    ## Hello world!
    I am _fairly_ simple **Markdown** file.
    - [ ] todo1
    - [x] todo2
    ### Credits
    Thanks to everyone reading this post :). ]

    Now we can use mandown to render it:

    $ mdn

    mandown rendering

    As of version 1.0.1 (16 July 2020), mandown support for the majority of HTML tags is in development. It will work best on Markdown only files, for now.


    That’s all for this post. Did you already know any of the application highlighted above? Do you know another alternative or application you want to see in the next posts? Comment below!