clai

clai

Command line artificial intelligence - Your local LLM context-feeder

Stars: 92

Visit
 screenshot

Clai is a command line context-feeder for AI tasks, supporting MCP client, vendor agnosticism, conversations, rate limit circumvention, profiles, and Unix-like functionality. Users can easily combine and tweak features for diverse use cases. Supported vendors include OpenAI, Anthropic, Mistral, Deepseek, Novita AI, Ollama, and Inception. Users need API keys for model access. Installation via 'go install' or setup script. 'clai help' provides guidance on usage. Glow can be installed for formatted markdown output.

README:

clai: command line artificial intelligence

Go Report Card Wakatime

Test coverage: 40.529% 😒👍

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

Banner

Features

  • 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.
  • Rate limit circumvention - Automatically summarize + recall complex tasks.
  • 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
OpenAI OPENAI_API_KEY Text models, photo models
Anthropic ANTHROPIC_API_KEY Text models
Mistral MISTRAL_API_KEY Text models
Deepseek DEEPSEEK_API_KEY Text models
Novita AI NOVITA_API_KEY Text models, use prefix novita:<target>
Ollama N/A Use format ollama:<target> (defaults to llama3), server defaults to localhost:11434
Inception INCEPTION_API_KEY Text models

Note that you can only use the models that you have bought an API key for.

Get started

go install github.com/baalimago/clai@latest

You may also use the setup script:

curl -fsSL https://raw.githubusercontent.com/baalimago/clai/main/setup.sh | sh

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.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for clai

Similar Open Source Tools

For similar tasks

For similar jobs