Skip to content

Recipes

heyllm shines when you stop typing prompts by hand and start piping context into it. The pattern is almost always the same:

Terminal window
<something that writes to stdout> | heyllm "<instruction>"

Here’s a handful that earn their place in your shell history.

Write a commit message from staged changes

Section titled “Write a commit message from staged changes”
Terminal window
git diff --staged | heyllm "write a conventional commit message"

Pipe it straight into the editor by capturing the output:

Terminal window
git commit -m "$(git diff --staged | heyllm --no-stream 'one-line conventional commit message, no backticks')"

--no-stream here gives you the complete message in one shot, which is what you want when substituting into another command.

Terminal window
heyllm "explain this command step by step: $(history | tail -1 | sed 's/^ *[0-9]* *//')"

Or just paste it in:

Terminal window
heyllm "explain: tar -xzvf archive.tar.gz -C /opt"
Terminal window
cat README.md | heyllm "summarize this in 3 bullets"

Works for logs, configs, transcripts — anything text:

Terminal window
cat meeting-notes.txt | heyllm "extract the action items as a checklist"
Terminal window
tail -n 200 error.log | heyllm "what's the root cause here, and the likely fix?"
Terminal window
git diff main... | heyllm --system "You are a terse senior reviewer" \
"review this diff: call out bugs and risky changes, skip nitpicks"
Terminal window
heyllm "give me a regex for an RFC-5322-ish email, and explain each part"
Terminal window
echo "Please find attached the requested documents." | heyllm "make this warmer and less formal"
pbpaste | heyllm "translate to French" # macOS clipboard
Terminal window
curl -s https://example.com/post | heyllm "summarize this article in 5 bullets"
Terminal window
cat package.json | heyllm "list the runtime dependencies and what each is for"
Terminal window
heyllm --json "ping" | jq '.usage'

A few habits that make these smoother:

  • Use --no-stream whenever you’re capturing output into $(...) or a variable — you want the whole answer, not a progressive stream.
  • Add --system "You are terse" (or similar) to keep answers short and pipe-friendly.
  • Switch models per task with -m — a small model like the default gpt-4o-mini is plenty for commit messages and summaries.

See the CLI reference for every flag, and Configuration for pointing heyllm at other providers.