Run a TUI (terminal user interface) application with real-time delta processing
Project description
TUI Delta
Run a TUI application (AI assistant sessions, et al) with real-time delta processing for monitoring and logging. Supports Claude Code.
A general-purpose TUI capture and logging utility created for efficiently logging AI assistant interactive sessions.
Why tui-delta? Simpler utilities that strip screen control sequences result in substantial content loss. tui-delta intelligently processes terminal output to preserve all meaningful deltas while removing only redundancies, creating clean, complete logs suitable for real-time monitoring and archival.
Fully supports Claude Code; other AI assistants (Cline, Cursor, Aider) are expected to work with profile customization.
Installation
Requirements: Python 3.9+, syslog-ng 4.10.1+
⚠️ Important:
tui-deltarequires syslog-ng to be installed from official repositories (distro defaults may be incompatible).See SYSLOG_NG_INSTALLATION.md for platform-specific instructions.
Via Homebrew (macOS + Linux) - Recommended
brew tap JeffreyUrban/tui-delta && brew install tui-delta
✅ Automatically installs syslog-ng as a dependency. Homebrew manages all dependencies and provides easy updates via brew upgrade.
Via pipx (Alternative)
⚠️ Manual Setup Required: You must install syslog-ng separately before using pipx.
# STEP 1: Install syslog-ng from official repos (REQUIRED)
# See docs/SYSLOG_NG_INSTALLATION.md for your platform
# STEP 2: Install tui-delta
pipx install tui-delta
pipx installs in an isolated environment with global CLI access. Update with pipx upgrade tui-delta.
Via pip
⚠️ Manual Setup Required: You must install syslog-ng separately before using pip.
# STEP 1: Install syslog-ng from official repos (REQUIRED)
# See docs/SYSLOG_NG_INSTALLATION.md for your platform
# STEP 2: Install tui-delta
pip install tui-delta
Use pip if you want to use tui-delta as a library in your Python projects.
From Source
# Development installation
git clone https://github.com/JeffreyUrban/tui-delta
cd tui-delta
pip install -e ".[dev]"
Windows
Windows is not currently supported. Consider using WSL2 (Windows Subsystem for Linux) and following the Linux installation instructions.
Requirements: Python 3.9+, syslog-ng (installed automatically with Homebrew)
Quick Start
Logging a Claude Code Session
# Run Claude Code with tui-delta processing
tui-delta --profile claude_code -- claude code
# Output streams to stdout in real-time
# You can pipe to logging tools, redirect to file, etc.
View Captured Logs
Logs preserve the original terminal appearance and are viewable with standard tools:
# View with less (supports colors and formatting)
less -R session.log
# Follow in real-time
tui-delta --profile claude_code -- claude code > session.log
# Monitor with tail
tui-delta --profile claude_code -- claude code > session.log &
tail -f session.log
Use Cases
- AI Assistant Logging - Capture Claude Code sessions (fully supported); others expected to work with custom profiles
- Real-time Monitoring - Stream processed output to monitoring tools while the session runs
- TUI Development - Debug terminal applications by seeing all content changes
- Education - Record and share AI-assisted coding sessions with clean, readable logs
How It Works
Unlike simpler approaches that strip control sequences (losing content), tui-delta intelligently processes terminal output to preserve all meaningful deltas:
- Capture - Uses
scriptto capture all terminal output including control sequences - Clear Detection - Identifies lines that were cleared/overwritten
- Consolidation - Outputs all meaningful changes, removing only redundant redraws
- Deduplication - Removes duplicate sequences using configurable patterns
- Streaming - All output streams in real-time to stdout for immediate use
Result: Complete, accurate logs of what happened in the session - not just the final terminal state.
tui-delta leverages patterndb-yaml for multi-line pattern recognition via syslog-ng, and uniqseq for deduplication of repeated content blocks.
Documentation
Read the full documentation at tui-delta.readthedocs.io
Key sections:
- Getting Started - Installation and quick start guide
- Use Cases - Real-world examples across different domains
- Guides - Profile selection and definition, common patterns
- Reference - Complete CLI and Python API documentation
Development
# Clone repository
git clone https://github.com/JeffreyUrban/tui-delta.git
cd tui-delta-workspace/tui-delta
# Install development dependencies
pip install -e ".[dev]"
# Complete initial project setup
# Prompt Claude Code: "Please perform Initial Project Kickoff"
# Run tests
pytest
# Run with coverage
pytest --cov=tui-delta --cov-report=html
Features
- Profile-based Processing - Pre-configured profiles for Claude Code, generic TUI apps, and minimal processing
- Custom Profiles - Define your own YAML profiles for different TUI applications
- Real-time Streaming - Output streams as the session runs, no buffering delays
- Preserves Appearance - Logs show content exactly as displayed in terminal
- Efficient Deduplication - Smart removal of redundant content while keeping ephemeral changes
- Unix Pipeline Friendly - Works with standard Unix tools
License
MIT License - See LICENSE file for details
Author
Jeffrey Urban
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tui_delta-0.1.0.tar.gz.
File metadata
- Download URL: tui_delta-0.1.0.tar.gz
- Upload date:
- Size: 482.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
411b24aea01846aa0c1f6fbb843c83503543d6fe7bec2898f736b613428f9257
|
|
| MD5 |
ed9bdadcf66610f7ae2ffb4995755ef1
|
|
| BLAKE2b-256 |
d0d795f8342e898cccd1ecfbd73b94da4980d88dce70f987a6627849305ce600
|
Provenance
The following attestation bundles were made for tui_delta-0.1.0.tar.gz:
Publisher:
release.yml on JeffreyUrban/tui-delta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tui_delta-0.1.0.tar.gz -
Subject digest:
411b24aea01846aa0c1f6fbb843c83503543d6fe7bec2898f736b613428f9257 - Sigstore transparency entry: 760635911
- Sigstore integration time:
-
Permalink:
JeffreyUrban/tui-delta@b64de9ee1fd1d310cb41842d7d552eabd049682b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JeffreyUrban
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b64de9ee1fd1d310cb41842d7d552eabd049682b -
Trigger Event:
release
-
Statement type:
File details
Details for the file tui_delta-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tui_delta-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3380e59e7e1961b228084e28df9084b2f992a3e643debe95b12743516d16feb7
|
|
| MD5 |
d65b7d3c69f91a34e7c7e56a2f0401cb
|
|
| BLAKE2b-256 |
eea6feb260c370666c6eae8c6ce1c58316c3e92de4df7e09cd16d6d6186ef1b0
|
Provenance
The following attestation bundles were made for tui_delta-0.1.0-py3-none-any.whl:
Publisher:
release.yml on JeffreyUrban/tui-delta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tui_delta-0.1.0-py3-none-any.whl -
Subject digest:
3380e59e7e1961b228084e28df9084b2f992a3e643debe95b12743516d16feb7 - Sigstore transparency entry: 760635915
- Sigstore integration time:
-
Permalink:
JeffreyUrban/tui-delta@b64de9ee1fd1d310cb41842d7d552eabd049682b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JeffreyUrban
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b64de9ee1fd1d310cb41842d7d552eabd049682b -
Trigger Event:
release
-
Statement type: