Chabeau - Terminal Chat Interface

See several of Chabeau's features in action in this short video.
A full-screen terminal chat interface that connects to various AI APIs for real-time conversations.
Chabeau is not a coding agent, nor does it aspire to be one. Instead, it brings the conveniences of web-based chat UIs to the terminal. Its focus is on conversation and speed.
NOTE: This is pre-alpha software. It has been tested on Linux and macOS.

Features
- Full-screen terminal UI with real-time streaming responses
- Markdown rendering in the chat area (headings, lists, quotes, tables, inline/fenced code) with clickable OSC 8 hyperlinks
- Built-in support for many common providers (OpenAI, OpenRouter, Poe, Anthropic, Venice AI, Groq, Mistral, Cerebras)
- Support for quick custom configuration of new OpenAI-compatible providers
- Interactive dialogs for selecting models (e.g., Claude vs. GPT-5) and providers
- Extensible theming system that degrades gracefully to terminals with limited color support
- Secure API key storage in system keyring with config-based provider management
- Multi-line input (IME-friendly) with compose mode for longer responses
- Message retry and message editing
- Conversation logging with pause/resume; quick
/dumpof contents to a file - Syntax highlighting for fenced code blocks (Python, Bash, JavaScript, and more)
- Inline block selection (Ctrl+B) to copy or save fenced code blocks
For features under consideration, see WISHLIST.md
Quick Start
Installation
Setup Authentication
Start Chatting
Inside the TUI, use /provider and /model to switch, and /help to see a full breakdown of commands and keyboard shortcuts.
Usage
Basic Commands
Discovery
Authentication Management
Environment Variables (--env or fallback)
Environment variables are used only if no providers are configured, or when you pass --env.
# Optional
Environment variable values can make their way into shell histories or other places they shouldn't, so using the keyring is generally advisable.
Configuration
Chabeau supports configuring default providers and models for a smoother experience.
The easiest way to do so is via the /model and /provider commands in the TUI,
which open interactive pickers. Use Alt+Enter or Ctrl+J to persist a choice to the config.
You can also do it on the command line:
There are also simplified interactive selectors:
View current configuration:
Themes
Chabeau includes built-in themes to customize the TUI appearance.
- Use
/themein the TUI to pick a theme, and use Alt+Enter or Ctrl+J to persist it to the config. - You can also use the commmand line to set a default theme, e.g.:
- Set a theme:
chabeau set theme dark - List themes:
chabeau themes(shows built-in and custom, marks current)
- Set a theme:
- Unset theme (revert to default):
chabeau unset theme
Auto-detection: when no theme is set in your config, Chabeau tries to infer a sensible default from the OS preference (e.g., macOS, Windows, GNOME). If no hint is available, it defaults to the dark theme.
Custom themes:
- You can define custom themes in your config file (
~/.config/chabeau/config.toml) under[[custom_themes]]entries with fields matching the built-ins (see src/builtins/themes.toml for examples). - Once added, set them with
chabeau set theme <your-theme-id>.
Preferences
You can persist UI preferences in your config file (~/.config/chabeau/config.toml).
markdown = true|false— Enable/disable Markdown rendering. Default:true.syntax = true|false— Enable/disable syntax highlighting for fenced code blocks. Default:true.
At runtime, use chat commands to toggle and persist:
/markdown on|off|toggle/syntax on|off|toggle
Syntax colors adapt to the active theme (dark/light) and use the theme’s code block background for consistent contrast.
Color Support
Chabeau detects terminal color depth and adapts themes accordingly:
- Truecolor: if
COLORTERMcontainstruecolor/24bit, Chabeau uses 24‑bit RGB. - 256 colors: if
TERMcontains256color, RGB colors are quantized to the xterm‑256 palette. - ANSI 16: otherwise, colors are mapped to the nearest 16 ANSI colors.
You can force a mode with CHABEAU_COLOR=truecolor|256|16 if needed.
Interface Controls
See the built-in help for a full list of keyboard controls and commands.
Most should be intuitive. A couple of choices may be a bit jarring at first:
- Alt+Enter (or Ctrl+J) to start a new line: We've found this to be most reliable across terminals.
- Compose mode (F4) flips the defaults: Enter inserts a newline, Alt+Enter/Ctrl+J sends, arrow keys stay in the input, and Shift+arrow scrolls the transcript.
Feedback and suggestions are always welcome!
Mousewheel Use
We avoid capturing the mouse so that selection operation (copy/paste) work without issues. Some terminals treat mousewheel events as cursor key input, so scrolling the mousewheel will scroll the conversation.
In other terminals, scrolling the mousewheel may reveal the contents of your terminal prior to your launch of Chabeau. In that case, we recommend using the cursor keys or PgUp/PgDn instead.
External Editor
Set EDITOR environment variable:
# or vim, code, etc.
# VS Code with wait
Once the variable is set, you can compose messages using the external editor via Ctrl+T.
Architecture
Modular design with focused components:
main.rs- Entry pointbuiltins/- Build-time assets embedded into the binarymodels.toml- Supported provider definitionsthemes.toml- Built-in UI themeshelp.md- In-app keyboard shortcut and command reference
cli/- Command-line interface parsing and handlingmod.rs- CLI argument parsing and command dispatchingmodel_list.rs- Model listing functionalityprovider_list.rs- Provider listing functionalitypick_default_model.rs- Default model configurationpick_default_provider.rs- Default provider configuration
core/- Core application componentsapp/- Application state and controllersmod.rs- App struct and module exportsconversation.rs- Conversation controller for chat flow, retries, and streaming helperssession.rs- Session bootstrap and provider/model statesettings.rs- Theme and provider controllersui_state.rs- UI state management and text input helpers
builtin_providers.rs- Built-in provider configuration (loads frombuiltins/models.toml)config.rs- Configuration managementmessage.rs- Message data structures
auth/- Authentication and provider managementmod.rs- Authentication manager implementation
api/- API types and modelsmod.rs- API data structuresmodels.rs- Model fetching and sorting functionality
ui/- Terminal interface renderingmod.rs- UI module declarationschat_loop/- Mode-aware chat loop with setup, streaming, and keybinding registrieslayout.rs- Shared width-aware layout engine for Markdown and plain textmarkdown.rs/markdown_wrap.rs- Markdown renderer and wrapping helpers that emit span metadatarenderer.rs- Terminal interface rendering (chat area, input, pickers)osc_backend.rs/osc_state.rs/osc.rs- Crossterm backend wrapper that emits OSC 8 hyperlinkspicker.rs/appearance.rs/theme.rs- Picker controls and theming utilities
utils/- Utility functions and helpersmod.rs- Utility module declarationscolor.rs- Terminal color detection and palette quantizationeditor.rs- External editor integrationlogging.rs- Chat logging functionalityscroll.rs- Text wrapping and scroll calculationsclipboard.rs- Cross-platform clipboard helper
commands/- Chat command processingmod.rs- Command processing implementation
Development
Running Tests
Performance
Chabeau includes lightweight performance checks in the unit test suite and supports optional Criterion benches.
-
Built-in perf checks (unit tests):
- Short history prewrap (50 iters, ~60 lines): warns at ≥ 90ms; fails at ≥ 200ms.
- Large history prewrap (20 iters, ~400 lines): warns at ≥ 400ms; fails at ≥ 1000ms.
- Run with:
cargo test(warnings print to stderr; tests only fail past the fail thresholds).
-
Optional benches (release mode) using Criterion 0.7:
- A
render_cachebench is checked in to validate the cached prewrapped rendering path. - Run:
cargo bench - Reports:
target/criterion/(HTML underreport/index.html). - To add new benches, create files under
benches/(e.g.,benches/my_bench.rs) and use Criterion’scriterion_group!/criterion_main!. - Benches import internal modules via
src/lib.rs(e.g.,use chabeau::...).
- A
License
CC0 1.0 Universal (Public Domain)