top | item 46571154

(no title)

mrstackdump | 1 month ago

Maybe I'm not understanding it (totally possible!) but could Claude just do that by reading standard out and writing to standard in?

discuss

order

tptacek|1 month ago

I had a really hard time getting anything like that to work (you can't just read stdout and write stdin, because you're driving a terminal in raw mode), but it took like 3 sentences worth of Claude prompt to get Claude to use tmux to do this reliably.

alehlopeh|1 month ago

I tell Claude code to use an existing tmux session to interact with eg a rails console, and it uses tmux send-keys and capture-pane for IO. It gets tripped up if a pager is invoked, but otherwise it works pretty well. Didn’t occur to me to tell it to take screenshots.

mrstackdump|1 month ago

I would love to see your prompt if you ever post it anywhere.

rsanheim|1 month ago

Also many CLIs act differently when invoked connected to a terminal (TUI/interactive) vs not. So you’d run into issues there where Claude could only test the non-interactive things.