This repository contains personal command-line cheatsheets for cheat. The sheets are intended for macOS and Linux; commands that differ by operating system are labeled explicitly.
With Homebrew on macOS or Linux:
brew install cheatFor other installation methods, see the official cheat installation guide.
First inspect the configured cheatpaths. The configuration file is usually at
~/.config/cheat/conf.yml.
For a first-time installation, create the default configuration:
mkdir -p "$HOME/.config/cheat"
cheat --init > "$HOME/.config/cheat/conf.yml"Do not run that initialization command over an existing configuration. Then inspect the configured paths:
cheat -dThen clone this repository into the personal cheatpath:
mkdir -p "$HOME/.config/cheat/cheatsheets"
git clone https://github.com/sauljabin/cheatsheets.git \
"$HOME/.config/cheat/cheatsheets/personal"
cheat -l -p personalIf your configuration uses a different directory, replace the clone destination
with the path shown by cheat -d.
The alias sheet can generate a file that works with both Bash and Zsh:
cheat alias > "$HOME/.aliases"Add the following line to ~/.zshrc or ~/.bashrc, then restart the shell:
source "$HOME/.aliases"The alias file provides fallbacks where macOS and Linux differ. Some shortcuts
are enabled only when their optional dependency is installed. Common optional
tools include eza, kubecolor, watch, jq, lsof, uuidgen, Docker, and
kubectl.
cheat --updateAlternatively, update only this repository:
git -C "$HOME/.config/cheat/cheatsheets/personal" pull --ff-onlyRegenerate ~/.aliases after updating if you installed the aliases:
cheat alias > "$HOME/.aliases"View a cheatsheet:
cheat gitView a cheatsheet from one cheatpath or all cheatpaths:
cheat -p personal git
cheat -a gitView configured cheatpaths and list available sheets:
cheat -d
cheat -l
cheat -l -p personalFilter by a tag:
cheat -l -t networkingSearch for text in all sheets:
cheat -s sshSearch with a regular expression:
cheat -r -s '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'Flags can be combined. This searches the personal cheatpath for sheets tagged
networking that contain an IP address:
cheat -p personal -t networking -r -s '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'- Generic commands have been checked for macOS and Linux compatibility.
- Platform-specific examples mention macOS or Linux explicitly.
- Angle-bracket values such as
<project>are placeholders and must be replaced; do not type the brackets literally. - Availability still depends on the installed version of each CLI. Use
<command> --helpwhen a local version differs from a sheet. - Commands that remove containers, volumes, credentials, or write directly to disks are destructive. Verify every target before running them.
Cheatsheets are plain-text files that begin with optional YAML front matter. The header can assign tags and specify syntax highlighting.
---
syntax: bash
tags: [vcs, development]
---
# To stage all changes in the current directory:
git add --all
# To commit staged changes:
git commit -m <message>Prefer docopt syntax for placeholders. When that syntax could be confusing,
use obvious example values such as foo.txt or example.com.
Keep examples short, include a # To ...: description, label OS-specific
commands, and avoid embedding real account IDs, project IDs, secrets, or other
personal data.
Cheatsheets are licensed under Creative Commons CC0 1.0. See LICENSE for the full license text.