The core concept is almost absurdly simple. Clai reads from stdin, sends the content to an LLM of your choice, prints the result to stdout, and exits. No REPL, no session state, no background processes. It's a pure filter in the Unix tradition — the kind of thing you compose with |
and forget about.
Here's what the daily workflow looks like in practice:
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"
The last example is where it gets interesting — you can pass an inline prompt override with -e
instead of relying on a named preset. That's powerful when you need one-off transformations that don't warrant saving a prompt file.
Clai ships with a library of named prompts, and each one is just a file with YAML frontmatter. That means you can add your own, override the bundled ones, or organize them however makes sense for your team. I keep mine in a shared dotfiles repo so everyone on the team gets the same defaults.
For reasoning-heavy tasks, there are four strategies built in: chain-of-draft, chain-of-thought, tree-of-thought, and self-refine. I reach for chain-of-thought on anything that requires step-by-step logic, and self-refine when I want the model to critique its own output before returning it. The difference is noticeable on longer, more technical prompts.
Provider support covers the major players, and I'm actively adding more. You can also point Clai at a local model — nothing leaves your machine, which matters if you're working with sensitive codebases or just want zero latency on a personal machine. The local model path was one of the design decisions I'm most proud of; too many CLI LLM tools lock you into a specific provider and make self-hosting an afterthought.
Installation is a single Homebrew command:
brew install maxrodrigo/tap/clai
This is v0.3.0 — a few weeks old and rough around the edges. I'm genuinely looking for feedback on what's missing. If you find yourself piping text through LLMs regularly and wish there were a lighter tool for it, I'd love to hear whether Clai fits the gap or where it falls short. Contributions are very welcome at this stage.
Next Galaxy Z Fold8 vs Reality: Ultra-Wide Fold Tested →