I have been an LLM skeptic for a long time, but the llm CLI and your review of Claude 3 Opus (and subsequently discovering how comparatively cheap 3.5 Sonnet is) has started to turn LLMs into something I use daily.
Exactly that piping comes into handy all the time. I use it to estimate reading time of things on the web, through
curl <url> | llm -m claude-3.5-sonnet -s 'How long does the main content of this article take to read? First count words, then convert using a slow and fast common reading speed.'
It gets the word count wrong a little too often for my taste, but it's usually within the right order of magnitude which is good enough for me.
One of my most used shell scripts recently is one I named just `q` which contains
#!/bin/sh
llm -s "Answer in as few words as possible. Use a brief style with short replies." -m claude-3.5-sonnet "$*"
This lets me write stupid questions in whatever terminal I'm in and not be judged for it, like
[kqr@free-t590 tagnostic]$ q How do I run Docker with a different entrypoint to that in the container?
What's nice about it is that it stays in context. It's also possible to ask longer questions with heredocs, like
[kqr@free-t590 tagnostic]$ q <<'EOF'
> I have the following Perl code
>
> @content[sort { $dists[$a] <=> $dists[$b] } 0..$#content];
>
> What does it do?
> EOF
I have meant to write about this ever since I started a few weeks ago but I would like my thoughts to mature a bit first...
Exactly that piping comes into handy all the time. I use it to estimate reading time of things on the web, through
It gets the word count wrong a little too often for my taste, but it's usually within the right order of magnitude which is good enough for me.One of my most used shell scripts recently is one I named just `q` which contains
This lets me write stupid questions in whatever terminal I'm in and not be judged for it, like What's nice about it is that it stays in context. It's also possible to ask longer questions with heredocs, like I have meant to write about this ever since I started a few weeks ago but I would like my thoughts to mature a bit first...