clai

command module
v1.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 10 Imported by: 0

README

Command Line Artificial Intelligence

Go Report Card Wakatime

Test coverage: 68.105% 😌👏


clai (/klaɪ/, like "cli" in "climate") is a command line context-feeder for any ai task.

Banner

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

Then run:

clai help | clai query Please give a concise explanation of clai

Either look at clai help or the examples for how to use clai. If you have time, you can also check out this blogpost for a slightly more structured introduction on how to use Clai efficiently.

Install Glow for formatted markdown output when querying text responses.

Features

Showcase
  • MCP client support - Add any MCP server you'd like by simply pasting their configuration.
  • Vendor agnosticism - Use any functionality in Clai with most LLM vendors interchangeably.
  • Conversations - Create, manage and continue conversations.
  • Profiles - Pre-prompted profiles enabling customized workflows and agents.
  • Unix-like - Clai follows the unix philosophy and works seamlessly 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.

Supported vendors

Vendor Environment Variable Models
OpenRouter OPENROUTER_API_KEY Text models, use prefix or:
Mistral MISTRAL_API_KEY Text models
OpenAI OPENAI_API_KEY Text models, photo models
Anthropic ANTHROPIC_API_KEY Text models
Gemini GEMINI_API_KEY Text models, photo models
HuggingFace HF_API_KEY Text models, use prefix hf:
xAi XAI_API_KEY Text models
Inception INCEPTION_API_KEY Text models
Ollama N/A Use format ollama: (defaults to llama3), server defaults to localhost:11434

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
models
This package contains test intended to be used by the implementations of the Querier, ChatQuerier and StreamCompleter interfaces
This package contains test intended to be used by the implementations of the Querier, ChatQuerier and StreamCompleter interfaces
vendors/openai
Package openai implements OpenAI vendor integrations (chat, photo, video).
Package openai implements OpenAI vendor integrations (chat, photo, video).
pkg
agent
agent is a specialized module which utilizes clai and the public models to create an agent.
agent is a specialized module which utilizes clai and the public models to create an agent.
text
Package text exposes a high-level, public API for interacting with large language models (LLMs) using chat-style conversations.
Package text exposes a high-level, public API for interacting with large language models (LLMs) using chat-style conversations.
text/models
Package models contains the public data structures used by the text package.
Package models contains the public data structures used by the text package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL