Skip to main content

LIT TUI

A lightweight, fast, and beautiful terminal chat interface for Ollama with MCP (Model Context Protocol) integration.

LIT TUI Demo

✨ Features

  • 🚀 Fast: Starts in milliseconds, not seconds
  • 💡 Smart: Optional integration with system-prompt-composer for enhanced prompts
  • 🔧 Extensible: MCP integration for dynamic tool discovery and execution
  • 🎨 Beautiful: Rich terminal interface with syntax highlighting and native terminal appearance
  • ⌨️ Keyboard-first: Efficient navigation designed for developers
  • 📦 Lightweight: No Electron overhead - pure Python performance
  • 🔄 Cross-platform: Works on Linux, macOS, and Windows terminals

🚀 Quick Start

Installation

# Install from PyPI (when published)
pip install lit-tui

# Or install from source
git clone https://github.com/lit-ai/lit-tui.git
cd lit-tui
pip install -e .

Prerequisites

  • Python 3.8+
  • Ollama running locally
  • A terminal with Unicode support

Usage

# Start lit-tui
lit-tui

# Or with specific model
lit-tui --model llama2

# With debug logging
lit-tui --debug

🛠️ Configuration

lit-tui stores its configuration in ~/.lit-tui/config.json. On first run, it will create a default configuration.

Example Configuration

{
  "ollama": {
    "host": "http://localhost:11434",
    "default_model": "llama2"
  },
  "ui": {
    "font_size": "medium",
    "show_token_count": true
  },
  "storage": {
    "max_sessions": 100,
    "auto_save": true
  },
  "mcp": {
    "enabled": true,
    "servers": []
  }
}

🔧 MCP Integration

lit-tui supports the Model Context Protocol for dynamic tool integration:

{
  "mcp": {
    "enabled": true,
    "servers": [
      {
        "name": "filesystem",
        "command": "mcp-server-filesystem",
        "args": ["--root", "/home/user/projects"]
      },
      {
        "name": "git",
        "command": "mcp-server-git"
      }
    ]
  }
}

⌨️ Keyboard Shortcuts

Key Action
Ctrl+N New chat session
Ctrl+O Open session
Ctrl+Q Quit
ESC Quit with confirmation
Enter Send message
Shift+Enter New line in message
Ctrl+/ or F1 Show help

🎨 Appearance

lit-tui uses your terminal's default theme and colorscheme for a native look and feel. The interface features transparent backgrounds that blend seamlessly with your terminal environment, respecting your personal terminal configuration and color preferences.

🏗️ Architecture

lit-tui is designed as a reference implementation showcasing:

  • Clean async architecture using Python's asyncio
  • Direct protocol integration with Ollama and MCP
  • Terminal-native UI with Textual framework
  • Modular design with clear separation of concerns
  • Performance optimization for responsive chat experience

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

git clone https://github.com/Positronic-AI/lit-tui.git
cd lit-tui
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"
pre-commit install

Quick Development

# Use the development script for easy setup
./dev.sh

Running Tests

pytest

📄 License

MIT License - see LICENSE for details.

🙏 Acknowledgments


Made with ❤️ by LIT - Advancing the field of AI through open-source innovation

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lit_tui-0.1.0.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lit_tui-0.1.0-py3-none-any.whl (49.5 kB view details)

Uploaded Python 3

File details

Details for the file lit_tui-0.1.0.tar.gz.

File metadata

  • Download URL: lit_tui-0.1.0.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for lit_tui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 50d461d8d39f7bed93069afd47c2f9110385134afd88e47b6eb4fcc38377f496
MD5 a33d92b62b75aa11a160cbb3d4b80ecd
BLAKE2b-256 69384c98ccb1450ee02de725a9210aace504a46a780f5cc2919ea339fb5aff23

See more details on using hashes here.

File details

Details for the file lit_tui-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lit_tui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 49.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for lit_tui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1981efca0dc92558d304a33046389b4603708c403f0f319e6e3deb680f90a606
MD5 9357e6d01555529b82382e954db25503
BLAKE2b-256 afc5cc5fc1169852b6c851599f3b490b5cab7f9a6103040ce02ec44dc5b76189

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page