A terminal chat client for Ollama, built with Rust and ratatui.
- π Fast & Responsive: Non-blocking UI with streamed responses
- π¬ Multi-Session: Manage multiple named chat conversations
- πΎ Persistent: Sessions auto-save across restarts
- β¨οΈ Keyboard-Driven: Vim-inspired keybindings
- π±οΈ Mouse Support: Click to switch sessions, scroll chat, and navigate
- π¨ Beautiful TUI: Clean, modern terminal interface
- βοΈ Configurable: TOML-based configuration
The easiest way to get started is to install Ratatalk as a global CLI tool:
cargo install ratatalkThis downloads the latest version from crates.io and installs it to your ~/.cargo/bin directory. After installation, ratatalk will be available in your PATH, so you can run it from any directory:
ratatalkIf you want to hack on Ratatalk or try the latest features from the repository:
git clone https://github.com/mohammad-albarham/ratatalk.git
cd ratatalkThen run it in development mode:
cargo runOr with optimizations (recommended for better performance):
cargo run --releaseIf you frequently run from source, you can add a shell alias to ~/.bashrc or ~/.zshrc:
alias rt='cargo run --release'Reload your shell configuration to apply it:
source ~/.zshrc # or source ~/.bashrcNow you can simply type rt to run Ratatalk:
rtRatatalk expects a local Ollama server running on http://127.0.0.1:11434 (the default). Start Ollama in a terminal:
ollama serveIn another terminal, run Ratatalk:
ratatalkIf you installed via crates.io, just use ratatalk. If you're running from source with the shell alias, use rt.
| Key | Action |
|---|---|
q / Ctrl+c |
Quit |
? |
Toggle help |
Ctrl+r |
Refresh models |
| Key | Action |
|---|---|
Tab |
Next session |
Shift+Tab |
Previous session |
Ctrl+n |
New session |
Ctrl+w |
Delete session |
m |
Select model |
| Key | Action |
|---|---|
i / Enter |
Start typing |
Esc |
Stop typing |
Enter |
Send message (while typing) |
| Key | Action |
|---|---|
j / β |
Scroll down |
k / β |
Scroll up |
Ctrl+d |
Page down |
Ctrl+u |
Page up |
g |
Scroll to top |
G |
Scroll to bottom |
| Key | Action |
|---|---|
Ctrl+a |
Move to start of line |
Ctrl+e |
Move to end of line |
Ctrl+u |
Clear input |
Ctrl+w |
Delete word |
Configuration is stored at ~/.config/ratatalk/config.toml:
[server]
host = "http://127.0.0.1:11434"
timeout_secs = 30
[model]
default_model = "llama3.2:latest"
temperature = 0.7
top_k = 40
top_p = 0.9
max_tokens = 0 # 0 = unlimited
[ui]
show_timestamps = true
show_token_count = true
sidebar_width = 30
mouse_support = true
tick_rate_ms = 100
[keybindings]
vim_mode = false- Config:
~/.config/ratatalk/config.toml - Sessions:
~/.local/share/ratatalk/sessions.json - Logs:
~/.config/ratatalk/ratatalk.log
src/
βββ main.rs # Entry point, terminal setup, main loop
βββ app.rs # Application state, events, actions
βββ config.rs # Configuration management
βββ error.rs # Error types
βββ events.rs # Input handling, keybindings
βββ persistence.rs # Session save/load
βββ ollama/
β βββ mod.rs # Module exports
β βββ client.rs # HTTP client
β βββ types.rs # API types
βββ ui/
βββ mod.rs # UI module, colors, styles
βββ layout.rs # Screen layout
βββ chat.rs # Chat area rendering
βββ input.rs # Input box rendering
βββ sidebar.rs # Session/model sidebar
βββ popup.rs # Modal dialogs
- Connect to local Ollama
- List available models
- Chat with streaming responses
- Multiple chat sessions
- Persistent config & sessions
- Basic keybindings
- System prompts per session
- Adjustable model parameters per session
- SQLite backend for history
- Export chat to Markdown
- Token/latency statistics
- Vim-style keybindings
- Search within chat
- RAG support with local files
- Image/multimodal support
π±οΈ Mouse Navigation Support β Fixes #1
- Click to switch sessions: Click any session in the sidebar to switch to it
- Click to focus input: Click the input area to enter editing mode
- Click model box: Click the model info box to open the model selector
- Scroll with mouse wheel: Scroll through chat history using the mouse wheel
- Click to dismiss popups: Click anywhere to close help, model selector, or delete confirmation popups
- Configuration option
mouse_supportto enable/disable (enabled by default)
Commit: 99ba6db
- Initial release on crates.io
- Chat with local Ollama models
- Multiple persistent sessions
- Vim-style keybindings
- Streaming responses
- TOML configuration
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.

