q What do I title this article? (via) Christoffer Stjernlöf built this delightfully simple shell script on top of LLM. Save the following as q
somewhere in your path and run chmod 755
on it:
#!/bin/sh
llm -s "Answer in as few words as possible. Use a brief style with short replies." -m claude-3.5-sonnet "$*"
The "$*"
piece is the real magic here - it concatenates together all of the positional arguments passed to the script, which means you can run the command like this:
q How do I run Docker with a different entrypoint to that in the container
And get an answer back straight away in your terminal. Piping works too:
cat LICENSE | q What license is this
Recent articles
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024
- Visualizing local election results with Datasette, Observable and MapLibre GL - 9th November 2024
- Project: VERDAD - tracking misinformation in radio broadcasts using Gemini 1.5 - 7th November 2024