There’s a particular kind of friction in forgetting tar flags for the hundredth time. You know what you want — extract this, compress that — but the exact combination of -xzvf versus -czvf slips away every single time. The usual move is to open a browser, search, click through to Stack Overflow, scroll past the question, find the accepted answer, copy the command. Thirty seconds, maybe a minute, repeated for the rest of your working life.
cheat.sh, built by Igor Chubin, collapses that entire loop into one line typed directly into the terminal you’re already in.
The Whole Idea
curl cheat.sh/tar
That’s it. Specifying the name of the command in the query against the cheat.sh service returns a cheat sheet right there in your terminal. No browser tab. No context switch. No scrolling past an ad for a coding bootcamp to get to the answer.
The same pattern works for almost anything:
curl cht.sh/rsync
curl cheat.sh/python/list+comprehension
curl cheat.sh/go/reverse+a+string
It Doesn’t Try to Own the Content
What makes cheat.sh interesting as a piece of design is what it deliberately doesn’t do. Rather than creating yet another mediocre cheat sheet repository, the project concentrates on building a unified mechanism to access existing, well-maintained cheat sheet repositories covering programming and operating system usage. It sits on top of TLDR pages, Learn-X-in-Y-Minutes, Stack Overflow answers, and other community-driven sources, alongside its own repository, and presents the most useful answer it can find for your query.
It’s the Unix philosophy applied to documentation: don’t build a new walled garden, build a good interface to the gardens that already exist.
Beyond the Browser, Everywhere
It can be used in a web browser, from the command line using curl, with its own dedicated client for Linux or Windows, and as a plugin for Vim, Emacs, Visual Studio Code, Sublime Text, and IntelliJ IDEA, so you never actually have to leave your editor to look something up. For anyone who treats context-switching as the real enemy of focus, this matters more than it sounds like it should.
There’s also a dedicated command-line client called cht.sh that improves on plain curl queries. It supports a special shell mode with persistent query context and readline support, query history, clipboard integration, and tab completion for bash, fish, and zsh. Installing it is a one-liner:
mkdir -p ~/bin
curl https://cht.sh/:cht.sh > ~/bin/cht.sh
chmod +x ~/bin/cht.sh
Once installed, you can write queries in a more natural way, using spaces instead of plus signs:
cht.sh go reverse a list
cht.sh python random list elements
cht.sh js parse json
Languages, Not Just Commands
cheat.sh isn’t limited to shell utilities. The :learn suffix shows a Learn-X-in-Y-Minutes style cheat sheet, perfect for getting started with a language, while 1line returns a collection of one-liners and weirdness surfaces a collection of examples of unusual or surprising behavior in that language:
curl cheat.sh/python/:learn
curl cheat.sh/js/1line
curl cheat.sh/php/weirdness
That last one is worth trying just for the entertainment value.
Speed and the Stealth Option
For something that’s effectively querying half the useful documentation on the internet, the response time is surprising. It’s described as ultrafast, typically returning answers within 100 milliseconds — fast enough that it genuinely feels faster than recalling the command from memory, in some cases.
There’s also a small, slightly mischievous feature worth knowing about: a stealth mode that allows the tool to be used fully invisibly, without touching a key or making a sound, intended for situations like technical interviews or pair programming sessions where you’d rather not announce that you’re looking something up.
Self-Hosting It
If you want cheat.sh without depending on the public service — for offline use, an air-gapped environment, or just to add your own private cheat sheets — it can be run locally:
git clone https://github.com/chubin/cheat.sh.git
cd cheat.sh
docker compose up
# now available at http://localhost:8002/tar
During the installation process, cheat.sh and its data sources are installed locally, with ~/.cheat.sh used as the default installation directory, and cheat sheets fetched and stored under ~/.cheat.sh/upstream, kept up to date with periodic update commands.
The Same Author Behind wttr.in
If the name of the service rings a bell from somewhere else, it’s likely because Igor Chubin is also the person behind wttr.in — a console-oriented weather forecast service that can be queried from the terminal using nothing but curl or wget. Both tools share the same instinct: take something people normally do through a slow, ad-laden website, and make it instantly available as a single terminal command. It’s a small, specific kind of craft, and Chubin has quietly built several of these utilities that get reached for daily by people who’ve never thought to look up who made them.
Why It’s Worth Keeping Around
There’s a temptation, in an era of AI assistants that can answer almost anything conversationally, to think tools like cheat.sh are a relic of a simpler time. But the appeal was never really about lacking alternatives — it’s about staying in flow. A query that returns in under a second, inside the same terminal window you’re already working in, with no preamble and no need to explain context, is hard to improve on for the narrow, frequent case of “remind me of the flag for this command.”
curl cheat.sh/tar
Some tools earn a permanent place in your shell history simply by getting out of the way faster than anything else can.