# Show HN: Clai – Context engineering for terminal powerusers

> Source: <https://github.com/baalimago/clai>
> Published: 2026-06-24 09:32:54+00:00

Test coverage: 68.860% 😌👏

`clai`

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

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](/baalimago/clai/blob/main/EXAMPLES.md) for how to use `clai`

.
If you have time, you can also check out [this blogpost](https://lorentz.app/blog-item.html?id=clai) for a slightly more structured introduction on how to use Clai efficiently.

Install [Glow](https://github.com/charmbracelet/glow) for formatted markdown output when querying text responses.

- Add any MCP server you'd like by simply pasting their configuration.[MCP client support](/baalimago/clai/blob/main/EXAMPLES.md#mcp-tools-external-tool-servers)**Vendor agnosticism**- Use any functionality in Clai with[most LLM vendors](#supported-vendors)interchangeably.- Create, manage and continue conversations.[Conversations](/baalimago/clai/blob/main/EXAMPLES.md#bind-a-previous-conversation-to-the-current-directory)- Pre-prompted profiles enabling customized workflows and agents.[Profiles](/baalimago/clai/blob/main/EXAMPLES.md#profiles--workflow-presets)**Unix-like**- Clai follows the[unix philosophy](https://en.wikipedia.org/wiki/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](/baalimago/clai/blob/main/EXAMPLES.md) for additional info.

| Vendor | Environment Variable | Models |
|---|---|---|
| Berget AI | `BERGET_API_KEY` |
`berget:` |

`OPENROUTER_API_KEY`

[Text models](https://openrouter.ai/models), use prefix`or:`

`MISTRAL_API_KEY`

[Text models](https://docs.mistral.ai/getting-started/models/)`OPENAI_API_KEY`

[Text models](https://platform.openai.com/docs/models),[photo models](https://platform.openai.com/docs/models/dall-e)`ANTHROPIC_API_KEY`

[Text models](https://platform.claude.com/docs/en/about-claude/models/overview)`GEMINI_API_KEY`

[Text models](https://ai.google.dev/gemini-api/docs/models),[photo models](https://ai.google.dev/gemini-api/docs/image-generation#image_generation_text-to-image)`HF_API_KEY`

[Text models](https://huggingface.co/docs/inference-endpoints/chat-completions), use prefix`hf:`

`XAI_API_KEY`

[Text models](https://docs.x.ai/docs/models)`INCEPTION_API_KEY`

[Text models](https://platform.inceptionlabs.ai/docs#models)`ollama:`

(defaults to llama3), server defaults to localhost:11434Shell completions are also available:

```
# bash
mkdir -p ~/.local/share/bash-completion/completions
clai completion bash > ~/.local/share/bash-completion/completions/clai
# zsh
mkdir -p ~/.zsh/completions
clai completion zsh > ~/.zsh/completions/_clai
```

For zsh, ensure your `fpath`

includes the completions directory before `compinit`

, for example:

```
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit
```

Then restart your shell or reload your shell configuration.
