You can install it like this:
pipx install llm
Then set an API key: llm keys set openai
Then run a prompt through GPT-4 Turbo like this: llm -m gpt-4-turbo "Ten great names for a pet walrus"
# Or a shortcut:
llm -m 4t "Ten great names for a pet walrus"
Here's a one-liner that summarizes all of the comments in this Hacker News conversation (taking advantage of the new long context length): curl -s "https://hn.algolia.com/api/v1/items/38166420" | \
jq -r 'recurse(.children[]) | .author + ": " + .text' | \
llm -m gpt-4-turbo 'Summarize the themes of the opinions expressed here,
including direct quotes in quote markers (with author attribution) for each theme.
Fix HTML entities. Output markdown. Go long.'
Example output here: https://gist.github.com/simonw/d50c8634320d339bd88f0ef17dea0...