cheat.sh: The Cheat Sheet You Never Knew You Needed
You’re in the middle of a task, you need to remember how to do something with tar, curl, or git — and instead of opening a browser, Googling, wasting tokens with your AI agent, and losing your train of thought — you just type this:
curl cheat.sh/tarDone. Straight to your terminal. No ads, no distractions.
That’s cheat.sh in a nutshell.
What Is cheat.sh?
cheat.sh is a community-driven cheat sheet service you query directly from your terminal (or browser). It aggregates content from StackOverflow, man pages, and official documentation — and serves it in a clean, readable format.
It covers:
- Shell commands (
tar,curl,ssh,rsync, …) - Programming languages (
python,go,rust,bash, …) - Tools and frameworks (
git,docker,kubectl, …)
It’s fast, free, and open source.
Getting Started
No installation needed. Just use curl:
curl cheat.sh/gitOr query something specific:
curl cheat.sh/git+stashWant answers for a programming language?
curl cheat.sh/python/list+comprehension
curl cheat.sh/go/goroutines
curl cheat.sh/rust/optionIt works great for infrastructure tools too:
curl cheat.sh/terraformOr ask something more specific:
curl cheat.sh/terraform+import
curl cheat.sh/terraform+state+mvInstall the Client (Optional but Recommended)
For a nicer experience with syntax highlighting and shell integration, install the cht.sh client:
curl -s https://cht.sh/:cht.sh | sudo tee /usr/local/bin/cht.sh && sudo chmod +x /usr/local/bin/cht.shThen use it like this:
cht.sh tar extract
cht.sh docker run
cht.sh fish functionsYou get colored output and it’s quicker to type.
Shell Integration (the Good Stuff)
The best part is the shell integration. Add this to your ~/.bashrc or ~/.config/fish/config.fish:
Bash / Zsh:
cht() {
curl -s "cheat.sh/$1" | less -R
}Fish:
function cht
curl -s "cheat.sh/$argv" | less -R
end
funcsave chtNow you just type:
cht ssh+port+forwarding
cht python+dict+mergeTip: Use
+instead of spaces in your queries.
A Real-World Workflow
Here’s how I use it day-to-day:
- Forget how
rsyncflags work →cht rsync - Need a quick Python snippet →
cht python/read+file - Can’t remember
ffmpegsyntax →cht ffmpeg+convert - Git question mid-PR review →
cht git+cherry-pick - Terraform syntax while writing a module →
cht terraform+import
It keeps me in the terminal and in flow. That’s the real win.
Is It Safe?
Yes — to read from. A few things worth knowing:
- It’s open source on GitHub with ~40k stars
- Uses HTTPS
- Content is pulled from trusted sources (StackOverflow, man pages, official docs)
The one rule: never pipe its output directly to bash. Reading cheat sheets is safe. Blindly executing remote code is not — regardless of the source.
# Safe
curl cheat.sh/rm
# Don't do this
curl cheat.sh/rm | bashKey Takeaways
- Query cheat sheets directly from your terminal with
curl cheat.sh/<topic> - Covers shell commands, programming languages, and popular tools
- Install the
cht.shclient for a better experience - Add a shell function for a fast, ergonomic workflow
- Read from it freely — just don’t pipe to shell
cheat.sh is one of those tools that quietly makes you more productive every single day. Give it a week and you’ll wonder how you lived without it.
Finally, be sure to check out my buddy Mattias and his blog if your into Terraform or Cloud Engineering! He ain’t no cheater!
Happy hacking!