All Projects β†’ cheat β†’ cheat

cheat / cheat

Licence: MIT License
cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to cheat

Tldr
πŸ“š Collaborative cheatsheets for console commands
Stars: ✭ 36,408 (+319.16%)
Mutual labels:  man-page, help, cheatsheets
Csharp8cheatsheet
C# 8 Cheat Sheet, Default Interface Methods, Pattern Matching, Indices and Ranges, Nullable Reference Types, Asynchronous Streams, Caller Expression Attribute ,Static Local Functions, Default in Deconstruction., Alternative Interpolated Verbatim Strings, Using Declarations, Relax Ordering of ref and partial Modifiers, Disposable ref structs, Generic Attributes, Null Coalescing Assignment ,Disposable ref structs
Stars: ✭ 73 (-99.16%)
Mutual labels:  cheat, cheatsheets
Pyspark Cheatsheet
🐍 Quick reference guide to common patterns & functions in PySpark.
Stars: ✭ 108 (-98.76%)
Mutual labels:  cheat, cheatsheets
Cheatsheets
Community-sourced cheatsheets
Stars: ✭ 430 (-95.05%)
Mutual labels:  cheat, cheatsheets
C Sharp Cheatsheet
C# Cheatsheet
Stars: ✭ 111 (-98.72%)
Mutual labels:  cheat, cheatsheets
tldr
Simplified and community-driven man pages (tldr-pages) in a single binary.
Stars: ✭ 33 (-99.62%)
Mutual labels:  man-page, help
react-cheatsheets
Create and generate cheat sheets using React
Stars: ✭ 21 (-99.76%)
Mutual labels:  cheat, cheatsheets
surviv.io-cheat
Cheat for surviv.io game
Stars: ✭ 22 (-99.75%)
Mutual labels:  cheat
VARGEN
Π‘heat for CS:GO. Based on Osiris - https://github.com/danielkrupinski/Osiris
Stars: ✭ 12 (-99.86%)
Mutual labels:  cheat
help
Need help with libuv? Post your question here.
Stars: ✭ 24 (-99.72%)
Mutual labels:  help
command help
ℹ️ Extract help text from builtin commands and man pages
Stars: ✭ 54 (-99.38%)
Mutual labels:  help
otc
Onetap Crack Loader - Official ReHost
Stars: ✭ 46 (-99.47%)
Mutual labels:  cheat
Awesome-Math-Learning
πŸ“œ Collection of the most awesome Math learning resources in the form of notes, videos and cheatsheets.
Stars: ✭ 73 (-99.16%)
Mutual labels:  cheatsheets
texdoc
Find and view documentation in TeX Live
Stars: ✭ 31 (-99.64%)
Mutual labels:  help
Overwatcheat
Free, open-source undetected color cheat!
Stars: ✭ 180 (-97.93%)
Mutual labels:  cheat
Diamond
External glow ESP for CS:GO
Stars: ✭ 57 (-99.34%)
Mutual labels:  cheat
nzPerspective
ι€†ζˆ˜d3d透视
Stars: ✭ 28 (-99.68%)
Mutual labels:  cheat
ScreenAccess
Anti Recoil system with weapon type built-in recognition based on OCR, currently support next games: Apex Legends
Stars: ✭ 41 (-99.53%)
Mutual labels:  cheat
cheatsheet
πŸ“ A Repository for developers for different kinds of Programming Cheatsheets
Stars: ✭ 217 (-97.5%)
Mutual labels:  cheatsheets
PS4-NetCheatAPI
Netcheat API for PS4 4.05
Stars: ✭ 26 (-99.7%)
Mutual labels:  cheat

Workflow status

cheat

cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.

The obligatory xkcd

Use cheat with cheatsheets.

Example

The next time you're forced to disarm a nuclear weapon without consulting Google, you may run:

cheat tar

You will be presented with a cheatsheet resembling the following:

# To extract an uncompressed archive:
tar -xvf '/path/to/foo.tar'

# To extract a .gz archive:
tar -xzvf '/path/to/foo.tgz'

# To create a .gz archive:
tar -czvf '/path/to/foo.tgz' '/path/to/foo/'

# To extract a .bz2 archive:
tar -xjvf '/path/to/foo.tgz'

# To create a .bz2 archive:
tar -cjvf '/path/to/foo.tgz' '/path/to/foo/'

Installing

cheat has no dependencies. To install it, download the executable from the releases page and place it on your PATH.

Alternatively, if you have go installed, you may install cheat using go get:

go get -u github.com/cheat/cheat/cmd/cheat

Configuring

conf.yml

cheat is configured by a YAML file that will be auto-generated on first run.

By default, the config file is assumed to exist on an XDG-compliant configuration path like ~/.config/cheat/conf.yml. If you would like to store it elsewhere, you may export a CHEAT_CONFIG_PATH environment variable that specifies its path:

export CHEAT_CONFIG_PATH="~/.dotfiles/cheat/conf.yml"

Cheatsheets

Cheatsheets are plain-text files with no file extension, and are named according to the command used to view them:

cheat tar     # file is named "tar"
cheat foo/bar # file is named "bar", in a "foo" subdirectory

Cheatsheet text may optionally be preceeded by a YAML frontmatter header that assigns tags and specifies syntax:

---
syntax: javascript
tags: [ array, map ]
---
// To map over an array:
const squares = [1, 2, 3, 4].map(x => x * x);

The cheat executable includes no cheatsheets, but community-sourced cheatsheets are available. You will be asked if you would like to install the community-sourced cheatsheets the first time you run cheat.

Script

You can manage the cheatsheets via a script cheatsheets.

Download and install

mkdir -p ~/.local/bin
wget -O ~/.local/bin/cheatsheets https://raw.githubusercontent.com/cheat/cheat/master/scripts/git/cheatsheets
chmod +x ~/.local/bin/cheatsheets

Pull changes

To pull the community and personal cheatsheets call cheatsheets pull

Push changes

To push your personal cheatsheets call cheatsheets push

Cheatpaths

Cheatsheets are stored on "cheatpaths", which are directories that contain cheatsheets. Cheatpaths are specified in the conf.yml file.

It can be useful to configure cheat against multiple cheatpaths. A common pattern is to store cheatsheets from multiple repositories on individual cheatpaths:

# conf.yml:
# ...
cheatpaths:
  - name: community                   # a name for the cheatpath
    path: ~/documents/cheat/community # the path's location on the filesystem
    tags: [ community ]               # these tags will be applied to all sheets on the path
    readonly: true                    # if true, `cheat` will not create new cheatsheets here

  - name: personal
    path: ~/documents/cheat/personal  # this is a separate directory and repository than above
    tags: [ personal ]
    readonly: false                   # new sheets may be written here
# ...

The readonly option instructs cheat not to edit (or create) any cheatsheets on the path. This is useful to prevent merge-conflicts from arising on upstream cheatsheet repositories.

If a user attempts to edit a cheatsheet on a read-only cheatpath, cheat will transparently copy that sheet to a writeable directory before opening it for editing.

Directory-scoped Cheatpaths

At times, it can be useful to closely associate cheatsheets with a directory on your filesystem. cheat facilitates this by searching for a .cheat folder in the current working directory. If found, the .cheat directory will (temporarily) be added to the cheatpaths.

Usage

To view a cheatsheet:

cheat tar      # a "top-level" cheatsheet
cheat foo/bar  # a "nested" cheatsheet

To edit a cheatsheet:

cheat -e tar     # opens the "tar" cheatsheet for editing, or creates it if it does not exist
cheat -e foo/bar # nested cheatsheets are accessed like this

To view the configured cheatpaths:

cheat -d

To list all available cheatsheets:

cheat -l

To list all cheatsheets that are tagged with "networking":

cheat -l -t networking

To list all cheatsheets on the "personal" path:

cheat -l -p personal

To search for the phrase "ssh" among cheatsheets:

cheat -s ssh

To search (by regex) for cheatsheets that contain an IP address:

cheat -r -s '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'

Flags may be combined in intuitive ways. Example: to search sheets on the "personal" cheatpath that are tagged with "networking" and match a regex:

cheat -p personal -t networking --regex -s '(?:[0-9]{1,3}\.){3}[0-9]{1,3}'

Advanced Usage

Shell autocompletion is currently available for bash, fish, and zsh. Copy the relevant completion script into the appropriate directory on your filesystem to enable autocompletion. (This directory will vary depending on operating system and shell specifics.)

Additionally, cheat supports enhanced autocompletion via integration with fzf. To enable fzf integration:

  1. Ensure that fzf is available on your $PATH
  2. Set an envvar: export CHEAT_USE_FZF=true
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].