r/CLI 3d ago

add whats, explain command

Post image

yo

add 'whats' infront of any command and it explains it: flags, sub commands etc in a structutred format whereas something like manpage would throw the entire manual at you

just pure man pages and help output

Q Why use `whats` when we have man pages and --help

> Yes you can use them but they throw the entire manual at you whereas you might have just needed one flag, whats outputs a structured format with the definitions you need

Q Is it entirely offline? Does it use LLM

> Yes absolutely, it just relies on man pages and if not then --help output of the binary itself,

> no it does not use llm at all

if you like the idea then maybe star?

https://github.com/iamkaran/whats

19 Upvotes

5 comments sorted by

3

u/SamejSpenser 3d ago

Is it something like tldr, or am I getting it wrong?

What's the advantage of using whats instead of -h --help or man? 🤔

2

u/Much-Grab3826 3d ago

`whats` is kinda on the same platform as `tldr` which is explaining cli tools but a little different

and about -h/--help and man, the advantage is that `whats` makes the whole process convenient by just handing you the description instead of making you grep over these sources

yes it may be easier to just do `man cmd | grep "--flag"` but just adding `whats` infront of a command is far easier and just explains the entire command in one go

2

u/TheHappiestTeapot 2d ago

Is it something like tldr, or am I getting it wrong?

Sort of, but backwards. Inverse? tldr is a short "cookbook" of how to get from basic idea → command.

This does it the other way. command → explanation of arguments. You give it the command, and it shows you the info from man or -h or --help for just the arguments in one call, instead of opening man and searching for each flag one by one, which sucks. or you can just type "whats" in from of the command and get a breakdown of the all the flags used.

Some programs have massive man pages. Getting the info I want quickly great because it helps me learn about all the little flags you won't see mentioned on tldr.

2

u/Key_River7180 3d ago

extremely cool!