simonw / simonw/llm

Use stdin and arguments in a template #26

Open
#832 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design enhancement templates
Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
6d 12h
Merged PRs (30d)
15

Description

Is it possible define the exact placement of stdin and arguments when defining a template? From the docs it's not immediately obvious to me what $input is when I have both std and arguments.

context: I'm trying to create an llm template that I can use with Helix editor's :pipe feature. I want the stdin to be the selected text from the editor and then have a prompt like:

Transform the provided code according to the following instruction: $arguments

Output only the modified code with no explanations, comments, or surrounding text.

Code:

$stdin

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the template documentation and the CLI handling used when stdin and arguments are passed, then trace how the Helix editor's :pipe use case reaches template expansion. The work is done when a template can place stdin and arguments exactly as requested and the documentation clearly explains the relevant variables and behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.