I wanted a "seamless" way for executing llm prompts in my terminal for recurring tasks, and came up with this:
http://github.com/tgalal/promptcmd
The cool thing about it is that it also works over remote ssh shells, so quite handy in managing my homelab.