TUI LLM Chat
Open-WebUI for the terminal — multi-user LLM chat with knowledge collections, hybrid RAG, MCP tools, agents, and web search, all from a keyboard-driven TUI backed by a PocketBase server.
sha256:dd2f8aad…· 98.8 KBRecommended Stack
| Component | Role | Version | Notes |
|---|---|---|---|
| Go | Language | >=1.25 | Single static binary per OS; same language/toolchain as PocketBase (can share types, embed PB as a framework); mature TUI ecosystem. |
| Bubble Tea | TUI framework | latest | Elm-Architecture TUI from the Charm ecosystem; mature for interactive chat apps; pairs with lipgloss/gum/huh. |
| Lipgloss | Styling/layout | latest | Style and layout primitives for the TUI; maps DESIGN.md theme tokens to terminal colors. |
| crossterm | Terminal I/O backend | latest | Cross-platform input/output backend used by Bubble Tea. |
| PocketBase | Backend / BaaS | >=0.23 | Single-binary Go backend: embedded SQLite (WAL) + realtime subscriptions + auth + file storage + admin UI + REST API. Usable as a Go framework or a standalone container. Provides cross-device sync by centralizing all data. |
| SQLite | Database | latest | Embedded in PocketBase; stores all chats, messages, collections, documents, embeddings, configs, users. |
| sqlite-vec | Vector search (RAG) | latest | SQLite loadable extension adding vector similarity search inside PocketBase's SQLite; enables hybrid retrieval without a separate vector server. |
| FTS5 | Full-text search (RAG) | built into SQLite | Built into SQLite; BM25 full-text search paired with vector search for hybrid retrieval + reranking. |
| reqwest | HTTP client | latest | Calls OpenAI-compatible LLM/embeddings endpoints and the PocketBase REST API; supports streaming (SSE) for token-by-token rendering. |
Requirements
| API Key | Purpose | Free Tier |
|---|---|---|
| OpenAI | Chat targets **any OpenAI-compatible chat completions endpoint** (OpenAI, Ollama at | ✓ |
External Services
- SQLiteself-hostable
- Dockerself-hostable
- Ollamaself-hostable
Platform Notes
- •Requires Docker and Docker Compose
Data Model
user
PocketBase built-in auth user. First-class multi-user. Each user has onboarding state and per-user config.
onboarding_state
Per-user onboarding wizard progress (which steps completed). Tracked in DB so it survives cross-device.
config_category
Categorized settings group (General, Providers, Embeddings, Tools, Appearance, Notifications).
config
Per-user key/value setting. All app settings live here — never in local config files. Examples: active_provider_endpoint, active_model, theme, web_search_enabled.
provider
A configured OpenAI-compatible chat provider (endpoint URL, API key encrypted at rest, display name, available models discovered via /v1/models). Per-user.
embeddings_provider
A configured OpenAI-compatible embeddings endpoint. Per-user. RAG degrades gracefully when none configured.
conversation
A threaded chat conversation. Per-user. Has folder/tag/pin metadata.
conversation_tag
Tags on a conversation (many-to-many).
message
A message in a conversation thread. Role: user/assistant/system/tool. Supports parent message id for threading.
attachment
A file/image path attached to a message (vision models). Path is server-side under PocketBase file storage.
collection
A knowledge collection (group of documents) for RAG. Per-user. Attached to a conversation to scope retrieval.
collection_attachment
Many-to-many: which collections are attached to which conversations for scoped retrieval.
document
An uploaded file indexed into a collection. Has extraction status and source metadata.
document_chunk
A chunk of a document with its embedding vector (sqlite-vec) and an FTS5 full-text row for hybrid search.
memory
Per-user memory facts the model recalls across conversations. User can view/edit/delete.
agent
An AI agent preset: system prompt + bound tools + bound knowledge collections + model. Per-user.
prompt_template
A slash-command prompt template with typed input variables and a version. Per-user.
automation
A scheduled prompt that runs on a recurring schedule. Per-user. Has frequency, last_run, next_run, enabled.
api_key
A programmatic API key for the user (SHA-256 hashed; plaintext shown once). For scripting the chat.
tool_call
A record of a tool/function call made during a message (name, args, result, status). Enables audit and debugging.
mcp_server
A configured MCP server connection (Claude Desktop/Cursor-compatible schema). Per-user. Optional.
usage_log
Per-user usage tracking: requests, tokens, estimated cost over time.
External Dependencies
- 🔴pocketbaseserviceRequired
Backend for auth, realtime, file storage, and the SQLite database holding chats, collections, embeddings, and per-user settings. Deploy as the bundled scaffold container OR point the client at your own PocketBase instance.
- 🔴llm providerapiRequired
Any OpenAI-compatible chat completions endpoint (OpenAI, Anthropic via a compatibility layer, Ollama at :11434/v1, OpenRouter, vLLM, LM Studio, llama.cpp, etc.). User supplies their own key/endpoint during onboarding (BYOK).
- 🔴embeddings providerapiRequired
Any OpenAI-compatible embeddings endpoint (e.g. OpenAI text-embedding-3-small, or Ollama embeddings at :11434/v1). Required for knowledge collection indexing/RAG; degrades gracefully (RAG hidden) when not configured.
- 🟡dockerinfrastructureOptional
Optional — only if deploying the bundled PocketBase container from scaffold/. The client itself is a single static binary needing no Docker.
- 🟡smtp serverserviceOptional
Optional — for email-based password recovery and verification flows via PocketBase auth.
- 🟡mcp serverserviceOptional
Optional — any Model Context Protocol server the user wants the chat to be able to call (Claude Desktop/Cursor-compatible schema). Tools degrade gracefully when none configured.
Tags
Details
- Category
- utilities
- Difficulty
- high
- Version
- 1.0.2
- Published
- 8/4/2026
Related Blueprints
Coming soon...