From the collection

vir-tui

Python · stdlib · active · v2.5.0

Every CLI in the collection shares one set of terminal manners, and this is where they live. vir-tui is the primitive library under CalibreQuarry, lattice-music, and bindery-cli: a curses-based interactive menu with type-to-filter and mouse support, a scrollable results pager, boxed input prompt lifecycles, ANSI styling that honours NO_COLOR and stays off when stdout is piped, and a session-aware progress box. CalibreQuarry and lattice-music run their full interactive sessions through it; bindery-cli takes the formatters and the tqdm re-export.

The degradation is the design constraint everything else serves: every widget falls back to plain text when there is no curses or no TTY. Menus become numbered typed lists, the pager prints, prompts read stdin, and progress goes silent, so the same tool works as a full-screen session or inside a script without forking the code. There are no dependencies: when tqdm is installed it is re-exported, otherwise a minimal stub stands in. Python 3.14 and up, fully type-annotated, ships a py.typed marker.

← Return to the codex