Command line interface Icon

Command line interface

A CLI, or command-line interface, is a console that helps users issue commands to a program.
80 Stories
All Topics

Firefox github.com

Firefox Reader View as a Linux CLI

Command line tool to extract the main content from a webpage, as done by the “Reader View” feature of most modern browsers. It’s intended to be used with terminal RSS readers, to make the articles more readable on web browsers such as lynx. The code is closely adapted from the Firefox version and the output is expected to be mostly equivalent.

I could see this fitting in nicely in a pipeline between curl and, well, lots of other commands.

Ruby learnbyexample.github.io

Ruby one-liners cookbook

Ruby is my favorite tool for slightly-longer-than-one-liners, but I don’t often reach for it directly from the command line. This little cookbook might change my mind on that:

A shell utility like bash provides built-in commands and scripting features to make it easier to solve and automate various tasks. External *nix commands like grep, sed, awk, sort, find, parallel etc can be combined to work with each other. Depending upon your familiarity with those tools, you can either use ruby as a single replacement or complement them for specific use cases.

GitHub github.blog

The GitHub CLI goes 1.0

If you haven’t given the new gh a look since they announced the beta earlier this year, a lot has changed:

Since we released the beta, users have created over 250,000 pull requests, performed over 350,000 merges, and created over 20,000 issues with GitHub CLI.

It’s available for all major operating systems and if your development workflow goes through GitHub you will undoubtedly save some time and typing by adopting it.

Kubernetes github.com

K9s makes K8s look gooood ✨

We’ve linked K9s up in the past, but I’ve been playing with it today and I just had to share it again. Gerhard has us up and running on LKE (more on that coming to the blog and podcast soon) so I’ve had a chance to kick the tires a bit.

I have no idea how any of this magic works, but I do know that I like it and I’m excited to learn more. Here’s a screen grab of its Pulses feature, which gives you an overview of your entire cluster.

K9s makes K8s look gooood ✨

Git github.com

A pure Rust implementation of Git with a CLI

gix is a command-line interface (CLI) to access git repositories. It’s written to optimize the
user-experience, and perform as good or better than the canonical implementation.

Furthermore it provides an easy and safe to use API in the form of various small crates for implementing your own tools in a breeze.

The author describes this as “idiomatic, modern, lean, fast, safe, & pure” but that was too many superlatives to put in the headline. It does look nice, though. I dig the libraries + CLI that leverages them approach. Demo video on Asciinema.

Patrick DeVivo askgit.com

AskGit - query your git repo with SQL

Built in Go, askgit is an open source CLI and coming soon web interface (linked above). With this tool in your toolbox, you can mine your repo for info like commit count by author on each day of the week:

SELECT
    count(*) AS commits,
    count(CASE WHEN strftime('%w',author_when)='0' THEN 1 END) AS sunday,
    count(CASE WHEN strftime('%w',author_when)='1' THEN 1 END) AS monday,
    count(CASE WHEN strftime('%w',author_when)='2' THEN 1 END) AS tuesday,
    count(CASE WHEN strftime('%w',author_when)='3' THEN 1 END) AS wednesday,
    count(CASE WHEN strftime('%w',author_when)='4' THEN 1 END) AS thursday,
    count(CASE WHEN strftime('%w',author_when)='5' THEN 1 END) AS friday,
    count(CASE WHEN strftime('%w',author_when)='6' THEN 1 END) AS saturday,
    author_email
FROM commits GROUP BY author_email ORDER BY commits

Command line interface prithu.xyz

The beauty of Unix pipelines

I would like to show some examples of this philosophy in action – of how one can use different unix tools together to accomplish something powerful.

This post takes you step-by-step through printing a leaderboard of authors based on number of commits to a git repo, browsing memes on reddit, setting your desktop wallpaper, and getting a random movie from an IMDB list.

Lazarus Lazaridis github.com

stup - A CLI to easily save, access, and organize daily notes

The name derives from the Standup meetings since its initial purpose was to cover my need for keeping my Standup notes in a convenient way.

Quickly enter notes with a flexible text interface. Note creation looks like:

stup add @|--at|-@ <when> -n|--note "<note text>" -c|--category "<category-name>"

Then you can pull them back out by date, date-range, and/or category with:

$ stup show @ <when> -c|--category "<category-name>"

Notes are all saved as plaintext (markdown) so throw the entire directory in your synced-cloud-folder solution of choice and you have instant notes sync across all your devices.

Daniel Stenberg daniel.haxx.se

Curl's CLI can now write out JSON

This does not mean curl can fetch some JSON and print it to STDOUT. That would not be new. What it means is that the --write-out option now supports JSON as an output format. Pipe that output to a tool like jq and you get something like this:

{
  "url_effective": "https://example.com/",
  "http_code": 200,
  "response_code": 200,
  [lots more but I snipped them for length]
}

Which is pretty cool, if you ask me.

Go github.com

GoTube – a very simple command line tool for downloading YouTube videos

This repository contains a single-file implementation of YouTube video downloader written in Go. It does not require any third-party packages, only built-in packages from the standard library. The code is compact and easily-readable.

Nowhere near the features of youtube-dl (which is like a swiss army knife for downloading videos off the internet), but cool nonetheless. You can read the entirety of GoTube’s source code in a single sitting, which makes it great for learning and tinkering.

GitHub github.com

The official GitHub CLI is now in beta

gh brings many of GitHub’s concepts to the terminal. You know, things like pull requests and issues. The tool is still under heavy development and they’re looking for feedback. If you’re an early adopter, this is the perfect time to get involved and let your voice be heard. Oh, and if you’ve been using hub for years already, here’s how the new shiny compares:

gh is a new project for us to explore what an official GitHub CLI tool can look like with a fundamentally different design. While both tools bring GitHub to the terminal, hub behaves as a proxy to git and gh is a standalone tool.

The official GitHub CLI is now in beta

Amazon Web Services github.com

The missing cron CLI for AWS Cloudwatch and Lambda

Do you have an AWS account? Great. Do you want to run cron jobs in the cloud?

Cronyo provides A simple CLI to manage your cron jobs on AWS.

In addition, Cronyo can instantly deploy a couple of super-simple, helpful and secure lambda functions to perform HTTP GET/POST requests for you. So if you need to trigger any webhooks on schedule, an AWS account and Cronyo is all you need :)

Command line interface github.com

A CLI for displaying network utilization by process, connection, and remote host

bandwhich sniffs a given network interface and records IP packet size, cross referencing it with the /proc filesystem on linux or lsof on MacOS. It is responsive to the terminal window size, displaying less info if there is no room for it. It will also attempt to resolve ips to their host name in the background using reverse DNS on a best effort basis.

This looks much better than me fumbling through lsof’s man page for ten minutes and then giving up.

A CLI for displaying network utilization by process, connection, and remote host
0:00 / 0:00