Introduction
cheat.sh aggregates cheat sheets from dozens of community sources into a single, curl-accessible interface. It provides concise, practical examples for programming languages, CLI tools, and UNIX commands without leaving the terminal.
What cheat.sh Does
- Serves cheat sheets for 58 programming languages and over 1000 UNIX commands
- Aggregates content from tldr-pages, Stack Overflow, Learn X in Y Minutes, and custom sheets
- Supports language-specific queries with topic paths like
python/decorator - Provides a special
:learnpage for quick language primers - Offers syntax-highlighted output and stealth mode for clean text
Architecture Overview
cheat.sh is a Python-based web service backed by Redis for caching. It indexes multiple upstream cheat sheet repositories and Stack Overflow answers into a unified query interface. The server responds to simple HTTP GET requests, making curl the primary client, though editor plugins for Vim, Emacs, VS Code, and Sublime are also available.
Self-Hosting & Configuration
- Clone the repo and install dependencies with
pip install -r requirements.txt - Start the server with
python bin/srv.pyon port 8002 by default - Set
CHEATSH_CACHEenvironment variable to configure Redis-backed caching - Configure upstream cheat sheet sources in
lib/adapter/modules - Deploy behind Nginx or Caddy for TLS and domain routing
Key Features
- Zero-install client: works with plain curl or wget
- Unified search across multiple cheat sheet databases
- Syntax highlighting with automatic language detection
- Editor integration for Vim, Emacs, VS Code, and IntelliJ
- Self-hostable for air-gapped or private environments
Comparison with Similar Tools
- tldr-pages — community man-page summaries; cheat.sh aggregates tldr plus many other sources
- DevHints — web-based cheat sheets; cheat.sh is terminal-first and curl-friendly
- Navi — interactive CLI cheat sheet tool; cheat.sh is a server-side aggregation service
- eg — example-focused man pages; cheat.sh covers broader language and tool scope
FAQ
Q: Does cheat.sh require authentication? A: No. The public instance at cheat.sh is free and requires no API key or login.
Q: Can I add my own cheat sheets?
A: Yes. Place custom sheets in the cheat.sheets/ directory or submit a pull request to the community repository.
Q: Does it work offline? A: Self-hosting with a local Redis cache enables fully offline usage after initial indexing.
Q: Which editors are supported? A: Official plugins exist for Vim, Emacs, VS Code, Sublime Text, and IntelliJ IDEA.