A sophisticated Terminal User Interface (TUI) application built with the Textual framework for interacting with various Large Language Model APIs. The product is organized around a chat-first master shell: the Console is the main work surface, with Home (triage/status) and Library (notes, media, study, ingestion, search) as the other top-priority destinations, alongside supporting surfaces (Personas, Artifacts, Watchlists, and model/agent tools) that hand context back into the active conversation.
tldw_chatbook is in active development (currently v0.1.8.0, pre-1.0). The dev branch has landed a major UI/navigation overhaul that reorganizes the app around a master shell with a small set of primary destinations instead of a flat tab bar. Older tabs (Chat, Notes, Media, Ingest, Search, Coding, Characters/Prompts, Subscriptions, Chatbooks) remain reachable as routes/aliases during migration, but are no longer separate primary destinations.
Highlights:
Ctrl+K), quick model popover (Alt+M), and direct copy/edit/regenerate on messages. The left rail is organized into collapsible Session / Context / Model / Details sections with auto-titled, recent-first conversations.Design specs for the overhaul live in Docs/superpowers/specs/ — see 2026-07-02-console-dual-audience-ux-design.md and 2026-07-04-home-library-redesign-design.md.
# Clone the repository
git clone https://github.com/rmusser01/tldw_chatbook
cd tldw_chatbook
# Create virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install core package
pip install -e .
# Run the application
tldw-cli
# Or:
python3 -m tldw_chatbook.app
# Run in web browser (requires 'web' feature)
pip install -e ".[web]"
tldw-cli --serve
# Or use dedicated command:
tldw-serve --port 8080
The core local-first app installs with pip install -e . and includes the Textual shell, Console, local conversations, notes, personas, Library browsing, Chatbook artifacts, and settings. Missing optional extras should be treated as unavailable advanced capabilities, not as a broken core install.
For packaged installs, use:
pip install tldw_chatbook
The application supports several advanced optional capability groups that can be installed based on your needs. Source checkouts use pip install -e ".[extra]"; packaged installs use commands such as pip install "tldw_chatbook[embeddings_rag]".
# RAG (Retrieval-Augmented Generation) support
pip install -e ".[embeddings_rag]"
pip install "tldw_chatbook[embeddings_rag]"
# Advanced text chunking and language detection
pip install -e ".[embeddings_rag,chunker]"
# Web search and scraping capabilities
pip install -e ".[websearch]"
# All optional features
pip install -e ".[embeddings_rag,chunker,websearch,audio,video,pdf,ebook,nemo,mcp,chatterbox,local_tts,higgs_tts,ocr_docext,debugging,mlx_whisper,diarization,coding_map,local_vllm,local_mlx,local_transformers,web]"
# Common feature combinations
pip install -e ".[audio,video]" # Media transcription (includes faster-whisper)
pip install -e ".[pdf,ebook]" # Document processing
pip install -e ".[embeddings_rag,audio]" # RAG + transcription
pip install -e ".[local_tts,chatterbox]" # Text-to-speech
pip install -e ".[higgs_tts]" # Higgs Audio V2 TTS (high-quality, voice cloning)
pip install -e ".[mcp]" # Model Context Protocol integration
pip install -e ".[web]" # Web server for browser-based access
# Transcription providers (choose one):
pip install -e ".[transcription_faster_whisper]" # Default, works on all platforms
pip install -e ".[transcription_lightning_whisper]" # Apple Silicon optimized
pip install -e ".[transcription_parakeet]" # Real-time ASR for Apple Silicon
# For Apple Silicon users wanting better performance:
pip install -e ".[audio,transcription_lightning_whisper]" # Audio + optimized transcription
pip install -e ".[video,transcription_parakeet]" # Video + real-time transcription
# Development installation
pip install -e ".[dev]"
Advanced optional capability groups:
| Feature Group | Capability Area | Enables | Key Dependencies |
|---|---|---|---|
embeddings_rag | RAG and retrieval | Vector search, semantic similarity, hybrid RAG | torch, transformers, sentence-transformers*, chromadb* |
chunker | RAG and retrieval | Advanced text chunking, language detection | nltk, langdetect, jieba, fugashi |
websearch | Server/research | Web search and scraping | beautifulsoup4, playwright, trafilatura |
coding_map | Local inference | Code analysis features | grep_ast, pygments |
local_vllm | Local inference | vLLM inference support | vllm |
local_mlx | Local inference | MLX inference (Apple Silicon) | mlx-lm |
transcription_faster_whisper | Media ingestion and transcription | CPU/CUDA optimized Whisper transcription | faster-whisper |
transcription_lightning_whisper | Media ingestion and transcription | Apple Silicon optimized Whisper | lightning-whisper-mlx |
transcription_parakeet | Media ingestion and transcription | Real-time ASR for Apple Silicon | parakeet-mlx |
mlx_whisper | Media ingestion and transcription | Legacy: Both Apple Silicon transcription providers | lightning-whisper-mlx, parakeet-mlx |
audio | Media ingestion and transcription | Audio processing with transcription | faster-whisper, soundfile, yt-dlp |
video | Media ingestion and transcription | Video processing with transcription | faster-whisper, soundfile, yt-dlp |
media_processing | Media ingestion and transcription | Combined audio/video processing | faster-whisper, soundfile, yt-dlp |
pdf | Media ingestion and transcription | PDF text extraction | pymupdf, docling |
ebook | Media ingestion and transcription | E-book processing | ebooklib, beautifulsoup4, defusedxml |
nemo | Media ingestion and transcription | NVIDIA Parakeet ASR models | nemo-toolkit[asr] |
local_transformers | Local inference | HuggingFace transformers | transformers |
mcp | MCP integration | Model Context Protocol integration | mcp |
chatterbox | Media ingestion and transcription | Chatterbox TTS model support | chatterbox |
local_tts | Media ingestion and transcription | Local TTS models (Kokoro ONNX) | kokoro-onnx, scipy, pyaudio |
ocr_docext | Media ingestion and transcription | OCR and document extraction | docext, gradio_client |
debugging | Server/research | Metrics and telemetry | prometheus-client, opentelemetry-api |
diarization | Media ingestion and transcription | Speaker diarization for audio | torch, torchaudio, speechbrain |
web | Web access | Web server for browser access | textual-serve |
*Note: sentence-transformers and chromadb are detected separately and installed automatically when needed.
The application supports multiple transcription providers. By default, audio, video, and media_processing extras include faster-whisper which works on all platforms. For better performance on specific hardware:
# Default installation (includes faster-whisper)
pip install -e ".[audio]"
# Replace default with Apple Silicon optimized provider
pip install -e ".[audio,transcription_lightning_whisper]"
# Add additional provider alongside default
pip install -e ".[audio,transcription_parakeet]"
# Install only a specific provider (no audio/video processing libs)
pip install -e ".[transcription_parakeet]"
Note for Apple Silicon users: For the MLX-based providers, you may need to install with --no-deps and handle the tiktoken dependency separately if you encounter build errors.
Higgs Audio V2 is a state-of-the-art TTS system with zero-shot voice cloning capabilities. Due to its architecture, it requires manual installation from GitHub before using the pip extras.
Option 1: Automated Installation (Recommended)
# Unix/Linux/macOS
./scripts/install_higgs.sh
# Windows
scripts\install_higgs.bat
Option 2: Manual Installation
git clone https://github.com/boson-ai/higgs-audio.git
cd higgs-audio
pip install -r requirements.txt
pip install -e .
cd ..
pip install -e ".[higgs_tts]"
python scripts/verify_higgs_installation.py
If you get ImportError: boson_multimodal not found, ensure you completed step 1
For CUDA support, install PyTorch with CUDA before step 1
On macOS, you may need to install additional audio libraries: brew install libsndfile
For detailed Higgs configuration and usage, see Docs/Higgs-Audio-TTS-Guide.md.
config.toml
~/.config/tldw_cli/config.toml~/.local/share/tldw_cli/The screen shell is organized around a master shell of primary destinations (not a flat, equal-weight tab bar). Listed in navigation order:
Migration note: legacy tabs —
Chat(now Console),Notes,Media,Ingest,Search,Coding,Characters/Prompts(now Personas),Subscriptions(now Watchlists), andChatbooks(now under Artifacts) — still resolve as routes/aliases, but are no longer separate primary destinations.Codingin particular is now a thin compatibility stub; agentic programming happens in the Console.
enable_chat_tabs = true in config)Even without optional dependencies, you get:
embeddings_rag)Installing pip install -e ".[embeddings_rag]" adds:
# Set environment variable
export USE_MODULAR_RAG=true
# Or in config.toml: use_modular_service = true
The embeddings_rag module comes with sensible defaults that work out of the box:
mxbai-embed-large-v1 (1024 dimensions) - high-quality embeddingsCommon embedding models are pre-configured:
mxbai-embed-large-v1 (~335MB, 1024d, supports 512d/256d)stella_en_1.5B_v5 (~1.5GB, 512-8192d, security-pinned)qwen3-embedding-4b (~4GB, up to 4096d, 32k context)e5-small-v2, all-MiniLM-L6-v2 (~100MB, 384d)e5-base-v2, all-mpnet-base-v2 (~400MB, 768d)e5-large-v2, multilingual-e5-large-instruct (~1.3GB, 1024d)See tldw_chatbook/Config_Files/EMBEDDING_DEFAULTS_README.md for detailed configuration options.
chunker)A comprehensive LLM benchmarking framework supporting:
Programmatic API for ingesting files without UI interaction:
See tldw_chatbook/Local_Ingestion/README.md for API documentation.
All chat features listed here work with the core installation:
Advanced Features:
Core features:
Enhanced with optional dependencies:
embeddings_rag)websearch)chunker)websearch)audio or nemo)nemo)video)pdf): Text, layout, and metadata extraction using PyMuPDF and Doclingebook): EPUB, MOBI, AZW processingCore support (no extra deps):
Enhanced support (with optional deps):
local_vllm): High-performance inferencelocal_mlx): Optimized for Apple Siliconlocal_transformers): HuggingFace modelsManagement features:
Comprehensive TTS support with multiple backends:
local_tts): Local neural TTS with no internet requiredchatterbox): Advanced local TTS modelWith the mcp optional dependency:
[mcp] section in config.tomlocr_docext)debugging)Customizable splash screens with 50+ animation effects:
[splash_screen] section in config.tomlFor detailed customization, see the Splash Screen Guide.
On first run, the application will:
~/.config/tldw_cli/config.toml~/.local/share/tldw_cli/Edit ~/.config/tldw_cli/config.toml to:
Example embedding configuration:
[embedding_config]
default_model_id = "mxbai-embed-large-v1" # High-quality default
[rag.embedding]
model = "mxbai-embed-large-v1"
device = "auto" # Auto-detects best device (cuda/mps/cpu)
Example audio transcription configuration:
[transcription]
# Use NVIDIA Parakeet for low-latency transcription
default_provider = "parakeet" # Options: faster-whisper, qwen2audio, parakeet
default_model = "nvidia/parakeet-tdt-1.1b" # TDT model for streaming
device = "cuda" # Use GPU for faster processing
use_vad_by_default = true # Voice Activity Detection
Example TTS configuration:
[tts]
default_backend = "openai" # Options: openai, elevenlabs, kokoro, chatterbox
default_voice = "alloy" # Backend-specific voice ID
auto_play = true # Play audio automatically after generation
[tts.kokoro]
model_path = "models/kokoro-v0_19.onnx" # Path to local model
voice = "af_bella" # Available voices vary by model
Example MCP configuration:
[mcp]
enabled = true
server_port = 3000
allowed_tools = ["search", "rag", "media_ingest"]
Example splash screen configuration:
[splash_screen]
enabled = true
duration = 3.0
card_selection = "random" # Options: random, sequential, or specific card name
active_cards = ["default", "cyberpunk", "minimalist"]
animation_speed = 1.0
Example web server configuration:
[web_server]
enabled = true
host = "localhost" # Use "0.0.0.0" to allow external access
port = 8000
title = "tldw chatbook"
debug = false
API keys can also be set via environment variables:
OPENAI_API_KEYANTHROPIC_API_KEYCOHERE_API_KEYLocated at ~/.local/share/tldw_cli/:
ChaChaNotes.db: Conversations, characters, and notesmedia_v2.db: Ingested media files and metadataprompts.db: Saved prompt templatesrag_indexing.db: RAG indexing state (if using RAG features)evals.db: Evaluation results and benchmarkssubscriptions.db: Content subscription trackingsearch_history.db: Search query historyThe application can be run in a web browser using the optional textual-serve integration. This allows you to access the full TUI interface through any modern web browser, making it accessible from devices without terminal access or when SSH is not available.
pip install -e ".[web]"
tldw-cli --serve
# With custom options:
tldw-cli --serve --host 0.0.0.0 --port 8080
tldw-serve
# With options:
tldw-serve --host 0.0.0.0 --port 8080 --title "My TUI App"
--host: Host address to bind to (default: localhost)--port: Port number to bind to (default: 8000)--web-title / --title: Custom title for the web page--debug: Enable debug mode (only for tldw-serve)localhost for local access only--host 0.0.0.0 but ensure proper firewall configurationIf you previously installed using requirements.txt:
# Uninstall old dependencies
pip uninstall -r requirements.txt -y
# Install using pyproject.toml
pip install -e . # or with optional features
└── ./
└── tldw_chatbook
├── assets
│ └── Static Assets
├── Character_Chat
│ └── Libraries relating to character chat functionality/interactions
├── Chat
│ └── Libraries relating to chat functionality/orchestrations
├── Chunking
│ └── Libraries relating to chunking text for LLMs
├── Coding
│ └── Code assistance and mapping functionality
├── Config_Files
│ └── Configuration templates and defaults
├── css
│ ├── core/ # Base styles and variables
│ ├── components/ # Component-specific styles
│ ├── features/ # Feature-specific styles
│ ├── layout/ # Layout and grid systems
│ ├── utilities/ # Utility classes
│ └── Themes/ # Theme definitions
├── DB
│ └── Core Database Libraries (7 specialized databases)
├── Embeddings
│ └── Embeddings Generation & ChromaDB Libraries
├── Evals
│ └── Comprehensive evaluation system components
├── Event_Handlers
│ ├── Chat_Events
│ │ └── Handle all chat-related events
│ ├── LLM_Management_Events
│ │ └── Handle all LLM management-related events
│ └── Event Handling for all tabs and features
├── Helper_Scripts
│ ├── Character_Cards/ # Sample character cards
│ └── Prompts/ # Extensive prompt library
├── LLM_Calls
│ └── Libraries for calling LLM APIs (Local and Commercial)
├── Local_Inference
│ └── Libraries for managing local inference of LLMs
├── Local_Ingestion
│ └── Programmatic file ingestion API
├── MCP
│ └── Model Context Protocol server and client implementation
├── Metrics
│ └── Library for instrumentation/tracking (local) metrics
├── Notes
│ └── Libraries for notes management and synchronization
├── Prompt_Management
│ └── Libraries for managing prompts interactions and storage
├── RAG_Search
│ └── Libraries for RAG (Retrieval-Augmented Generation) search
├── Screens
│ └── Complex UI screen implementations
├── Third_Party
│ └── All third-party libraries integrated
├── tldw_api
│ └── Code for interacting with the tldw API
├── Tools
│ └── Tool calling system implementation
├── TTS
│ └── Libraries for Text-to-Speech functionality
├── UI
│ └── Libraries containing all screens and panels for the TUI
├── Utils
│ └── All utility libraries (encryption, splash, validation, etc.)
├── Web_Scraping
│ └── Libraries for web scraping and search functionality
├── Widgets
│ └── Reusable TUI components/widgets
├── app.py - Main application entry point
├── config.py - Configuration management library
├── Constants.py - Constants used throughout the application
└── model_capabilities.py - Model capability detection
For commercial API usage for use with this project: Claude Sonnet 3.5, Cohere Command R+, DeepSeek, gpt4o. Flipside I would say none, honestly. The (largest players) will gaslight you and charge you money for it. Fun. That being said they obviously can provide help/be useful(helped me make this app), but it's important to remember that they're not your friend, and they're not there to help you. They are there to make money not off you, but off large institutions and your data. You are just a stepping stone to their goals.
From @nrose 05/08/2024 on Threads:
No, it’s a design. First they train it, then they optimize it. Optimize it for what- better answers?
No. For efficiency.
Per watt. Because they need all the compute they can get to train the next model.So it’s a sawtooth.
The model declines over time, then the optimization makes it somewhat better, then in a sort of
reverse asymptote, they dedicate all their “good compute” to the next bigger model.Which they then
trim down over time, so they can train the next big model… etc etc.
None of these companies exist to provide AI services in 2024. They’re only doing it to finance the
things they want to build in 2025 and 2026 and so on, and the goal is to obsolete computing in general
and become a hidden monopoly like the oil and electric companies.
2024 service quality is not a metric they want to optimize, they’re forced to, only to maintain some
directional income
dev branch, where development happens prior to being merged into main.This project is licensed under the GNU Affero General Public License v3.0 or later - see the LICENSE file for details.
For any questions, issues, or feature requests, please open an issue on the GitHub repository or contact me directly on the tldw_Project Discord or via the email in my profile.
3,233 commits
11 commits
Python
99.9%
A sophisticated Terminal User Interface (TUI) application built with the Textual framework for interacting with various Large Language Model APIs. The product is organized around a chat-first master shell: the Console is the main work surface, with Home (triage/status) and Library (notes, media, study, ingestion, search) as the other top-priority destinations, alongside supporting surfaces (Personas, Artifacts, Watchlists, and model/agent tools) that hand context back into the active conversation.
tldw_chatbook is in active development (currently v0.1.8.0, pre-1.0). The dev branch has landed a major UI/navigation overhaul that reorganizes the app around a master shell with a small set of primary destinations instead of a flat tab bar. Older tabs (Chat, Notes, Media, Ingest, Search, Coding, Characters/Prompts, Subscriptions, Chatbooks) remain reachable as routes/aliases during migration, but are no longer separate primary destinations.
Highlights:
Ctrl+K), quick model popover (Alt+M), and direct copy/edit/regenerate on messages. The left rail is organized into collapsible Session / Context / Model / Details sections with auto-titled, recent-first conversations.Design specs for the overhaul live in Docs/superpowers/specs/ — see 2026-07-02-console-dual-audience-ux-design.md and 2026-07-04-home-library-redesign-design.md.
# Clone the repository
git clone https://github.com/rmusser01/tldw_chatbook
cd tldw_chatbook
# Create virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install core package
pip install -e .
# Run the application
tldw-cli
# Or:
python3 -m tldw_chatbook.app
# Run in web browser (requires 'web' feature)
pip install -e ".[web]"
tldw-cli --serve
# Or use dedicated command:
tldw-serve --port 8080
The core local-first app installs with pip install -e . and includes the Textual shell, Console, local conversations, notes, personas, Library browsing, Chatbook artifacts, and settings. Missing optional extras should be treated as unavailable advanced capabilities, not as a broken core install.
For packaged installs, use:
pip install tldw_chatbook
The application supports several advanced optional capability groups that can be installed based on your needs. Source checkouts use pip install -e ".[extra]"; packaged installs use commands such as pip install "tldw_chatbook[embeddings_rag]".
# RAG (Retrieval-Augmented Generation) support
pip install -e ".[embeddings_rag]"
pip install "tldw_chatbook[embeddings_rag]"
# Advanced text chunking and language detection
pip install -e ".[embeddings_rag,chunker]"
# Web search and scraping capabilities
pip install -e ".[websearch]"
# All optional features
pip install -e ".[embeddings_rag,chunker,websearch,audio,video,pdf,ebook,nemo,mcp,chatterbox,local_tts,higgs_tts,ocr_docext,debugging,mlx_whisper,diarization,coding_map,local_vllm,local_mlx,local_transformers,web]"
# Common feature combinations
pip install -e ".[audio,video]" # Media transcription (includes faster-whisper)
pip install -e ".[pdf,ebook]" # Document processing
pip install -e ".[embeddings_rag,audio]" # RAG + transcription
pip install -e ".[local_tts,chatterbox]" # Text-to-speech
pip install -e ".[higgs_tts]" # Higgs Audio V2 TTS (high-quality, voice cloning)
pip install -e ".[mcp]" # Model Context Protocol integration
pip install -e ".[web]" # Web server for browser-based access
# Transcription providers (choose one):
pip install -e ".[transcription_faster_whisper]" # Default, works on all platforms
pip install -e ".[transcription_lightning_whisper]" # Apple Silicon optimized
pip install -e ".[transcription_parakeet]" # Real-time ASR for Apple Silicon
# For Apple Silicon users wanting better performance:
pip install -e ".[audio,transcription_lightning_whisper]" # Audio + optimized transcription
pip install -e ".[video,transcription_parakeet]" # Video + real-time transcription
# Development installation
pip install -e ".[dev]"
Advanced optional capability groups:
| Feature Group | Capability Area | Enables | Key Dependencies |
|---|---|---|---|
embeddings_rag | RAG and retrieval | Vector search, semantic similarity, hybrid RAG | torch, transformers, sentence-transformers*, chromadb* |
chunker | RAG and retrieval | Advanced text chunking, language detection | nltk, langdetect, jieba, fugashi |
websearch | Server/research | Web search and scraping | beautifulsoup4, playwright, trafilatura |
coding_map | Local inference | Code analysis features | grep_ast, pygments |
local_vllm | Local inference | vLLM inference support | vllm |
local_mlx | Local inference | MLX inference (Apple Silicon) | mlx-lm |
transcription_faster_whisper | Media ingestion and transcription | CPU/CUDA optimized Whisper transcription | faster-whisper |
transcription_lightning_whisper | Media ingestion and transcription | Apple Silicon optimized Whisper | lightning-whisper-mlx |
transcription_parakeet | Media ingestion and transcription | Real-time ASR for Apple Silicon | parakeet-mlx |
mlx_whisper | Media ingestion and transcription | Legacy: Both Apple Silicon transcription providers | lightning-whisper-mlx, parakeet-mlx |
audio | Media ingestion and transcription | Audio processing with transcription | faster-whisper, soundfile, yt-dlp |
video | Media ingestion and transcription | Video processing with transcription | faster-whisper, soundfile, yt-dlp |
media_processing | Media ingestion and transcription | Combined audio/video processing | faster-whisper, soundfile, yt-dlp |
pdf | Media ingestion and transcription | PDF text extraction | pymupdf, docling |
ebook | Media ingestion and transcription | E-book processing | ebooklib, beautifulsoup4, defusedxml |
nemo | Media ingestion and transcription | NVIDIA Parakeet ASR models | nemo-toolkit[asr] |
local_transformers | Local inference | HuggingFace transformers | transformers |
mcp | MCP integration | Model Context Protocol integration | mcp |
chatterbox | Media ingestion and transcription | Chatterbox TTS model support | chatterbox |
local_tts | Media ingestion and transcription | Local TTS models (Kokoro ONNX) | kokoro-onnx, scipy, pyaudio |
ocr_docext | Media ingestion and transcription | OCR and document extraction | docext, gradio_client |
debugging | Server/research | Metrics and telemetry | prometheus-client, opentelemetry-api |
diarization | Media ingestion and transcription | Speaker diarization for audio | torch, torchaudio, speechbrain |
web | Web access | Web server for browser access | textual-serve |
*Note: sentence-transformers and chromadb are detected separately and installed automatically when needed.
The application supports multiple transcription providers. By default, audio, video, and media_processing extras include faster-whisper which works on all platforms. For better performance on specific hardware:
# Default installation (includes faster-whisper)
pip install -e ".[audio]"
# Replace default with Apple Silicon optimized provider
pip install -e ".[audio,transcription_lightning_whisper]"
# Add additional provider alongside default
pip install -e ".[audio,transcription_parakeet]"
# Install only a specific provider (no audio/video processing libs)
pip install -e ".[transcription_parakeet]"
Note for Apple Silicon users: For the MLX-based providers, you may need to install with --no-deps and handle the tiktoken dependency separately if you encounter build errors.
Higgs Audio V2 is a state-of-the-art TTS system with zero-shot voice cloning capabilities. Due to its architecture, it requires manual installation from GitHub before using the pip extras.
Option 1: Automated Installation (Recommended)
# Unix/Linux/macOS
./scripts/install_higgs.sh
# Windows
scripts\install_higgs.bat
Option 2: Manual Installation
git clone https://github.com/boson-ai/higgs-audio.git
cd higgs-audio
pip install -r requirements.txt
pip install -e .
cd ..
pip install -e ".[higgs_tts]"
python scripts/verify_higgs_installation.py
If you get ImportError: boson_multimodal not found, ensure you completed step 1
For CUDA support, install PyTorch with CUDA before step 1
On macOS, you may need to install additional audio libraries: brew install libsndfile
For detailed Higgs configuration and usage, see Docs/Higgs-Audio-TTS-Guide.md.
config.toml
~/.config/tldw_cli/config.toml~/.local/share/tldw_cli/The screen shell is organized around a master shell of primary destinations (not a flat, equal-weight tab bar). Listed in navigation order:
Migration note: legacy tabs —
Chat(now Console),Notes,Media,Ingest,Search,Coding,Characters/Prompts(now Personas),Subscriptions(now Watchlists), andChatbooks(now under Artifacts) — still resolve as routes/aliases, but are no longer separate primary destinations.Codingin particular is now a thin compatibility stub; agentic programming happens in the Console.
enable_chat_tabs = true in config)Even without optional dependencies, you get:
embeddings_rag)Installing pip install -e ".[embeddings_rag]" adds:
# Set environment variable
export USE_MODULAR_RAG=true
# Or in config.toml: use_modular_service = true
The embeddings_rag module comes with sensible defaults that work out of the box:
mxbai-embed-large-v1 (1024 dimensions) - high-quality embeddingsCommon embedding models are pre-configured:
mxbai-embed-large-v1 (~335MB, 1024d, supports 512d/256d)stella_en_1.5B_v5 (~1.5GB, 512-8192d, security-pinned)qwen3-embedding-4b (~4GB, up to 4096d, 32k context)e5-small-v2, all-MiniLM-L6-v2 (~100MB, 384d)e5-base-v2, all-mpnet-base-v2 (~400MB, 768d)e5-large-v2, multilingual-e5-large-instruct (~1.3GB, 1024d)See tldw_chatbook/Config_Files/EMBEDDING_DEFAULTS_README.md for detailed configuration options.
chunker)A comprehensive LLM benchmarking framework supporting:
Programmatic API for ingesting files without UI interaction:
See tldw_chatbook/Local_Ingestion/README.md for API documentation.
All chat features listed here work with the core installation:
Advanced Features:
Core features:
Enhanced with optional dependencies:
embeddings_rag)websearch)chunker)websearch)audio or nemo)nemo)video)pdf): Text, layout, and metadata extraction using PyMuPDF and Doclingebook): EPUB, MOBI, AZW processingCore support (no extra deps):
Enhanced support (with optional deps):
local_vllm): High-performance inferencelocal_mlx): Optimized for Apple Siliconlocal_transformers): HuggingFace modelsManagement features:
Comprehensive TTS support with multiple backends:
local_tts): Local neural TTS with no internet requiredchatterbox): Advanced local TTS modelWith the mcp optional dependency:
[mcp] section in config.tomlocr_docext)debugging)Customizable splash screens with 50+ animation effects:
[splash_screen] section in config.tomlFor detailed customization, see the Splash Screen Guide.
On first run, the application will:
~/.config/tldw_cli/config.toml~/.local/share/tldw_cli/Edit ~/.config/tldw_cli/config.toml to:
Example embedding configuration:
[embedding_config]
default_model_id = "mxbai-embed-large-v1" # High-quality default
[rag.embedding]
model = "mxbai-embed-large-v1"
device = "auto" # Auto-detects best device (cuda/mps/cpu)
Example audio transcription configuration:
[transcription]
# Use NVIDIA Parakeet for low-latency transcription
default_provider = "parakeet" # Options: faster-whisper, qwen2audio, parakeet
default_model = "nvidia/parakeet-tdt-1.1b" # TDT model for streaming
device = "cuda" # Use GPU for faster processing
use_vad_by_default = true # Voice Activity Detection
Example TTS configuration:
[tts]
default_backend = "openai" # Options: openai, elevenlabs, kokoro, chatterbox
default_voice = "alloy" # Backend-specific voice ID
auto_play = true # Play audio automatically after generation
[tts.kokoro]
model_path = "models/kokoro-v0_19.onnx" # Path to local model
voice = "af_bella" # Available voices vary by model
Example MCP configuration:
[mcp]
enabled = true
server_port = 3000
allowed_tools = ["search", "rag", "media_ingest"]
Example splash screen configuration:
[splash_screen]
enabled = true
duration = 3.0
card_selection = "random" # Options: random, sequential, or specific card name
active_cards = ["default", "cyberpunk", "minimalist"]
animation_speed = 1.0
Example web server configuration:
[web_server]
enabled = true
host = "localhost" # Use "0.0.0.0" to allow external access
port = 8000
title = "tldw chatbook"
debug = false
API keys can also be set via environment variables:
OPENAI_API_KEYANTHROPIC_API_KEYCOHERE_API_KEYLocated at ~/.local/share/tldw_cli/:
ChaChaNotes.db: Conversations, characters, and notesmedia_v2.db: Ingested media files and metadataprompts.db: Saved prompt templatesrag_indexing.db: RAG indexing state (if using RAG features)evals.db: Evaluation results and benchmarkssubscriptions.db: Content subscription trackingsearch_history.db: Search query historyThe application can be run in a web browser using the optional textual-serve integration. This allows you to access the full TUI interface through any modern web browser, making it accessible from devices without terminal access or when SSH is not available.
pip install -e ".[web]"
tldw-cli --serve
# With custom options:
tldw-cli --serve --host 0.0.0.0 --port 8080
tldw-serve
# With options:
tldw-serve --host 0.0.0.0 --port 8080 --title "My TUI App"
--host: Host address to bind to (default: localhost)--port: Port number to bind to (default: 8000)--web-title / --title: Custom title for the web page--debug: Enable debug mode (only for tldw-serve)localhost for local access only--host 0.0.0.0 but ensure proper firewall configurationIf you previously installed using requirements.txt:
# Uninstall old dependencies
pip uninstall -r requirements.txt -y
# Install using pyproject.toml
pip install -e . # or with optional features
└── ./
└── tldw_chatbook
├── assets
│ └── Static Assets
├── Character_Chat
│ └── Libraries relating to character chat functionality/interactions
├── Chat
│ └── Libraries relating to chat functionality/orchestrations
├── Chunking
│ └── Libraries relating to chunking text for LLMs
├── Coding
│ └── Code assistance and mapping functionality
├── Config_Files
│ └── Configuration templates and defaults
├── css
│ ├── core/ # Base styles and variables
│ ├── components/ # Component-specific styles
│ ├── features/ # Feature-specific styles
│ ├── layout/ # Layout and grid systems
│ ├── utilities/ # Utility classes
│ └── Themes/ # Theme definitions
├── DB
│ └── Core Database Libraries (7 specialized databases)
├── Embeddings
│ └── Embeddings Generation & ChromaDB Libraries
├── Evals
│ └── Comprehensive evaluation system components
├── Event_Handlers
│ ├── Chat_Events
│ │ └── Handle all chat-related events
│ ├── LLM_Management_Events
│ │ └── Handle all LLM management-related events
│ └── Event Handling for all tabs and features
├── Helper_Scripts
│ ├── Character_Cards/ # Sample character cards
│ └── Prompts/ # Extensive prompt library
├── LLM_Calls
│ └── Libraries for calling LLM APIs (Local and Commercial)
├── Local_Inference
│ └── Libraries for managing local inference of LLMs
├── Local_Ingestion
│ └── Programmatic file ingestion API
├── MCP
│ └── Model Context Protocol server and client implementation
├── Metrics
│ └── Library for instrumentation/tracking (local) metrics
├── Notes
│ └── Libraries for notes management and synchronization
├── Prompt_Management
│ └── Libraries for managing prompts interactions and storage
├── RAG_Search
│ └── Libraries for RAG (Retrieval-Augmented Generation) search
├── Screens
│ └── Complex UI screen implementations
├── Third_Party
│ └── All third-party libraries integrated
├── tldw_api
│ └── Code for interacting with the tldw API
├── Tools
│ └── Tool calling system implementation
├── TTS
│ └── Libraries for Text-to-Speech functionality
├── UI
│ └── Libraries containing all screens and panels for the TUI
├── Utils
│ └── All utility libraries (encryption, splash, validation, etc.)
├── Web_Scraping
│ └── Libraries for web scraping and search functionality
├── Widgets
│ └── Reusable TUI components/widgets
├── app.py - Main application entry point
├── config.py - Configuration management library
├── Constants.py - Constants used throughout the application
└── model_capabilities.py - Model capability detection
For commercial API usage for use with this project: Claude Sonnet 3.5, Cohere Command R+, DeepSeek, gpt4o. Flipside I would say none, honestly. The (largest players) will gaslight you and charge you money for it. Fun. That being said they obviously can provide help/be useful(helped me make this app), but it's important to remember that they're not your friend, and they're not there to help you. They are there to make money not off you, but off large institutions and your data. You are just a stepping stone to their goals.
From @nrose 05/08/2024 on Threads:
No, it’s a design. First they train it, then they optimize it. Optimize it for what- better answers?
No. For efficiency.
Per watt. Because they need all the compute they can get to train the next model.So it’s a sawtooth.
The model declines over time, then the optimization makes it somewhat better, then in a sort of
reverse asymptote, they dedicate all their “good compute” to the next bigger model.Which they then
trim down over time, so they can train the next big model… etc etc.
None of these companies exist to provide AI services in 2024. They’re only doing it to finance the
things they want to build in 2025 and 2026 and so on, and the goal is to obsolete computing in general
and become a hidden monopoly like the oil and electric companies.
2024 service quality is not a metric they want to optimize, they’re forced to, only to maintain some
directional income
dev branch, where development happens prior to being merged into main.This project is licensed under the GNU Affero General Public License v3.0 or later - see the LICENSE file for details.
For any questions, issues, or feature requests, please open an issue on the GitHub repository or contact me directly on the tldw_Project Discord or via the email in my profile.
3,233 commits
11 commits
Python
99.9%