- Interactive Chat: Chat with any Ollama model in a clean TUI
- Real-time Streaming: Tokens appear as they're generated from the LLM
- Animated Spinner: Smooth thinking animation while waiting for responses
- Non-blocking UI: The interface stays responsive during generation
- Model Fine-tuning: Configure temperature, top_p, top_k, context window, system prompts, and more
- Chat Management: Save, load, and clear chat sessions
- Copy/Paste Support: Select and copy messages to clipboard
- System Monitor: Real-time CPU, Memory, GPU monitoring with top processes
- Model Management: Switch between installed models on the fly
- Model Downloads: Download new models directly from the TUI
- Docker Support: Run Ollama in a Docker container with GPU acceleration
- Keyboard Navigation: Fully keyboard-driven interface
- Vim Motions: Easy navigation with familiar keybingdings
- Rust (2021 edition or later)
- Docker and Docker Compose (for containerized Ollama)
- Or Ollama installed locally
# Start Ollama container
docker-compose up -d
# Pull a model (do this once)
docker exec -it ollama ollama pull llama2:latest# Build the application
cargo build --release
# Run the application
cargo run --releaseChat Mode:
- ** Moved to vim motions for navigation will update soon F1 to list keybind and help for now
- Type your message and press
Enterto send Up/Down- Scroll through chat historyF1- Show helpF2- Open model selectionF3- Download new modelF4- Open system monitorF5- Browse chat historyF6- Save current chatF7- Clear current chatF8- Open model configurationCtrl+S- Select last messageCtrl+Y- Copy selected message to clipboardCtrl+C- Quit application
Model Selection Mode:
Up/Down- Navigate modelsEnter- Select modelEsc- Return to chat
Model Download Mode:
- Type the model name (e.g.,
llama2:latest,mistral:latest) Enter- Start downloadEsc- Cancel
System Monitor Mode:
- Shows real-time CPU, Memory, GPU stats and top processes
Up/Down- Scroll through process list- Updates every 100ms
Esc- Return to chat
Chat History Mode:
Up/Down- Navigate saved chatsEnter- Load selected chatEsc- Return to chat
Model Configuration Mode (F8):
Up/DownorTab- Navigate between fields- Type value and press
Enter- Update field - Auto-saves on Enter
Esc- Return to chat
- Temperature (0.0-2.0): Controls randomness. Lower = more focused, Higher = more creative
- Top P (0.0-1.0): Nucleus sampling for diversity control
- Top K (1+): Limits token selection to top K options
- Repeat Penalty (0.0-2.0): Penalizes repetition. Higher = less repetition
- Context Window (512-32768): Number of tokens in context
- System Prompt: Custom instructions for the model's behavior
The docker-compose.yml file sets up Ollama with:
- Port 11434 exposed for API access
- Persistent volume for model storage
- GPU support enabled by default (uses all available NVIDIA GPUs)
GPU support is already enabled in the docker-compose.yml file. To use it, you need:
- NVIDIA GPU in your system
- NVIDIA drivers installed on your host
- NVIDIA Container Toolkit installed
# Check if GPU is available in container
docker exec -it ollama nvidia-smi
# You should see your GPU listedIf you don't have a GPU or want to use CPU only, comment out the deploy section in docker-compose.yml.
# View logs
docker-compose logs -f
# Stop Ollama
docker-compose down
# Stop and remove volumes (deletes downloaded models)
docker-compose down -v
# Pull models manually
docker exec -it ollama ollama pull <model-name>
# List installed models
docker exec -it ollama ollama listIf Ollama is running on a different host, modify the Ollama connection in src/main.rs:
let ollama = Ollama::new("http://your-host:11434".to_string());Connection refused error:
- Ensure Ollama is running:
docker-compose ps - Check if port 11434 is accessible:
curl http://localhost:11434/api/tags
- Chat sessions:
~/.ollama_tui/chats/- Saved when you press F6 - Model config:
~/.ollama_tui/model_config.json- Auto-saved when you edit settings
Each chat session includes timestamp, model used, and all messages. Model configuration persists across sessions and is automatically loaded on startup.
# Build optimized binary
cargo build --release
## Support
If you encounter any issues or have questions:
- [Report a bug](https://github.com/yourusername/ollama-tui/issues/new?template=bug_report.md)
- [Request a feature](https://github.com/yourusername/ollama-tui/issues/new?template=feature_request.md)
- [Start a discussion](https://github.com/yourusername/ollama-tui/discussions)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---