simonw / simonw/llm

Chaining `llm chat` with stdin

Open
#606 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

Would you be open to supporting passing in an optional initial message to chat requests? For eg.

I would expect this to work but seems to crash after the first response:

~ $ echo "hello world" | llm chat
Chatting with claude-3-5-sonnet-latest
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
> Hi! How can I help you today?
> Aborted!

This is what I'd actually like to do: files-to-prompt lol.txt --cxml | llm chat

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 at the llm chat command's stdin and interactive input handling, reproducing echo "hello world" | llm chat. Verify that an initial piped message is accepted without aborting the session, and that the files-to-prompt lol.txt --cxml | llm chat pipeline works as requested.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.