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
- Gemini 2.0 Flash: An outstanding multi-modal LLM with a sci-fi streaming mode - 11th December 2024
- ChatGPT Canvas can make API requests now, but it's complicated - 10th December 2024
- I can now run a GPT-4 class model on my laptop - 9th December 2024