Cheat.sh - unified access to community driven cheat sheets

Posted on May 17, 2022 by Adrian Wyssmann ‐ 2 min read

I already talked about some of cool open source tools, which help you to have cheatsheets and manage your kb

What is it?

cheat.sh is a tool, which unifies access to community driven cheatsheets, including some of the ones I mentioned in my post.

It has some nice features:

  • 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.

Installation and Usage

There are two ways to use it, either using curl by querying cheat.sh or cht.sh respectively

The query is composed as follows:

curl <URL>/<PROGRAMMING LANGUAGE>/<QUESTION>

The <QUESTION> is a list of keywords separated with +. In my example above I want to get some info about loops in bash hence the query is

curl cht.sh/bash/loops

Alternatively you can install the cli client, which then allows you to query for cheats:

Installing the client has some advantages, like Tab completion or a Stealth Mode.

Conclusion

As mentioned in my post, each tool has it’s pro and cons, also when it comes to the content of the cheatsheets. Combining these into a single interface, does not require you to choose but you just use everything there is available.