Clai does one thing: takes stdin, sends it to a model of your choice and prints the result. No REPL, no state. When it's done it just exits.
git diff | clai commit
cat article.txt | clai summarize | glow
pbpaste | clai tldr
curl -s example.com/article.html | clai -e "Extract the three main concepts"
It ships with a set of named prompts but you can override, add or extend as needed, they're just files with frontmatter. There's also strategies (chain-of-draft, chain-of-thought, tree-of-thought, and self-refine) to change the reasoning depending on your needs.Works with major providers and I'll keep adding more. It can also be pointed to a local model so nothing leaves your machine.
Install with:
brew install maxrodrigo/tap/clai
This is v0.3.0 and it's a few weeks old. It's early and rough around the edges. I'd appreciate feedback on what's missing and if you find it useful. Contributions welcome.