Executors
How to write task bodies in shell, Python, Node, or an AI agent. Part of the guides; full syntax in the language guide.
Concept
Section titled “Concept”A task body runs under an executor named in parentheses after the signature. The default
is sh — a pure-Go, cross-platform shell (mvdan.cc/sh) that behaves the same on Linux,
macOS, and Windows without invoking the system shell. Other executors (python, node,
custom) shell out to the real interpreter via a temp file; agent drives an installed
AI-agent CLI.
Syntax
Section titled “Syntax”# default (sh) — no parentheses neededhello: echo "hi"
# Python (needs python3 installed)analyze (python): print("analyzing")
# Node (needs node installed)bundle (node): console.log("bundling")
# Agent — a natural-language instruction (see the MCP guide)summarize (agent): Summarize the latest git changes.Runnable example
Section titled “Runnable example”See examples/polyglot (shell + Python + Node in one pipeline), plus node-project and python-project.
Pitfalls
Section titled “Pitfalls”- Interpreters must be installed. A
(python)/(node)task fails with an actionable error if the runtime isn’t onPATH. The Rune container image ships only the static binary — see the Docker guide for that caveat. - Stick to the default
shfor portability. Only reach forset shell := [...]when you truly need a system shell feature; it trades away cross-platform parity. See shell override for how an override runs the body. - Agent bodies need a configured agent CLI — see AI agents (MCP).
Next steps
Section titled “Next steps”- AI agents (MCP) — the
agentexecutor and the security model. - Settings & dotenv —
set shelland environment for bodies.