x-dog

Tools for building AI agents and managing LLM deployments.

GitHub →

x-dog / Packages / tui / Features

What tui provides today. It is a library with one dependency (wcwidth); every capability below is importable from the package.

Engine

Differential renderer
Diffs frames and repaints only changed lines with synchronized output — no flicker.
Main-buffer rendering
No alternate screen; scrollback and history are preserved.
Overlays
Anchored, sized, margined floating panels with focus capture.
Frame-paced loop
~30 fps loop with resize detection and tick callbacks.
Hardware cursor placement
A CURSOR_MARKER APC sequence positions the real terminal cursor for focused inputs.

Input

Key parsing
xterm + Kitty keyboard protocol, press/repeat/release, modifiers, function keys, backtab.
Keybindings
Scoped KeybindingManager mapping key events to named actions.
Fuzzy match
fuzzy_match / fuzzy_filter for pickers and command palettes.
Autocomplete
AutocompleteEngine with filesystem and slash-command providers.

Components

Editor component
Multi-line editor with undo/redo (UndoStack) and an emacs kill-ring.
Markdown & Diff
Markdown rendering and a unified-diff component for tool output.
Inline images
Kitty / iTerm2 protocols with pure-Python PNG/JPEG/GIF/WebP sizing.
Select & settings lists
SelectList and SettingsList for menus and configuration UIs.
Wide-character aware
wcwidth-based width handling for CJK and emoji.