Great alternatives to man pages everyone needs

man (manual documentation pages) cannot be replaced; however, there are modern CLI tools that provide simplified experiences.

tldr pages

tldr is a community-curated collection of simplified man pages. As the name (too long; didn’t read) implies, the focus is providing straightforward examples that demonstrate tool usage.

Installing tldr

On MacOS,

1
brew install tldr

Using the NodeJS client,

1
npm -g tldr

Using the Python client,

1
pip3 install tldr

Using `tldr

Using tldr is straightforward:

1
tldr <some command name>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
$ tldr tldr

tldr

Display simple help pages for command-line tools from the tldr-pages project.
More information: <https://tldr.sh>.

- Print the tldr page for a specific command (hint: this is how you got here!):
    tldr command

- Print the tldr page for a specific subcommand:
    tldr command-subcommand

- Print the tldr page for a command for a specific [p]latform:
    tldr -p android|linux|osx|sunos|windows command

- [u]pdate the local cache of tldr pages:
    tldr -u

cheat

cheat is a tool used exclusively for supplying command usage. The intention is to provide a “cheatsheet” for *nix system administrators to quickly view command usage and contribute their own.

Installing cheat

On MacOS,

1
brew install cheat

Using GO,

1
go install github.com/cheat/cheat/cmd/cheat@latest

To find more installation examples, visit the document here.

Using cheat

Using cheat is simple:

1
cheat <some command name>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$ cheat jq
# To pretty print the json:
jq "." < filename.json

# To access the value at key "foo":
jq '.foo'

# To access first list item:
jq '.[0]'

# to slice and dice:
jq '.[2:4]'
jq '.[:3]'
jq '.[-2:]'

# to extract all keys from json:
jq keys

# to sort by a key:
jq '.foo | sort_by(.bar)'

# to count elements:
jq '.foo | length'

# print only selected fields:
jq '.foo[] | {field_1,field_2}'

# print selected fields as text instead of json:
jq '.foo[] | {field_1,field_2} | join(" ")'

# only print records where given field matches a value
jq '.foo[] | select(.field_1 == "value_1")'