# TUI (Terminal User Interface) pack

**URL:** <https://swi-prolog.discourse.group/t/tui-terminal-user-interface-pack/9868>\
**Category:** Announce\
**Created:** [October 19, 2026, 9:28pm UTC](https://swi-prolog.discourse.group/t/tui-terminal-user-interface-pack/9868 "2026-10-19T21:28:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![z5h](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/z5h/32/5445_2.png) [@z5h](https://swi-prolog.discourse.group/u/z5h)\
**Post date:** [October 19, 2026, 9:28pm UTC](https://swi-prolog.discourse.group/t/tui-terminal-user-interface-pack/9868/1 "2026-10-19T21:28:50Z")

</div>

I’ve published a TUI library.  
I did the design/prototyping/optimization of the MVP. Then worked with Claude Code to add features and polish before publishing.

Features include: TEA-inspired model/view/update · term-based views (rows, columns, tables, zones, align, ports, RGB styles) · components via alias\_drawable/2 + at\_event\_is/3 event bubbling · ready-made inputs, buttons, check boxes, scroll areas · optimized incremental painting · Kitty keyboard protocol · mouse · Kitty graphics images · subscriptions for timers and worker threads · headless “VCR” testing · swipl tui examples

 ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/4/41442b962f268868b812b4fddc51228148f55995.jpeg)  
 ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/8/89d2aed38a92a1e9887263c784007b8c4ada44c0.jpeg)

Installation:  
`?- pack_install(tui).`

List examples:  
`swipl tui examples`

Run a particular example:  
`swipl tui run gallery`

There’s a basic text editor example (called atto) capable of editing one file:  
`swipl tui run atto — path/to/some_file.pl`

Code is at [GitHub - z5h/prolog\_tui · GitHub](https://github.com/z5h/prolog_tui)

Care has been made to ensure tui is minimal, complete, stable and performant.

See this “LLM use” section at the end of the README for more notes on that topic. [GitHub - z5h/prolog\_tui · GitHub](https://github.com/z5h/prolog_tui#on-the-use-of-an-llm)

@jan:  
`swipl pack publish https://github.com/z5h/prolog_tui.git` registered the pack, but reported `Pack prolog_tui at version 0.1.0 failed for unknown reason (false)`.  
The repo name (prolog\_tui) differs from the pack name in pack.pl (tui). For a git URL, `pack_default_options/4` takes the pack name from the URL (git\_url(URL, Pack)). `register_downloads/2` then looks for prolog\_tui-Result in the server’s reply, which is keyed tui, so it reports failure although the server registered the pack.  
The installation plan shows the same confusion: “Install prolog\_tui at version 0.0.0”.  
What’s the best course of action here?
