# cheat

> CLI tool for creating and viewing interactive command-line cheatsheets with tagging and search capabilities

Stars: 13.5k · Language: Go · License: MIT · Categories: Productivity

- Repository: https://github.com/cheat/cheat
- Page: https://www.trmn.sh/tools/cheat

## Overview

cheat is a command-line utility that allows users to create, view, and manage interactive cheatsheets for frequently-used commands. It addresses the common problem of remembering command syntax and options for tools that are used regularly but not often enough to memorize. Users can view existing cheatsheets with `cheat tar`, edit them with `cheat -e tar`, and search across all sheets using text or regex patterns.

The tool supports organizing cheatsheets across multiple "cheatpaths" - directories that can be configured as read-only (for community sheets) or writable (for personal notes). Cheatsheets are plain text files that can include YAML frontmatter for syntax highlighting via Chroma and tag-based categorization. Users can search by tags (`cheat -l -t networking`), filter by path, and combine multiple search criteria.

cheat includes directory-scoped functionality that automatically discovers `.cheat` directories in the current working directory or its ancestors, similar to git's behavior. This allows project-specific cheatsheets to be available from any subdirectory within a project. The tool also generates shell completions for bash, zsh, fish, and PowerShell, with dynamic completion of cheatsheet names, tags, and cheatpath names.

![XKCD comic about tar command complexity](https://media.trmn.sh/cached/7b54b57c4a73ead1e4676f8db61962570d15b3f6e516754306decdfc8a7926f3.png)

## Alternatives

- [Slides](https://www.trmn.sh/tools/slides.md): Terminal presentation tool that renders markdown files as slides, with in-slide code execution, pre-processing, live reload, and SSH serving. (Go, 11.7k stars)
- [WTF](https://www.trmn.sh/tools/wtf.md): Terminal dashboard (wtfutil) that shows data from services like GitHub, Google Calendar, Trello and OpsGenie in configurable modules. (Go, 17.1k stars)
- [gopass](https://www.trmn.sh/tools/gopass.md): Command-line password manager compatible with pass, supporting GPG encryption, Git versioning, and team collaboration (Go, 7.3k stars)
- [Ticker](https://www.trmn.sh/tools/ticker.md): Terminal stock, crypto, and derivatives price watcher with position tracking, cost basis lots, currency conversion, and grouped watchlists. (Go, 6.3k stars)
- [Pop](https://www.trmn.sh/tools/pop.md): Send emails from the terminal via a TUI or CLI flags, using Resend or SMTP, with Markdown bodies, attachments, and AI agent skill support. (Go, 2.9k stars)

## Guides

- [tldr Alternatives](https://www.trmn.sh/alternatives/tldr): tldr alternatives: cheat for editable cheatsheets, navi for runnable fuzzy-searched snippets, eg for paged example files.
- [tldr vs cheat](https://www.trmn.sh/compare/tldr-vs-cheat): tldr vs cheat: community-maintained tldr pages with Python, Rust and Node.js clients, or cheat's editable local cheatsheets written in Go.

---

Canonical: https://www.trmn.sh/tools/cheat
