Use this file to discover all available pages before exploring further.
Templates bundle a prompt, system prompt, model, default options, schema, tools, and fragments into a single named unit that you can invoke with -t template-name. They are stored as YAML files on disk and use Python’s string.Template$variable syntax so the same template can accept different inputs at runtime.
The quickest way to create a template is to build your prompt normally and add --save name:
llm '$input - summarize this' --save summarize
Use $input as a placeholder for content passed by the user (piped via stdin or as a CLI argument). If you omit $input, LLM appends the user’s input after your prompt automatically.
llm --system 'Summarize this' --save summarize
To include a literal $ in your prompt, escape it as $$.
# From a local YAML filellm -t path/to/template.yaml 'extra prompt here'# From a URLllm -t https://raw.githubusercontent.com/simonw/llm-templates/refs/heads/main/python-app.yaml \ 'Python app to pick a random line from a file'
Templates loaded from URLs have their functions: key ignored to prevent arbitrary code execution.
name: steampunk-summarymodel: gpt-4osystem: You speak like an excitable Victorian adventurerprompt: > Summarize the following text. Insert frequent satirical steampunk-themed anecdotes. Text to summarize: $inputoptions: temperature: 0.9extract: false
Plugins can register URL-style prefixes to load templates from external sources. Install llm-templates-github to load templates from GitHub:
llm install llm-templates-github
List all registered loaders:
llm templates loaders
Example output:
gh: Load a template from GitHub or local cache if available Format: username/repo/template_name (without .yaml extension) or username/template_name which means username/llm-templates/template_name