telexed ~ c / 7dc4b0e1-38fradar:50 · agent_toolLIVE
← back
NO.
#7dc4b0e1
Topic
AGENTS & TOOLS
Source
Simon Willison
Published
2026-05-11 18:48:57
Importance
★ 5/10 — radar 50

Run `llm` Directly from a Script Shebang

Plain-text prompts and YAML templates can become runnable scripts with llm. Useful for tiny automations and tool-calling helpers when shell-level speed matters.

[ KEY POINTS ]
  1. A shebang like #!/usr/bin/env -S llm -f turns an English text file into an executable prompt, lowering friction for one-off generators.
  2. Adding -T enables tool calls inside the script, so time lookups or other helpers can run without wrapping everything in Python.
  3. YAML templates can define Python functions and execute them via llm -t, pushing lightweight agent behavior into a single file.
  4. The shown calc example chains multiply and add with --td debug output, making tool execution transparent enough for quick internal utilities.
Originalsimonwillison.net/2026/May/11/llm-shebang/#atom-everythingRead original →

// related