Skip to main content
AIDiveForge AIDiveForge
Save tools:Log inSign up
Visit Clai

Get This Tool

License: License: unverified
Local-run terms: Install via Homebrew or Go and run locally with any supported LLM provider or Ollama.

Share This Tool

Compare This Tool
📋 Embed this tool on your site

Copy this code to embed a compact tool card:

Clai

FreeOpen SourceSelf-Hosted

Pricing

Model
Free

Summary

Every LLM wrapper that promises terminal integration eventually asks you to leave the terminal — a browser tab for the UI, a separate config file editor, a web dashboard to manage prompts. Clai doesn't. It is stdin, LLM, stdout, done.

Clai treats a language model the way Unix treats any other filter: pipe in, pipe out. Git diffs route to code-review, PDF text routes to parse, Markdown files concatenate and route to draft — all without temp files, wrapper scripts, or context switching. The built-in prompts cover the common cases fast. Where the tool stops is equally clear: there is no memory, no tool-calling loop, no conversation state. A task that requires the model to decide what to do next based on a prior step's output — and then act on that decision autonomously — hits a wall immediately. Teams who need that reach for an agent framework; Clai stays in the pipeline for everything else.

Bottom line: Clai is the right call when your workflow is already shell-native and you need LLM inference to slot into it like awk does — but the moment you need the model to branch, remember, or act across turns, you are looking at a different tool.

Community Performance Report Card

No community ratings yet. Be the first to rate this tool!

Best For: Developers and power users staying in the terminal, Scriptable LLM tasks with existing shell tools, Local or multi-provider LLM usage without leaving the CLI
  • Pipeline-native stdin/stdout design, which means Clai slots into existing shell scripts next to grep, jq, and awk without wrapper code or API middleware.
  • Provider-agnostic with a single flag to switch between OpenAI, Anthropic, Gemini, Bedrock, Vertex, and Ollama, so swapping to a local model when data sensitivity requires it is a one-flag change rather than a rewrite.
  • JSON schema validation on structured output with exit code 3 on mismatch, which means scripts downstream can trust the shape and skip defensive parsing that breaks silently on malformed responses.
  • Reasoning strategies (Self-Refine, Chain-of-Thought, Tree-of-Thought) applied via --strategy flag, so a draft that needs a self-critique pass before output gets one without adding a second script.
  • Custom prompts are versioned Markdown files, which means prompt changes go through the same review process as code changes instead of living in a chat UI nobody else can audit.
  • Clai holds no session state between invocations — each call is independent. Any workflow where the model's next action depends on the result of a previous step (fix the bug you just identified, run the test, check the output, repeat) cannot be expressed as a Clai pipeline. Teams building that kind of loop switch to an agent framework such as LangGraph or a similar tool that maintains state across steps.
  • There is no built-in retry budget or rate-limit handling beyond the JSON schema retry on mismatch. Scripts that fan out to many parallel LLM calls — processing a directory of files concurrently — will hit provider rate limits with no backoff logic from Clai itself. Teams handle this by wrapping calls in shell retry loops or rate-limiting via xargs -P, which means the reliability logic lives outside the tool.
  • Custom prompt sharing is file-based: prompts are Markdown files distributed however the team already shares files. There is no registry, no versioning UI, and no access control layer. Teams with more than a handful of shared prompts end up managing a prompts directory in a git repo, which works but is entirely self-organized.

About

Platforms
macOS, Linux (via Go and Homebrew)
API Available
No
Self-Hosted
Yes
Last Updated
2026-08-14T06:11:07.507Z

Best For

Who it's for

  • Developers and power users staying in the terminal
  • Scriptable LLM tasks with existing shell tools
  • Local or multi-provider LLM usage without leaving the CLI

What it does well

  • Summarize articles or transcripts piped from yt-dlp or whisper
  • Code-review git diffs directly in the terminal
  • Draft blog posts from multiple Markdown research files
  • Extract structured JSON from PDF text using schema validation
  • Chain LLM calls for draft-then-proofread workflows

Integrations

OpenAIAnthropicGeminiBedrockVertex AIOllama
Help improve this page

Add notes, reviews, and benchmarks so the next visitor gets a clearer picture.

Sign in to contribute

Spotted incorrect or missing data? Join our community of contributors.

Sign Up to Contribute

Frequently Asked Questions

Is Clai free?
Yes — Clai is fully free to use. There is no paid tier.
Is Clai open source?
Yes. Clai is open source.
Can I self-host Clai?
Yes. Clai supports self-hosting on your own infrastructure.
What platforms does Clai support?
Clai is available on: macOS, Linux (via Go and Homebrew).

Clai wraps a language model into a standard Unix command: it reads from stdin, sends the content plus a prompt to the LLM, and writes the result to stdout. Built-in prompts — summarize, draft, code-review, commit, translate, parse, proofread — are invoked by name. Custom prompts are Markdown files with frontmatter, stored anywhere and versioned like code. Provider selection is a single flag: OpenAI, Anthropic, Gemini, Bedrock, Vertex AI, Ollama, or anything OpenAI-compatible. Run fully local with Ollama when data cannot leave the machine.

The differentiating feature is what Clai refuses to be. It does not buffer state, open a socket, or manage a session. That constraint is the design: because the tool is stateless and text-in/text-out, it composes with grep, jq, awk, curl, and pdftotext exactly the way those tools compose with each other. Chaining two LLM calls — draft from sources, then proofread the draft — is a pipe character. The vendor describes reasoning strategies (Chain-of-Thought, Self-Refine, Tree-of-Thought) applied via a single –strategy flag, giving the model a structured thinking pass before output without requiring the user to change the pipeline shape.

Structured output gets schema validation baked in: the parse prompt accepts a JSON schema via -s, validates the model’s output against it, retries on mismatch, and exits with code 3 if it still fails — so downstream scripts can assert shape without defensive parsing. That makes Clai genuinely scriptable in a way that tools returning free-form text are not. The ceiling is task statefulness: Clai executes one prompt against one input and exits. Workflows that require the model to observe a result, decide a next action, and loop — code that runs, fails, and needs a fix applied — are outside what this tool does, and teams building those workflows will move to an agent framework regardless of how well Clai fits the rest of their stack.