Chabeau - Terminal Chat Interface

NOTE: This is pre-alpha software. It has only been tested on Linux.
A full-screen terminal chat interface that connects to various AI APIs for real-time conversations with secure credential management.
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, with your favorite editor for long prompts.

Features
- Full-screen terminal UI with real-time streaming responses
- Multiple OpenAI-compatible providers (OpenAI, OpenRouter, Poe, Anthropic, custom)
- Secure API key storage in system keyring with config-based provider management
- Message retry and external editor support
- Conversation logging with pause/resume
Quick Start
Installation
Setup Authentication
Start Chatting
Note: Chabeau will use your configured default provider and model if set. If no default model is configured for your provider, Chabeau will automatically fetch and use the newest available model from that provider. If you haven't configured a default provider, Chabeau will use the first available authenticated provider.
Usage
Basic Commands
Discovery
Authentication Management
Environment Variables (Fallback)
If no authentication is configured:
# Optional
Configuration
Chabeau supports configuring default providers and models for a smoother experience:
You can also use the interactive selectors:
View current configuration:
Note: The set default-model command now accepts provider and model names without requiring quotes, making it easier to use.
Interface Controls
| Key | Action |
|---|---|
| Type | Enter message |
| Enter | Send message |
| Alt+Enter | Insert newline in input |
| Ctrl+A | Move cursor to beginning of input |
| Ctrl+E | Move cursor to end of input |
| Left/Right | Move cursor left/right in input |
| Up/Down/Mouse | Scroll chat history |
| Ctrl+C | Quit |
| Ctrl+R | Retry last response |
| Ctrl+T | Open external editor |
| Esc | Interrupt streaming |
Chat Commands
/help- Show extended help/log <filename>- Enable/switch log file/log- Toggle logging pause/resume/dump <filename>- Dump conversation to specified file/dump- Dump conversation to chabeau-log-.txt
External Editor
Set EDITOR environment variable:
# or vim, code, etc.
# VS Code with wait
Interface Layout
- Chat Area: Color-coded conversation history
- Cyan/Bold: Your messages
- White: Assistant responses
- Gray: System messages
- Input Area: Message composition (yellow highlight)
- Title Bar: Version, provider, model, logging status
Architecture
Modular design with focused components:
main.rs- Entry pointbuiltin_models.toml- Build-time configuration for supported providerscli/- 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 componentsmod.rs- Core module declarationsapp.rs- Core application statebuiltin_providers.rs- Built-in provider configuration (loads frombuiltin_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.rs- Main chat event loop and UI renderingrenderer.rs- Terminal interface rendering
utils/- Utility functions and helpersmod.rs- Utility module declarationseditor.rs- External editor integrationlogging.rs- Chat logging functionalityscroll.rs- Text wrapping and scroll calculations
commands/- Chat command processingmod.rs- Command processing implementation
Built-in Provider Configuration
Chabeau uses a build-time configuration system for built-in providers. The builtin_models.toml file defines supported providers with their IDs, display names, base URLs, and authentication modes:
[[]]
= "openai"
= "OpenAI"
= "https://api.openai.com/v1"
[[]]
= "anthropic"
= "Anthropic"
= "https://api.anthropic.com/v1"
= "anthropic" # Special authentication mode
This configuration is embedded into the binary at compile time, eliminating runtime file dependencies while allowing easy modification of supported providers during development.
Development
Running Tests
Key Dependencies
tokio- Async runtimeratatui- Terminal UI frameworkreqwest- HTTP clientkeyring- Secure credential storageclap- Command line parsing
License
CC0 1.0 Universal (Public Domain)