InfoNewsLLM-specific
Using LLM in the shebang line of a script
- Published
- Record updated
Summary
Simon Willison shows how to use the llm command-line tool in a script's shebang line, so an English text file can run as an executable. He demonstrates three patterns: loading fragments with -f, enabling tool calls with -T, and running YAML templates that define extra tools as Python functions. He includes a calculator example that uses the --td tools debug option to print each tool call and its result.
Related items
- MediumDocker flaw lets Anthropic, OpenAI, GitHub keys slip past sandboxesSame vendor, CSO Online
- InfoUK’s Hardest AI Hacking Test Doesn’t Survive Its First RoundSame vendor, SecurityWeek
- Info‘A line in the sand’: how Andy Burnham woke up to AI risksSame vendor, The Guardian Technology
- InfoPreventing AI research sabotage will be very hardSame vendor, Redwood Research Blog
- InfoOpenAI and Anthropic AI agents cheat far less than rivals, new tests findSame vendor, TechCrunch (Security)