I see llm-jq has this code which read the example from stdin and appends it to the prompt
https://github.com/simonw/llm-jq/blob/beaada20d11dfc34618394c633bfa128a7c00a94/llm_jq.py#L42-L46
is_pipe = not sys.stdin.isatty()
if is_pipe:
example = sys.stdin.buffer.read(length)
else:
example = ""
Does it make sense for llm-cmd to consume the stdin when constructing the prompt. I am thinking of a case where i want llm-cmd to generate a command with context of an output from another command (for e.g. ffprobe)
If this is of interest, i can try to do it myself and submit a PR
I see llm-jq has this code which read the example from stdin and appends it to the prompt
https://github.com/simonw/llm-jq/blob/beaada20d11dfc34618394c633bfa128a7c00a94/llm_jq.py#L42-L46
Does it make sense for llm-cmd to consume the stdin when constructing the prompt. I am thinking of a case where i want llm-cmd to generate a command with context of an output from another command (for e.g.
ffprobe)If this is of interest, i can try to do it myself and submit a PR