
cheat.sh
Command-line cheat sheets for Unix commands and programming languages, fetched with curl.
- Stars
- 41.8k
- Forks
- 1.9k
- Licence
- MIT
- Language
- Python
- Last update
- 2 months ago
- Type
- CLI
What it is
cheat.sh is a web service that returns short cheat sheets for Unix/Linux commands and programming languages. You query it from a terminal with curl, a browser, or a small client called cht.sh, and it returns examples for the command or task you ask about. The README says it draws on community-maintained cheat sheet repositories and, for many programming questions, answers from StackOverflow.
- Look up common tar, rsync, or tr usage with curl cheat.sh/tar
- Search for a command by keyword with the ~KEYWORD notation, such as curl cht.sh/~snapshot
- Get a language-specific example, such as curl cht.sh/python/random+list+elements
- Use the cht.sh client in a shell mode to keep queries in one language context
Great for
- Developers who look up command flags and syntax often from the terminal
- Students who want quick examples while learning a language
- People who prefer not to leave the terminal or editor to search the web
- Anyone who wants to run the service offline or self-host it, as the README describes Docker and offline options
Not ideal for
- Readers who need authoritative, fully verified answers, since the README notes generated answers are not guaranteed to be exact
- Users who need deep tutorials or long-form documentation
- People who cannot use a terminal or install a small client, though the browser interface is also described
How to get it
- 1
Install with a package manager
You'll need: curl · rlwrap (only needed for cht.sh shell mode)
Install the cht.sh client to your user bin directory
PATH_DIR="$HOME/bin" # or another directory on your $PATH mkdir -p "$PATH_DIR" curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh" chmod +x "$PATH_DIR/cht.sh"Install rlwrap for shell mode (Debian/Ubuntu)
sudo apt install rlwrap - 2
Run it
- Run curl cheat.sh/tar to see a cheat sheet for tar
- Try a language query such as curl cht.sh/go/reverse+a+list
- Search by keyword with curl cht.sh/~snapshot
- Optionally run cht.sh --shell for an interactive session
- 3
Get the most out of it
- Use the /1, /2 suffixes to see alternative answers to the same query
- Add ?Q to remove comments or ?T to turn off syntax highlighting
- Use the :learn page on a language for a basic introduction
- Enable tab completion for bash or zsh as described in the README
- Use the +- syntax to exclude a word from results, for example python/multiply+matrices+-numpy
Downloads
Strengths
- Works with plain curl, so there is nothing to install to try it
- Covers many languages and a large set of Unix/Linux commands, according to the README
- Output can be trimmed with options like ?Q to remove comments
Trade-offs
- Answers for programming questions are generated on the fly and may not match exactly, as the README acknowledges
- Shell mode of the cht.sh client requires rlwrap to be installed separately
- The README is truncated, so some details about editor integrations and self-hosting were not reviewed
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| cheat.sh (this) | 41.8k | CLI | beginner | 2 months ago | Developers who look up command flags and syntax often from the terminal |
| cheat | 13.5k | CLI | beginner | 6 months ago | Sysadmins who use many commands only occasionally |
| fastfetch | 25.2k | CLI | beginner | 4 days ago | Linux users who want a fast, maintained alternative to neofetch |
| vhs | 21.2k | CLI | beginner | 4 days ago | Developers who want a repeatable terminal demo for a README or docs |
| terminal | 105k | App | beginner | 6 days ago | Windows users who work in the command line every day and want tabs and rich text |
| micro | 29.8k | App | beginner | 4 days ago | People who work mostly in a terminal and want an easy editor |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.