oAI — openrouter Chat (CLI)

A rich terminal chat client for OpenRouter models. Conversation persistence, file attachments, exports (Markdown / JSON / HTML), cost tracking, and a friendly command interface.

Overview

oAI is a terminal-based chat interface to OpenRouter (https://openrouter.ai) designed to make interactive model usage pleasant in the terminal. It features:

Interactive chat
Persistent session history, system prompts and model switching.
Conversation management
Save/load/delete conversations in SQLite (oai_config.db).
File attachments
Attach code files, PDFs and images using the @/path/to/file syntax.
Export
Export conversations as Markdown, JSON or standalone HTML.
Cost & credits
Estimates cost per message and queries account credits via OpenRouter.
Rich terminal UI
Uses rich, prompt_toolkit and syntax-aware layouts.

First run: you'll be prompted to enter your OpenRouter API key (persisted in the app DB). You can also set it later with /config api.

Screenshot

oAI help screen screenshot (terminal)