Shows Cheat Sheets On The Command Line Or In Your Code Editor Python example provides access to community-driven cheat sheets and snippets for Linux/UNIX commands and many programming languages, using various interfaces.

It can be used in a web browser, from the command line (using curl, or its dedicated command line client for Linux or Windows), and as a plugin for Vim, Emacs, Visual Studio Code, Sublime Text and IntelliJ Idea, so you can search and insert a code snippet without leaving the code editor / the command line.

For its cheat sheets, the tool makes use of community-driven sources like TLDR pages, Learn X in Y minutes, StackOverflow and others, as well as its own repository.

While it does have its own cheat sheet repository too, the project is actually concentrated around the creation of a unified mechanism to access well developed and maintained cheat sheet repositories.

The tool is developed by Igor Chubin, also known for its console-oriented weather forecast service, which can be used to retrieve the weather from the console using only cURL or Wget.

It's worth noting that is not new. In fact it had its initial commit around May, 2017, and is a very popular repository on GitHub. But I personally only came across it recently, and I found it very useful, so I figured there must be some Linux Uprising readers who are not aware of this cool gem. features & more tar example major features:

  • Supports 58 programming languages, several DBMSes, and more than 1000 most important UNIX/Linux commands
  • Very fast, returns answers within 100ms
  • Simple curl / browser interface
  • An optional command line client ( is available, which allows you to quickly search cheat sheets and easily copy snippets without leaving the terminal
  • Can be used from code editors, allowing inserting code snippets without having to open a web browser, search for the code, copy it, then return to your code editor and paste it. It supports Vim, Emacs, Visual Studio Code, Sublime Text and IntelliJ Idea
  • Comes with a special stealth mode in which any text you select (adding it into the selection buffer of X Window System or into the clipboard) is used as a search query by, so you can get answers without touching any other keys

The command line client features a special shell mode with a persistent queries context and readline support. It also has a query history, it integrates with the clipboard, supports tab completion for shells like Bash, Fish and Zsh, and it includes the stealth mode I mentioned in the features.

The web, curl and (command line) interfaces all make use of but if you prefer, you can self-host it.

It should be noted that each editor plugin supports a different feature set (configurable server, multiple answers, toggle comments, and so on). You can view a feature comparison of each editor plugin on the Editors integration section of the project's GitHub page.

Want to contribute a cheat sheet? See the guide on editing or adding a new cheat sheet.

Interested in bookmarking commands instead? You may want to give Marker, a command bookmark manager for the console, a try. curl / command line client usage examples

Examples of using using the curl interface (this requires having curl installed as you'd expect) from the command line:

Show the tar command cheat sheet:


Example with output:

$ curl
# To extract an uncompressed archive:
tar -xvf /path/to/foo.tar

# To create an uncompressed archive:
tar -cvf /path/to/foo.tar /path/to/foo/

# To extract a .gz archive:
tar -xzvf /path/to/foo.tgz

# To create a .gz archive:
tar -czvf /path/to/foo.tgz /path/to/foo/

# To list the content of an .gz archive:
tar -ztvf /path/to/foo.tgz

# To extract a .bz2 archive:
tar -xjvf /path/to/foo.tgz

# To create a .bz2 archive:
tar -cjvf /path/to/foo.tgz /path/to/foo/

# To extract a .tar in specified Directory:
tar -xvf /path/to/foo.tar -C /path/to/destination/

# To list the content of an .bz2 archive:
tar -jtvf /path/to/foo.tgz

# To create a .gz archive and exclude all jpg,gif,... from the tgz
tar czvf /path/to/foo.tgz --exclude=\*.{jpg,gif,png,wmv,flv,tar.gz,zip} /path/to/foo/

# To use parallel (multi-threaded) implementation of compression algorithms:
tar -z ... -> tar -Ipigz ...
tar -j ... -> tar -Ipbzip2 ...
tar -J ... -> tar -Ipixz ... also works instead of


Want to search for a keyword in all cheat sheets? Use:


List the Python programming language cheat sheet for random list:


Example with output:

$ curl
#  python - How to randomly select an item from a list?
#  Use random.choice
#  (

import random

foo = ['a', 'b', 'c', 'd', 'e']

#  For cryptographically secure random choices (e.g. for generating a
#  passphrase from a wordlist), use random.SystemRandom
#  (
#  class:

import random

foo = ['battery', 'correct', 'horse', 'staple']
secure_random = random.SystemRandom()

#  [Pēteris Caune] [so/q/306400] [cc by-sa 3.0]

Replace python with some other programming language supported by, and random+list with the cheat sheet you want to show.

Want to eliminate the comments from your answer? Add ?Q at the end of the query (below is an example using the same /python/random+list):

$ curl
import random

foo = ['a', 'b', 'c', 'd', 'e']

import random

foo = ['battery', 'correct', 'horse', 'staple']
secure_random = random.SystemRandom()

For more flexibility and tab completion you can use, the command line client; you'll find instructions for how to install it further down this article. Examples of using the command line client:

Show the tar command cheat sheet: tar

List the Python programming language cheat sheet for random list: python random list

There is no need to use quotes with multiple keywords.

You can start the client in a special shell mode using: --shell

And then you can start typing your queries. Example:

$ --shell> bash loop

If all your queries are about the same programming language, you can start the client in the special shell mode, directly in that context. As an example, start it with the Bash context using: --shell bash

Example with output:

$ --shell bash> loop
...........> switch case

Want to copy the previously listed answer to the clipboard? Type c, then press Enter to copy the whole answer, or type C and press Enter to copy it without comments.

Type help in the interactive shell mode to see all available commands. Also look under the Usage section from the GitHub project page for more options and advanced usage.

How to install command line client

You can use in a web browser, from the command line with the help of curl and without having to install anything else, as explained above, as a code editor plugin, or using its command line client which has some extra features, which I already mentioned. The steps below are for installing this command line client.

If you'd rather install a code editor plugin for, see the Editors integration page.

1. Install dependencies.

To install the command line client, the curl command line tool will be used, so this needs to be installed on your system. Another dependency is rlwrap, which is required by the special shell mode. Install these dependencies as follows.

  • Debian, Ubuntu, Linux Mint, Pop!_OS, and any other Linux distribution based on Debian or Ubuntu:
sudo apt install curl rlwrap

  • Fedora:
sudo dnf install curl rlwrap

  • Arch Linux, Manjaro:
sudo pacman -S curl rlwrap

  • openSUSE:
sudo zypper install curl rlwrap

The packages seem to be named the same on most (if not all) Linux distributions, so if your Linux distribution is not on this list, just install the curl and rlwrap packages using your distro's package manager.

2. Download and install the command line interface.

You can install this either for your user only (so only you can run it), or for all users:

  • Install it for your user only. The command below assumes you have a ~/.bin folder added to your PATH (and the folder exists). If you have some other local folder in your PATH where you want to install, change install path in the commands:
curl > ~/.bin/

chmod +x ~/.bin/

  • Install it for all users (globally, in /usr/local/bin):
curl | sudo tee /usr/local/bin/

sudo chmod +x /usr/local/bin/

If the first command appears to have frozen displaying only the cURL output, press the Enter key and you'll be prompted to enter your password in order to save the file to /usr/local/bin.

You may also download and install the command completion for Bash or Zsh:

  • Bash:
mkdir ~/.bash.d

curl > ~/.bash.d/

echo ". ~/.bash.d/" >> ~/.bashrc

  • Zsh:
mkdir ~/.zsh.d

curl > ~/.zsh.d/_cht

echo 'fpath=(~/.zsh.d/ $fpath)' >> ~/.zshrc

Opening a new shell / terminal and it will load the completion.