Estimated reading time: 5 minutes

Imagine this: You're working in the terminal, come across an error or are looking for a specific shell command - and instead of having to google it, you simply ask your shell. This is exactly what Whai makes possible. It is a lightweightshell-integrated AI tool that is seamlessly integrated into your workflow - without a chat window, without copy-paste, simply by command.

Whai is not intended to replace you, but to support you - it only takes over on request, but remains controllable. You stay at the wheel.

The special feature:
👉 You decide which AI, which model and which provider you use.

This gives you control over:

  • Costs (e.g. extremely inexpensive models such as GPT-5 Mini)
  • Privacy (through local self-hosted models via Ollama)
  • Performance (larger cloud models for complex tasks)
  • Language (German, English, Spanish ... depending on the model)

Whai is therefore not "an AI", but the bridge between your terminal and any AI you want to use.

For detailed instructions and explanations of all configuration options, I recommend watching the YouTube video linked below. This video goes into detail about each individual setting, providing you with comprehensive instructions on how to set everything up correctly. Any code from the video can be found in this article, so you can use it directly without having to type it out.

This blog post, including video, is part of a series in which we build and set up our own home server. We start with the basics, such as installing Ubuntu VM with Docker, and then move on to configuring our own domain, security measures, and, above all, lots of cool and useful self-hosted services. Whether it's media servers like Plex or Jellyfin or document management like Paperless-NGX, we'll work together to build the setup you want to see. We'll even tackle topics like single sign-on (SSO) together.

The most important functions of Whai

🔧 Help on demand

If you are stuck - e.g. you have an error message or do not know the exact command - then simply call up whai. The AI either analyzes your last error or accepts your description and suggests suitable shell commands.

🧠 Context & memory

Whai saves so-called "roles" - i.e. your context: which system you use, which tools are installed, your preferences, etc. This allows the AI to adapt its answers to you and your setup.

📝 History & session context

If you are in a tmux- or whai shell-session, Whai recognizes both your previous commands as well as their Expenditure. This means it can provide targeted assistance - e.g. analyze errors or optimize command sequences.

✅ Control instead of autopilot

You will always be asked before Whai makes a suggestion: [a]pprove / [r]eject. So you decide whether the command should really run - perfect for keeping control.

🔄 Support for many models

Whai is model-agnostic: it works with AI providers such as OpenAI, Gemini, Anthropic or local models via Ollama. This means you are flexible and can use your preferred AI.

What you can do with it

🔍 Analyze errors

Whai automatically reads your last terminal outputs (e.g. build errors, compiler messages, command outputs).

The AI automatically recognizes what has happened and explains it to you:

  • What the error means
  • Where he comes from
  • How to fix it
  • Which follow-up commands are necessary

Generate commands

You describe your goal - Whai delivers the command.

whai compress all png files to a zip archive and show the total size

Whai then generates e.g:

zip images.zip *.png && du -h images.zip

And important:
👉 You must confirmbefore it is executed.

💬 Natural language terminal interactions

With Whai you can create shell automations in human language:

whai create a bash script that checks internet speed every hour and logs results into a csv

Whai builds the code, explains it to you and waits for you to type "approve".

Installation of Whai via pipx

There are other variants, but I recommend this method. This is the cleanest option.

1. pipx install:

python3 -m pip install --user pipx
pipx ensurepath

2. whai install:

pipx install whai

3. create model configuration

Whai starts you through a wizard the first time you call it up.
Or you can edit the config directly:

~/.config/whai/config.toml

Example (OpenAI + GPT-5 Mini):

provider = "openai"
model = "gpt-5-mini"
api_key = "sk-..."

4. close and reopen the command line

Done - now you can use Whai.

Practical examples

Linux system analysis

whai check why my cpu load is high and recommend next steps

Generate Docker commands

whai create a docker-compose file with postgres and adminer

🧹 File system cleanup

whai find large files in the system and suggest secure deletion methods

🧑‍💻 Solve Git problems

whai resolve the conflict shown in "index.html" and rewrite the file accordingly

YouTube video implementation

Conclusion

Whai is a clever, lean terminal assistant that allows you to get help in the terminal whenever you want using natural language. Instead of digging through documentation or searching the web, you immediately get context-sensitive suggestions - and decide for yourself whether to execute them.

Whai is therefore not just another dev tool, but a Universal AI adapter for the command line.

If you want to increase your productivity, spend less time googling and keep full control over costs & data protection - then Whai is the perfect extension for your CLI setup.

Useful links at a glance

🔗 GitHub project: https://github.com/gael-vanderlee/whai
🔗 Ollama (local models): https://ollama.com
🔗 pipx documentation: https://pipx.pypa.io

The product display was implemented using the affiliate-toolkit WordPress plugin.
Categories: Self-hosted server

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.