Skip to main content

vir-tui

A lightweight, terminal UI primitive library for the VirInvictus CLI toolchain.

Provides a raw TTY event loop, a grid-based menu renderer, robust cross-platform ANSI colors, input prompt lifecycles, and a fallback progress bar wrapper for CLI applications that run headless but offer an interactive terminal interface.

Powers CalibreQuarry and Lattice.

Python · stdlib

Features

  • Menus: full-screen arrow-key tui_select (sections, aliases, letter keys) with an automatic numbered text fallback when curses is unavailable; a scrollable, pannable results pager (tui_page) with / search and n/N match jumping.
  • Filtering: on menus of 15+ entries, typing narrows the view incrementally (case-insensitive; backspace edits, Esc clears); small menus keep the classic single-key semantics.
  • Mouse: click moves the selection, double-click selects, and the wheel scrolls menus and pages — best-effort, degrading silently to keyboard-only.
  • Theming: configure_theme(color_pairs=..., glyphs=...) lets a host remap the six semantic color pairs and the box glyphs per app, instead of mirroring ids or forking widgets.
  • Progress: progress_box() — a session-screen-aware curses progress box with a tqdm-like API and a pipe-safe text fallback.
  • Sessions: interactive_session() context manager owning the curses screen lifecycle (open, degrade, close, KeyboardInterrupt cleanup).
  • Formatters: consistent success, info, warn, error styling across apps.
  • Prompts: ask, ask_yn, confirm, prompt_int, prompt_float, prompt_out, prompt_path, plus out_note for "where did my report go" footers.
  • Capture: run_with_capture wrapper for redirecting stdout/stderr into a temporary scrolling buffer while a background task runs, rendering a header/footer on top.

Support

If vir-tui's useful to you and you'd like to chip in:

License

GPL-3.0-or-later.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vir_tui-2.3.0.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vir_tui-2.3.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file vir_tui-2.3.0.tar.gz.

File metadata

  • Download URL: vir_tui-2.3.0.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vir_tui-2.3.0.tar.gz
Algorithm Hash digest
SHA256 4799794fbc9d56fa4de298cb0b7d308f05080fe901b2ee0438a0a2d769c4b7d4
MD5 8e88227b2d0eea43987daefdaa1eff11
BLAKE2b-256 cc343d95d0a1fc0546a3f3aabdd46591de4d882c0df30b97516976e5dc9551b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vir_tui-2.3.0.tar.gz:

Publisher: publish.yml on VirInvictus/vir-tui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vir_tui-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: vir_tui-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vir_tui-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c2b78c38c00942f555a8384dd98cf64174ebee497ae5e14441b93cf0b77ff3e
MD5 959134e90bc5c3c6ccfe3ad680778af8
BLAKE2b-256 b6d70227818303144bcd69c032a7554f473740c4396e8dc343ef8a1bb8319de5

See more details on using hashes here.

Provenance

The following attestation bundles were made for vir_tui-2.3.0-py3-none-any.whl:

Publisher: publish.yml on VirInvictus/vir-tui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 files

2.2.0

2 files

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