Multi-provider AI chatbot for the terminal
Project description
inzen-bot 🤖
A multi-provider AI chatbot for the terminal. Chat with Claude, GPT-4, Ollama, or llama.cpp without leaving your shell — with full conversation history so you can follow multi-step instructions one command at a time.
$ bot how do I format a drive in Ubuntu?
Step 1: List your drives to identify the correct device:
sudo fdisk -l
$ bot step 2?
Step 2: Unmount the partition if it's currently mounted:
sudo umount /dev/sdX1
$ bot step 3?
Step 3: Format the drive with your chosen filesystem:
sudo mkfs.ext4 /dev/sdX
No browser. No switching apps. Just ask and keep working.
Contents
Install
pip install inzen-bot
Or with uv:
uv add inzen-bot
Setup
1. Set your API key
inzen-bot reads your API keys from environment variables.
Linux / macOS — add to your ~/.bashrc or ~/.zshrc:
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..." # optional
Then reload:
source ~/.bashrc
Windows (PowerShell) — set permanently:
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "sk-ant-...", "User")
Restart your terminal after running this.
For Ollama and llama.cpp no API key is needed — just make sure the local server is running before use.
2. Verify it works
bot hello
You should see a response from Claude. If you get an error, check your API key is set correctly with:
# Linux / macOS
echo $ANTHROPIC_API_KEY
# Windows PowerShell
echo $env:ANTHROPIC_API_KEY
Usage
# Ask anything
bot what is the mkfs command
# Follow up — history is automatic
bot what does the -t flag do
bot next step?
# Use a specific provider for one query
bot --provider openai explain RAID levels
# Switch default provider
bot --set-provider ollama
# Switch model
bot --set-model claude-opus-4-5
# View conversation history
bot --history
# Clear history
bot --clear
# List all configured providers
bot --providers
Named Sessions
Named sessions let you maintain separate, persistent conversation threads — useful for keeping different projects or topics isolated.
# Start or continue a named session
bot --session myproject what is a venv
# Pick up where you left off
bot --session myproject how do I activate it
# List all saved sessions
bot --sessions
# Delete a session
bot --clear-session myproject
Sessions are stored as JSON files in ~/.bot/sessions/ and are independent of provider — you can switch providers mid-session.
Providers
| Provider | Requires | Notes |
|---|---|---|
anthropic |
ANTHROPIC_API_KEY |
Default. Claude models. |
openai |
OPENAI_API_KEY |
GPT models. Also works for Groq, Together, etc. |
ollama |
Ollama running | Local inference. Free to run. |
llamacpp |
llama.cpp running | Local inference via OpenAI-compatible server. |
Ollama quickstart
# Install from https://ollama.ai, then:
ollama pull llama3
ollama serve
bot --set-provider ollama
bot hello from the terminal
llama.cpp quickstart
# Build llama.cpp from https://github.com/ggerganov/llama.cpp, then run the server:
./server -m your-model.gguf --port 8080
bot --set-provider llamacpp
bot what is quantisation
Configuration
Config and history live in ~/.bot/:
~/.bot/
├── config.json # provider settings and defaults
├── history_anthropic.json # conversation history per provider
├── history_openai.json
├── history_ollama.json
└── sessions/ # named sessions
└── myproject.json
Each provider keeps its own history so context doesn't bleed across models. History is capped at 50 message pairs per provider to keep context and API costs under control.
You can edit ~/.bot/config.json directly to add custom providers or point the OpenAI provider at any OpenAI-compatible endpoint:
{
"provider": "anthropic",
"providers": {
"anthropic": { "model": "claude-haiku-4-5", "api_key_env": "ANTHROPIC_API_KEY" },
"openai": { "model": "gpt-4o", "api_key_env": "OPENAI_API_KEY" },
"groq": { "model": "mixtral-8x7b-32768", "api_key_env": "GROQ_API_KEY",
"base_url": "https://api.groq.com/openai/v1" },
"ollama": { "model": "llama3", "base_url": "http://localhost:11434" },
"llamacpp": { "model": "local", "base_url": "http://localhost:8080" }
}
}
Requirements
- Python 3.12+
anthropic— Anthropic/Claude provideropenai— OpenAI and llama.cpp providersrich— terminal renderingclick— CLI framework
Cross-platform
Works on Linux, macOS, and Windows. Config and history paths resolve correctly on all platforms via Path.home().
Built by
Inzen — AI consulting and LLM application development.
License
GPL-3.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inzen_bot-0.2.1.tar.gz.
File metadata
- Download URL: inzen_bot-0.2.1.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c208e02efedad0abb5830dcff54afd2a824b5194aad80b0ea210c8fcb1b17305
|
|
| MD5 |
b9f234dde3ead81795dcde8e97290a52
|
|
| BLAKE2b-256 |
4c40726dc682e1ec571335e597ca978811f3bf333529dfb268a995d8f852e14d
|
File details
Details for the file inzen_bot-0.2.1-py3-none-any.whl.
File metadata
- Download URL: inzen_bot-0.2.1-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c88f3fd16942cff76b1d7ed4a0fda6a649c697b7864abc78232524e9553cf477
|
|
| MD5 |
41e3d865e7292bff68245e6e6bf8784f
|
|
| BLAKE2b-256 |
4b1d80bd3192b34483e2c3c2cfb2c18682251b8e3ed794e743f33f587168440a
|