Command-line chat interface for multiple LLM providers, with streaming output, persistent chats, and YAML-based model aliases.
Project description
oi
Command-line chat interface for multiple LLM providers, with streaming output, persistent chats, and YAML-based model aliases.
Highlights
- One CLI for multiple providers through
pydantic-ai(openai,openai-responses,anthropic,google,openrouter,moonshotai, and others you add in YAML). - Fast model switching via aliases like
sonnet,gpt,gemini-pro. - Chat history with resume/continue flows and an interactive selector.
- Chat bookmarks with
/bookmarkin-chat plus bookmark/filter controls in the selector. - Optional search and thinking traces when the selected model supports them.
- Paste images with
Alt+Von vision-capable models. - User config in
~/.config/oi/merges with built-in defaults.
Install
uv tool install git+https://github.com/dansclearov/oi.git
For local development:
git clone https://github.com/dansclearov/oi.git
cd oi
uv install --group dev
uv run oi --help
Quick Start
Set one or more provider API keys (you only need keys for providers you use):
export ANTHROPIC_API_KEY=...
export OPENAI_API_KEY=...
export GEMINI_API_KEY=...
export OPENROUTER_API_KEY=...
Start chatting:
oi
oi -P concise -m sonnet
Common Commands
# Pick prompt + model
oi -P concise -m gpt
# Continue or resume chats
oi -c
oi -r
oi -r chat_20240622_143022_a1b2c3d4
# Headless: send one message and exit
oi -p "what's 2+2"
oi -c -p "follow up on the last chat"
oi --ephemeral -p "quick question, don't save it"
oi -c --ephemeral -p "probe an existing chat without dirtying it"
# In-chat local commands
/bookmark
/vim
# Slash commands complete with Tab
# Model features
oi --search -m sonnet
oi --no-thinking -m gpt
oi --hide-thinking -m gpt
# Show config/data paths
oi --user-paths
Configuration
Default models and aliases live in src/oi/models.yaml.
User overrides live in ~/.config/oi/models.yaml and are merged on top of defaults.
Example user overrides:
aliases:
default: r1
r1: openrouter/deepseek/deepseek-r1-0528
openrouter:
deepseek/deepseek-r1-0528:
supports_thinking: true
supports_search: true
Notes:
- Top-level keys starting with
_are ignored (useful for YAML anchors/metadata). extra_paramsis passed through for provider-specific model settings.- On first run,
~/.config/oi/models.yamlis auto-created from a template.
Prompts
Prompts are loaded from:
~/.config/oi/prompts/(user overrides)src/oi/prompts/(built-ins)
Naming format is prompt_<name>.txt, used as oi -P <name>.
Set the default prompt for new chats in ~/.config/oi/config.json:
{
"default_prompt": "concise"
}
An explicit -P still wins, for example oi -P general.
Development
uv run pytest
uv run ty check
License
MIT. See LICENSE.
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 oi_chat-0.1.0.tar.gz.
File metadata
- Download URL: oi_chat-0.1.0.tar.gz
- Upload date:
- Size: 3.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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 |
034fe994701a578e9aec9e221fbd84b53693d8389165c8b318bdfc163e527992
|
|
| MD5 |
d8cdc23fbd23dbf400e567c88292be20
|
|
| BLAKE2b-256 |
4bf8ed3c7e88d571e8d9efe3acf9a8db274675989c161e57e2f576af16225489
|
File details
Details for the file oi_chat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oi_chat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 42.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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 |
8036f894be02b4af3b13f7cd1a0a9e6a4fbcc456a31eef973b4cce8414b027c8
|
|
| MD5 |
2e2c0aea0d5fba9a1d7b7726a55296b0
|
|
| BLAKE2b-256 |
b2963c924c6ac68778638a0bcb630e51f108cf8e8d7e76e9485a49e552dd8b06
|