CHEAT(1)
okay so bestie, this is CHEAT(1) from the General Commands Manual β your command-line cheatsheet era starts now π β¨
πΈ NAME πΈ
cheat β create and view command-line cheatsheets
β¨ SYNOPSIS β¨
cheat [options] [CHEATSHEET]
π DESCRIPTION π
okay so cheat lets you create and view interactive cheatsheets right on the command-line. It was literally designed to help remind *nix system administrators about options for commands they use frequently, but not frequently enough to actually remember β weβve all been there π.
π OPTIONS π
βinitβ prints a config file to stdout.-c,βcolorizeβ colorizes the output. make it cute β¨-d,βdirectoriesβ lists cheatsheet directories.-e,βedit=CHEATSHEETβ opens CHEATSHEET for editing.-l,βlistβ lists available cheatsheets.-p,βpath=PATHβ filters so you only see sheets found on PATH.-r,βregexβ treats search PHRASE as a regular expression.-s,βsearch=PHRASEβ searches cheatsheets for PHRASE.-t,βtag=TAGβ filters so you only see sheets tagged with TAG.-T,βtagsβ lists all tags in use.-v,βversionβ prints the version number.βrm=CHEATSHEETβ removes (deletes) CHEATSHEET. gone, periodt π
π EXAMPLES π
- To view the
foocheatsheet:
cheat foo
- To edit (or create) the
foocheatsheet:
cheat -e foo
- To edit (or create) the
foo/barcheatsheet on theworkcheatpath:
cheat -p work -e foo/bar
- To view all cheatsheet directories:
cheat -d
- To list all available cheatsheets:
cheat -l
- To list all cheatsheets whose titles match
apt:
cheat -l apt
- To list all tags in use:
cheat -T
- To list available cheatsheets that are tagged as
personal:
cheat -l -t personal
- To search for
sshamong all cheatsheets, and colorize matches:
cheat -c -s ssh
- To search (by regex) for cheatsheets that contain an IP address:
cheat -c -r -s `(?:[0-9]{1,3}.){3}[0-9]{1,3}'
- To remove (delete) the
foo/barcheatsheet:
cheat βrm foo/bar
π FILES π
Configuration
cheat is configured via a YAML file that is conventionally named conf.yaml. cheat will search for conf.yaml in varying locations, depending upon your platform:
π§ Linux, OSX, and other Unixes π
CHEAT_CONFIG_PATHXDG_CONFIG_HOME/cheat/conf.yaml$HOME/.config/cheat/conf.yml$HOME/.cheat/conf.yml
πͺ Windows πͺ
CHEAT_CONFIG_PATHAPPDATA/cheat/conf.ymlPROGRAMDATA/cheat/conf.yml
cheat will search in the order specified above. The first conf.yaml encountered will be respected π
bestie, the search order is sacred β first one wins, no cap.
If cheat cannot locate a config file, it will ask if youβd like to generate one automatically. Alternatively, you may also generate a config file manually by running cheat βinit and saving its output to the appropriate location for your platform.
Cheatpaths
cheat reads its cheatsheets from βcheatpathsβ, which are the directories in which cheatsheets are stored. Cheatpaths may be configured in conf.yaml, and viewed via cheat -d.
For detailed instructions on how to configure cheatpaths, please refer to the comments in conf.yml.
Autocompletion
Autocompletion scripts for bash, zsh, and fish are available for download:
<https://github.com/cheat/cheat/blob/master/scripts/cheat.bash><https://github.com/cheat/cheat/blob/master/scripts/cheat.fish><https://github.com/cheat/cheat/blob/master/scripts/cheat.zsh>
The bash and zsh scripts provide optional integration with fzf, if the latter is available on your PATH.
The installation process will vary per system and shell configuration, and thus will not be discussed here.
π ENVIRONMENT π
CHEAT_CONFIG_PATHβ the path at which the config file is available. IfCHEAT_CONFIG_PATHis set, all other config paths will be ignored.CHEAT_USE_FZFβ if set, autocompletion scripts will attempt to integrate withfzf.
π¦ RETURN VALUES π¦
0β Successful termination1β Application error2β Cheatsheet(s) not found
π BUGS π
See GitHub issues: <https://github.com/cheat/cheat/issues>
π AUTHOR π
Christopher Allen Lane <chris@chris-allen-lane.com>
π₯ SEE ALSO π₯
and thatβs the footer tea, bestie β: CHEAT(1) from the General Commands Manual β no separate version number or date was chilling in the original footer, so this is the sparkly sign-off π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: cheat 4.4.2-bp160.2.1 Β· MIT
- opensuse-leap 16.0: cheat 4.4.2-bp160.2.1 Β· MIT
- opensuse-leap 16.0: cheat 4.4.2-bp160.2.1 Β· MIT
- opensuse-leap 16.0: cheat 4.4.2-bp160.2.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms