This is a really nifty CLI tool that lets you fit an LLM into a shell environment. Check out examples like piping context into and out of the `llm` command.
https://github.com/simonw/llm