logoalt Hacker News

aquafoxtoday at 6:15 AM3 repliesview on HN

> I'll basically do

    $ man tool | <how do I do this with the tool>
or even $ cat source | <find the flags and give me some documentation on how to use this>

Could you please elaborate on this? Do I get this right that you can set up your your command line so that you can pipe something to a command that sends this something together with a question to an LLM? Or did you just mean that metaphorically? Sorry if this is a stupid question.


Replies

mr_mitmtoday at 10:27 AM

Yes, I use simonw's `llm` for that: https://github.com/simonw/llm

Example:

    $ man tar | llm "how do I extract test.txt from a tar.gz"
scottyeagertoday at 7:41 AM

I'm not the OP, but I did build a tool that I use in the same way: https://github.com/scottyeager/Pal

Actually for many cases the LLM already knows enough. For more obscure cases, piping in a --help output is also sometimes enough.

__mtoday at 7:23 AM

i guess op means: $ man tool | ai <how do I do this with the tool>

where ai could be a simple shell script combining the argument with stdin