displays cheat sheet in command line or code editor

cheat Use a variety of interfaces to provide community-driven cheat sheets and summaries of Linux / UNIX commands and many programming languages. It can be used in a web browser from the command line (using curl or Linux or Windows-specific command line client) in a web browser and as a plugin for Vim, Emacs, Visual Studio Code, Sublime Text and IntelliJ Idea, So you can search and insert code snippets without leaving the code editor / command line.
For cheat sheets, the tool leverages community-driven source Like TLDR page, Learn X in Y minutes, StackOverflow, etc., as well as its own repository.
Although it also has its own cheat sheet repository, the project actually focused on creating a unified mechanism to access a well-maintained cheat sheet repository.
The tool was developed by Igor Chubin, who is also known for his console-oriented weather forecast service weightCan 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 was first submitted around May 2017 and is a very popular repository on GitHub. But I personally only discovered it recently, so I found it very useful, so I think there must be some Linux Uprising readers who don’t know this is cool. features and more tar example main functions:

  • Support 58 Programming language, Several DBMS and more than 1000 most important UNIX / Linux commands
  • Very fast, returns the answer in 100 milliseconds
  • Simple curl / browser interface
  • An optional command line client ( is available, which allows you to quickly search cheat sheets and easily copy code snippets without leaving the terminal
  • Can be used from a code editor, search for code snippets without having to insert a web browser, search for code, copy the code, then return to the code editor and paste. It supports Vim, Emacs, Visual Studio Code, Sublime Text and IntelliJ Idea
  • Comes with a special stealth mode where any text you select (add it to the X Window System’s selection buffer or clipboard) is used as a search query for, so you don’t need to touch any other keys to get answer

The command line client has a special shell mode with persistent query context and readline support. It also has query history, integrates with the clipboard, supports tab completion for shells like Bash, Fish, and Zsh, and includes the stealth mode I mentioned in feature.
Web, curl and (command line) interfaces are used But if you want, you can Self-hosting it.
It should be noted that each editor plugin supports a different feature set (configurable server, multiple answers, switching comments, etc.). You can check the feature comparison of each editor plugin on it. Editorial integration The project’s GitHub page“. See the guide on Edit or add New cheat sheet. Interested in bookmark commands? You might want to try Marker (the console’s command bookmark manager). curl / command line client usage example

Example using using the curl interface from the command line (this requires curl to be installed as expected):
Show tar Order cheat sheet:


Example 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 ... can also replace


Want to search for one keyword In all cheat sheets? use:


A Python programming language cheat sheet listing the following random list:


Example 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 Works with other programming languages ​​supported by, and random+list The cheat sheet to display.
Do you want to delete the comment in the 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 (command-line client). You will find instructions on how to install it later in this article. Example using command line client:
Show tar Order cheat sheet: tar

A Python programming language cheat sheet listing the following random list: python random list

No need to use quotes with multiple keywords.
You can start the client using the following special shell modes: --shell

You can then start typing the query. example:

$ --shell> bash loop

If all queries are for the same programming language, the client can be launched directly in that context in a special shell mode. For example, start it in a Bash context using the following command: --shell bash

Example output:

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

Do you want to copy the previously listed answers to the clipboard? Types of c,then press Enter Copy the entire answer, or type C then press Enter Copy it without commenting.
Types of help View all available commands in interactive shell mode. Also look Use part Get more options and advanced usage from the GitHub project page.

How to install the command line client

You can use in a web browser with the help of curl’s command line, without having to install other code editor plugins (as described above), or install anything else, or use its command line client (with some Extra features), I have already mentioned. The following steps are used to install this command line client.
If you want to install a code editor plugin for, see Editorial integration Install dependencies on page 1.
To install the command line client: curl You will use the command line tool, so you need to install it on your system. Another dependency is rlwrapThis is required for special shell mode. Install these dependencies as follows.

  • Debian, Ubuntu, Linux Mint, Pop! _OS and any other Debian or Ubuntu based Linux distribution:
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

In most, if not all, Linux distributions, these packages appear to have the same name, so if your Linux distribution is not on this list, just install curl with rlwrap Package package 2 using the release’s package manager. Download and install command line interface.
You can install this file only for your users (so only you can run it) or all users:

  • Install only for your users. The following command assumes you have a ~/.bin Folder added to your PATH (And the folder exists). If your other local folders PATH Where to install, change the installation path in the command:
curl > ~/.bin/

chmod +x ~/.bin/
  • Install for all users (Global /usr/local/bin):
curl | sudo tee /usr/local/bin/

sudo chmod +x /usr/local/bin/

If the first command seems to freeze and only shows the cURL output, press Enter Key and you will be prompted for a password to save the file to /usr/local/binYou can also download and install the command for Bash or Zsh to complete:

  • Slam:
mkdir ~/.bash.d

curl > ~/.bash.d/

echo ". ~/.bash.d/" >> ~/.bashrc
  • Zsh:
mkdir ~/.zsh.d

curl > ~/.zsh.d/_cht

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

Open a new shell / terminal and it will load to finish.