Master cheat.sh: Your Ultimate Command‑Line Cheat Sheet for 58 Languages
This article introduces cheat.sh, a lightweight command‑line cheat sheet that covers over 58 programming languages, numerous DBMS, and more than a thousand Unix/Linux commands, and explains how to query it with curl, use its CLI client, shell and stealth modes, and integrate it with popular editors.
cheat.sh Introduction
cheat.sh is a lightweight command‑line cheat sheet that provides quick access to documentation for 58 programming languages, many DBMS, and over 1000 common Unix/Linux commands.
Basic usage
Query the service with curl cht.sh. For example: curl cht.sh/tar The response is concise, syntax‑highlighted, and easy to read. curl cht.sh/tr You can also search by keyword using the ~Keyword syntax, e.g.: curl cht.sh/~snapshot To hide comments in the output, append ?Q to the query:
curl cht.sh/java/lambda+group?QCLI client
Install the command‑line client with the following commands:
# Ensure ~/bin is in your PATH
mkdir -p ~/bin/
curl https://cht.sh/:cht.sh > ~/bin/cht.sh
chmod +x ~/bin/cht.shFor shell mode support, install rlwrap (e.g., brew install rlwrap or sudo apt install rlwrap).
Using the client
Run queries directly: cht.sh --shell Enter a language directory for faster searches, e.g. cht.sh --shell java. The client also offers a stealth mode that hides the query window; activate it with stealth Q.
Editor integration
cheat.sh integrates with many editors such as Emacs, Vim, Sublime, VSCode, IntelliJ IDEA, and QtCreator. Vim has the most complete integration, while VSCode and IDEA can use dedicated plugins ( vscode‑snippet and idea‑cheatsh‑plugin respectively).
Running your own server
To host a private instance, edit ~/.cht.sh/cht.sh.conf and set CHTSH_URL to your server URL, then start the service:
git clone https://github.com/chubin/cheat.sh.git
cd cheat.sh
docker-compose upAccess the server at http://localhost:8002.
Conclusion
cheat.sh offers a fast, portable way to look up language syntax, command options, and code snippets without leaving the terminal, and its extensible client and editor plugins make it a valuable tool for everyday programming.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
