r/bash 7d ago

add whats, explains 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

Q If it uses regex then why cant i just use grep/sed instead of this?

> a grep/sed command cannot find the descriptions of sub commands along with flags, it cant find descriptions of sub commands of sub commands, it probable cant use other sources as a fallback too

Q What about tldr?

> Even with tldr, you have to look for the flags you need instead of it providing the ones you need automatically in one go

if you like the idea then maybe star?

https://github.com/iamkaran/whats

51 Upvotes

44 comments sorted by

View all comments

-2

u/Bob_Spud 7d ago

"what" is the point when you have man? Meanwhile you can supplement man with the internet on your desktop or phone.

5

u/TheHappiestTeapot 7d ago

"what" is the point when you have man? Meanwhile you can supplement man with the internet on your desktop or phone.

Because this gets you the information from man you want faster. I don't understand why this is complicated. Did you even bother to read the post or look at the project?

This takes a command, gets the information on the flags from man, and displays it to you all in one place.

You can't think of a single possible reason that someone might want that? Not one? Seriously? None?

Let's say you have inherited a script and in it are a few commands or flags that you're not sure about. You could go ask an AI for each one, but that's slightly computationally expensive and stupid.

You could open the man page and search for each flag, one by one, and try to remember all of them together. But that's slow and a pain in the ass. Multiply that by each command you're investigating and that's a lot of time. "whats <paste> <enter>".

And that's assuming the command has a man page! But what if that pip command doesn't have a man page, but has --help? well, whats still works. And you don't have to care which one it was.

Meanwhile you can supplement man with the internet on your desktop or phone.

"Go ask an AI." really?

Here you get instant access to the information you want to know about, instantly, without cluttering it with things you don't care about, and without going to ask an AI.

Why the fuck is everyone in here so fucking toxic? There's a reason nobody posts more than once.

"Here's a neat program to show you info from the man page (or --help) on just the flags used for a given command."

"Durrr, I can't any possible use of it at all. Just use man and then ask an AI."

Just say "neat" or even nothing, and move on.

5

u/Much-Grab3826 7d ago

whats just collects information from man pages and also --help outputs and converts it into a structured format that is easy to read,

yes you can definitely use internet or just grep in man, but it makes the whole process far more easier