clai
A unix-like command line agentic harness that queries LLMs from many vendors, with tools, profiles, MCP support and shell context injection.
At a Glance
clai CLI core is MIT licensed and free to use, modify and distribute; clai works the same without an account.
Engagement
Available On
Alternatives
Listed Nov 2026
About clai
clai (Command Line Artificial Intelligence) is an open-source, MIT-licensed command line agentic harness written in Go by baalimago. It lets terminal users query text and image models from many vendors, pipe data in and out, and run configurable agents. The latest release listed in the repository is v1.13.1.
What It Is
clai is a unix-like CLI that follows the unix philosophy of working with piped input and output. Users send queries to a chosen model, optionally injecting shell context into the system prompt through configurable templates. Output can be formatted markdown (using Glow if installed), JSON via structured output, or reply-only text on stdout with progress on stderr.
Agent workflow and profiles
Profiles are pre-prompted presets that customize workflows and agents. They can be run locally, from a local file or GitHub link, or loaded from the clai.chat Hub with a profile path. The first run shows the model, tools, MCP servers and skills the agent brings and asks for trust. Adding a loop flag makes clai iterate toward a goal and accept completion only when a check passes. Model aliases such as strong, fast or cheap resolve to each machine's own ordered fallback list.
Models, tools and integrations
clai supports vendors including OpenAI, Anthropic, Gemini, Mistral, DeepSeek, xAI, OpenRouter, Ollama, HuggingFace, Berget AI, Inception and Jev. It acts as an MCP client, imports Agent Skills from global or project-level directories, attaches images to queries and can return generated images. Conversations from other tools can be imported and continued.
Go library and sync
The agent loop can be embedded in Go programs through the pkg/agent package, with typed structured output and typed errors. An optional clai cloud command syncs config and conversations between machines through a clai.chat account, working git-style with pull and commit.
Community Discussions
Be the first to start a conversation about clai
Share your experience with clai, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
clai CLI core is MIT licensed and free to use, modify and distribute; clai works the same without an account.
- MIT License
- Unix-like command line agentic harness
- Bring your own vendor API keys (external costs)
- Go library (pkg/agent)
- MCP client support, profiles, agent skills
Cloud Config Sync
Optional clai.chat account sync of config, free up to 1 GB.
- Syncs profiles, MCP servers, shell contexts, skills, theme
- Up to 1 GB free
Cloud Conversation Sync
Optional sync of conversations across machines via clai.chat account; requires a card on file.
- $1 per started GB a month
- Card on file required
Capabilities
Key Features
- Shell context injection via configurable templates
- Conversation import from other sessions
- Agent Skills support
- Profiles for customized workflows, local or from the Hub
- Model fallback aliases
- Loop until verified with check
- Structured JSON output
- MCP client support
- Image input and output
- Git-style cloud sync of config and conversations
- Reply-only output mode
- Go library for embedding the agent loop
