Command Line Helper Tools for Developer and SysAdmin

Open source command-line utilities to get technical tips and answers instantly.

Photo by Athul Cyriac Ajay on Unsplash

In my previous article, I talked about command-line utilities that help us to navigate the file system faster. As developers, we mostly live within the terminal, and there are tons of commands that we may need to use from time to time.

In this article let’s go through the open-source utilities that can provide us the tips and answers when we need help.

Linux man-pages project

Let’s start with the default — The Linux man-pages project.

This project documents the Linux kernel and C library interfaces that are employed by user-space programs. It is definitely the most comprehensive documentation for the built-in commands. However, navigating the man pages and pinpointing the specific information that we want is definitely a bit challenging.

man pages

cheat.sh

cheat.sh provides unified access to the best community-driven cheat sheet repositories of the world.

It supports integration with your favorite editors, e,g. VSCode, Emacs, Vim/Neovim, IntelliJ, etc.

cheat.sh
  • Has a simple curl/browser/editor interface.
  • Covers 56 programming languages, several DBMSes, and more than 1000 most important UNIX/Linux commands.
  • Provides access to the best community-driven cheat sheets repositories in the world, on par with StackOverflow.
  • Available everywhere, no installation needed, but can be installed for offline usage.
  • Ultrafast, returns answers within 100 ms, as a rule.
  • Has a convenient command-line client, cht.sh, that is very advantageous and helpful, though not mandatory.
  • Can be used directly from code editors, without opening a browser and not switching your mental context.
  • Supports a special stealth mode where it can be used fully invisibly without ever touching a key and making sounds.

For Linux command,

curl cheat.sh/tar
curl cht.sh/curl
curl https://cheat.sh/rsync
curl https://cht.sh/tr

For programming cheat sheets,

curl cht.sh/go/Pointers
curl cht.sh/scala/Functions
curl cht.sh/python/lambda

For programming queries,

curl cht.sh/go/reverse+a+list
curl cht.sh/python/random+list+elements
curl cht.sh/js/parse+json
curl cht.sh/lua/merge+tables
curl cht.sh/clojure/variadic+function

If you don’t like to use curl, install the command-line client (cht.sh). Using the client, you can start an interactive shell.

$ cht.sh --shell
cht.sh> go reverse a list

Tab completion is supported for both bash and zsh.

There are many more features you can explore. Do check out the website!

tldr-pages

The tldr-pages project is a collection of community-maintained help pages for command-line tools, that aims to be a simpler, more approachable complement to traditional man pages.

tldr

There are clients provided for multiple platforms including text editors like VSCode, Emacs, and Vim.

For a faster implementation of tldr in Rust, do try out tealdeer client.

cheat

cheat allows you to create and view interactive cheatsheets on the command line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.

cheat

To list all cheat sheets,

cheat -l

To search for a particular phrase, e.g. ssh,

cheat -s ssh

To list all cheatsheets that are tagged with “networking”,

cheat -l -t networking

howdoi

howdoi provides instant coding answers via the command line.

howdoi

With the following alias, I can display 5 colored results each time.

alias h='function hdi(){ howdoi $* -c -n 5; }; hdi'
howdoi

You can also use it from within Python.

from howdoi import howdoi

query = "for loop python"
output = howdoi.howdoi(query)

eg

eg provides examples of common uses of command-line tools.

eg

Other Useful Command Line Utilities

kb

kb is a text-oriented minimalist command-line knowledge base manager. kb can be considered a quick note collection and access tool oriented toward software developers, penetration testers, hackers, students, or whoever has to collect and organize notes in a clean way.

  • collect items containing notes, guides, procedures, cheatsheets into an organized knowledge base
  • filter the knowledge base on different metadata: title, category, tags, and others
  • visualize items within the knowledge base with (or without) syntax highlighting
  • grep through the knowledge base using regexes
  • import/export an entire knowledge base

Once installed you can set up the aliases.

cat <<EOF > ~/.kb_alias
alias kbl="kb list"
alias kbe="kb edit"
alias kba="kb add"
alias kbv="kb view"
alias kbd="kb delete --id"
alias kbg="kb grep"
alias kbt="kb list --tags"
EOF
echo "source ~/.kb_alias" >> ~/.bashrc
source ~/.kb_alias

With kb installed, you can then manage your own notes or knowledge base.

kbl -c cheatsheet
kb

The Fuck

thefuck is an app that corrects errors in previous console commands.

It attempts to match the previous command with a rule. If a match is found, a new command is created using the matched rule and executed.

The Fuck

Programmer and occasional blogger.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store