baalimago/clai
关于
Command line artificial intelligence - Context engineering for terminal powerusers
人工智能与机器学习可以做什么
- Shell context injection - Inject shell context into the system prompt via configurable templates.
- Seamless conversation import - Ran out of session? Continue in clai!
- Agent Skills - Import skills from custom global directories, or project-level .agents/skills.
- Profiles - Pre-prompted profiles enabling customized workflows and agents, run locally or from the Hub.
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Test coverage: 92.5% 😍👌
>|✦ Command Line Artificial Intelligence
clai (/klaɪ/, like "cli" in "climate") is a unix-like command line agentic harness with batteries hosted online.
Get started
Installing:
curl -fsSL https://raw.githubusercontent.com/baalimago/clai/main/setup.sh | sh
You can also install via go:
go install github.com/baalimago/clai@latest
Or run it from the Nix flake without installing (flakes must be enabled):
nix run github:baalimago/clai
Then run:
clai | clai query Please give a concise explanation of clai
Install Glow for formatted markdown output when querying text responses.
man clai documents every command. setup.sh installs the page, and the first run of a new release in a terminal installs or updates it; clai man install does it on demand and CLAI_MANPAGE=off turns the automatic install off.
See clai.chat for details on usecase of all the features. Here's a brief summary:
Eleven acts in one shell session, each explained in examples.
Features
- Shell context injection - Inject shell context into the system prompt via configurable templates.
- Seamless conversation import - Ran out of session? Continue in clai!
- Agent Skills - Import skills from custom global directories, or project-level
.agents/skills. - Profiles - Pre-prompted profiles enabling customized workflows and agents, run locally or from the Hub.
- Model fallback - Name a verb (
strong,fast,cheap) instead of a model: each machine resolves it to its own ordered list and the run tries them in turn, so a shared profile runs anywhere. - Loop until verified - Add
-loopto a query and clai iterates toward the goal, accepting completion only when-checkpasses. - Structured output -
-response-formatreturns JSON instead of prose, from any vendor. - Decision models -
clai decideasks Jev, Gemini Decisions, OpenAI Decisions or an OpenRouter decision model a fixed set of questions about the data you pipe in, and prints the provider's probabilities, usage and cost as one JSON line. - MCP client support - Add any MCP server you'd like by pasting their configuration.
- Images, both ways - Attach images with
-image, a glob or stdin to any model, and get images back through thegenerate_imagetool, or from an image-output model. - Sync, git-style -
clai cloud pullandcommitcarry your config and conversations between machines, only when you ask. - Reply only -
-reply-onlykeeps stdout for the answer and draws the progress on stderr. - Unix-like - Clai follows the unix philosophy and works with data piped in and out.
All of these features are easily combined and tweaked, empowering users to accomplish very diverse use cases. See examples for additional info and clai.chat for in-depth guides.
Featured supported vendors
| Vendor | Environment Variable | Models |
|---|---|---|
| Jev | TYPESAFE_API_KEY |
System One decisions through clai decide, model jev-latest |
| OpenRouter | OPENROUTER_API_KEY |
Text models, image models, use prefix or: |
| Ollama | OLLAMA_API_KEY |
Use format ollama: (defaults to llama3), server defaults to localhost:11434 |
| Mistral | MISTRAL_API_KEY |
Text models |
| OpenAI | OPENAI_API_KEY |
Text models, photo models |
| DeepSeek | DEEPSEEK_API_KEY |
Text models, key is optional, no prefix (defaults to deepseek-flash) |
| Gemini | GEMINI_API_KEY |
Text models, photo models |
| Anthropic | ANTHROPIC_API_KEY |
Text models |
Moved but never forgotten:
探索相关项目
加载中…