Into the Rabbit Hole: Cheat Sheets for Programmers


In this post, we’ll explore various cheat sheets related to programming and places where you can find more of them.

Digging Up

1. (or if you prefer) claims to be “the only cheat sheet you need”. It’s used in a CLI. How does it work? The website should give us some hint, but let’s dive in ourselves. image

So, open a terminal emulator and type the following code:


It fetches examples of the tar command from multiple sources. Let’s try the following to narrow the results down further:


You can also get cheat sheets on a specific language example

Try the following for example:


For cases when the answer is from StackOverflow, add a \?Q suffix to hide comments (or just ?Q if you’re using quotes around the URL); try and see the difference between these 2 commands:


Similarly, you can turn off ANSI coloring with \?T, and you can combine both like \?QT. output diagram


There’s also a shell client that you can install by running:

PATH_DIR="$HOME/bin"  # or another directory on your $PATH
mkdir -p "$PATH_DIR"
curl > "$PATH_DIR/"
chmod +x "$PATH_DIR/"

Or to globally install it for all users, instead run:

curl -s | sudo tee /usr/local/bin/ && sudo chmod +x /usr/local/bin/

And you can add its tab completion like for bash:

curl > ~/.bash.d/
. ~/.bash.d/
# and add . ~/.bash.d/ to ~/.bashrc

And for zsh:

curl > ~/.zsh.d/_cht
echo 'fpath=(~/.zsh.d/ $fpath)' >> ~/.zshrc
# Open a new shell to load the plugin

This is how you’ll perform those commands in the shell client: tar tar~extract python lambda python reverse list python reverse list \?Q

The client has other useful features like a handy shell where you can write your queries without having to prefix them with each time. Visit here for more on how to use it. Here’s a couple examples:

$ --shell> go reverse a list
...> cd go> reverse a list
$ --shell go> reverse a list
...> join a list
# You can make a single query for another language by prepending /> /python dictionary comprehension
...> cd ..> help

This is just the tip of the iceberg, I recommend looking through and if you wish to use advanced parameters, The intro page should tell you how to install it so that you can use it without having to type an URL each time.

Now, let’s explore some other lesser known features of that the documentation doesn’t mention.

I. chmod Calculator has a handy chmod calculator. Try the following for example which gives you a nice colored output describing the permissions:


If you’re using the CLI client, you can also type: chmod 755

II. Learn X in Y Minutes Integration

You can run the following to view the Learn X in Y Minutes page of Python:


Replace python with any other language and have its Learn X in Y Minutes page instead. Likewise, with the CLI client, you can type: python :learn


You can type the following to quickly view any IETF RFC in your terminal:


And replace 8259 with any IETF RFC you wish to view. Likewise, with the CLI client, you can type: rfc 8259

You can also write the name of the RFC instead for searching through available RFCs. For example:



4627 The application/json Media Type for JavaScript Object Notation (JSON). D. Crockford. 
6901 JavaScript Object Notation (JSON) Pointer. P. Bryan, Ed., K. Zyp, M. Nottingham, Ed..

And then you can make a new query with the RFC number.

IV. Latency Numbers

You can type the following to view a cheat sheet of latency numbers:


Likewise, with the CLI client, you can type: latencies

V. OEIS Integration

An OEIS integration currently exists but is broken. I’ve submitted an issue (and thankfully the maintainers responded very quickly), and a fix should be along the way. I’ll update this post after it’s fixed and document its usage.

2. Navi

Navi is another popular command-line cheat sheet, except it’s interactive.

navi ascii cast

Install it from your preferred repository or download the binary for your OS. There are other ways to use it, which you can find in their README. Let’s explore them ourselves.

I. Typing navi In the Terminal

It’s the most simple way to use navi, Try it:


The ASCII Cinema video above showcases how the output looks.

II. As a Shell Widget

You can add the following to your shell’s rc file to be able to use navi as a shell widget:

# bash
eval "$(navi widget bash)"

# zsh
eval "$(navi widget zsh)"

# fish
navi widget fish | source

# elvish
eval (navi widget elvish | slurp)

After, you can access navi by pressing Ctrl+G. You can learn more about it here. It’s what was used to “fix” commands in the video above. Try it yourself by pressing CTRL + G after typing the following after you’ve added the mentioned line to your shell rc file and reloaded it:

ls | remove first line

It should change to the follow:

ls | tail -n +2

III. As a Tmux Widget

You can add the following to your tmux config to use navi as a tmux widget:

bind-key -T prefix C-g split-window \
  "$SHELL --login -i -c 'navi --print | head -c -1 | tmux load-buffer -b tmp - ; tmux paste-buffer -p -t {last} -b tmp -d'"

The widget can be accessed by pressing prefix + C-g. It’s useful when you want to use navi in any command-line apps or SSH sessions.

IV. Others

You can also use navi as aliases, a shell scripting tool, or an Alfred workflow.

Cheatsheet Repositories

Running navi for the first time will help you download and manage cheatsheets.

You can also:

Cheatsheet Syntax

Cheatsheets are described in .cheat files that look like this:

% git, code
# Change branch
git checkout <branch>
$ branch: git branch | awk '{print $NF}'

The full syntax and examples can be found here.

More Info

Run the following to learn more about possible options:

navi --help

3. Devhints

Devhints is a beautiful website containing many useful cheat sheets.

Visit any page, for example, and you’ll have a good amount of useful information right in front of you.

4. is not really a “cheat sheet” per se; this website allows you to get elegant explanations for various shell commands. Visit for an example.

5. Awesome Cheatsheet

Awesome Cheatsheet is an awesome lists of various cheat sheets from all over the web.

Notable mentions:

6. Learn X in Y Minutes

Learn X in Y Minutes Is a website containing cheat sheet-like references of various programming languages among other things, something we’ve already seen in Visit for an example.

7. 100 Seconds of Code

100 Seconds of Code is a YouTube series by Fireship. It’s an awesome series covering a vast amount of concepts within 100 seconds each.

8. Cheatography

Cheatography is another cheat sheet website, hosting thousands of programming cheat sheets. Visit for an example. You can also download the cheat sheets as PDFs.

Wrapping Up

So that’s it, we’ve covered several useful cheat sheets for programmers. I hope this post was helpful, and maybe the next time you need to remember the syntax for a regex lookaround, you’ll have an easier time.

Going Ahead

If you enjoy reading through lists of things, you may want to check out the sindresorhus/awesome repository or the awesome-list topic on GitHub.’s maintainer has awesome-console-services that you might find fun to tinker with.


Thanks to @Dylan-DPC, @Monadic-Cat, and @Evrey for reviewing this post.