Skip to main content

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.

PyPI version Tests codecov Python 3.9+ Documentation License: MIT

Installation

Requirements: Python 3.9+, syslog-ng 4.10.1+

⚠️ Important: tui-delta requires syslog-ng to be installed from official repositories (distro defaults may be incompatible).

See SYSLOG_NG_INSTALLATION.md for platform-specific instructions.

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:

  1. Capture - Uses script to capture all terminal output including control sequences
  2. Clear Detection - Identifies lines that were cleared/overwritten
  3. Consolidation - Outputs all meaningful changes, removing only redundant redraws
  4. Deduplication - Removes duplicate sequences using configurable patterns
  5. 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


Star on GitHub | Report Issues

Metadata

Release files for tui-delta 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tui-delta 0.2.0
File Size Uploaded Provenance Actions
tui_delta-0.2.0.tar.gz 586.8 kB With provenance Details for tui_delta-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tui-delta 0.2.0
File Interpreter ABI Platform Actions
tui_delta-0.2.0-py3-none-any.whl Python 3 none any Details for tui_delta-0.2.0-py3-none-any.whl

Total release size: 616.7 kB

Release files / tui_delta-0.2.0.tar.gz

Download URL tui_delta-0.2.0.tar.gz
Size 586.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0a78cc0a9ccdbc59491ec42dd3210eeb8c4a7fbcbae500804480ccc4a6a3b5ff
BLAKE2b-256 checksum
How to use checksums
9cd269ddbfdc8847235b08a58b9f3356b031ae0285bb3fb35eb2fa88c5a7514f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.

Transparency log

Release files / tui_delta-0.2.0-py3-none-any.whl

Download URL tui_delta-0.2.0-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35cf362cef34d0cfe42f9640b3f3567c1646092989f53c522560620f5925f347
BLAKE2b-256 checksum
How to use checksums
1d42b9896f3ee5be9b2dc4d4210b84dfbefe9de421f7192895bb6fc069946002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.

Transparency log

Security for tui-delta 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tui_delta-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page