Skip to content

About turbodesk

Terminal user interfaces as pure functions from state to an immutable view tree. An app is a function (UI) -> View; the runtime re-runs it whenever a frame is marked dirty and diffs the returned grid row by row.

The state of it

Version 0.3. One dependency (Rich, for glyph-width measurement and for drawing Rich renderables into a view), with Pygments behind an optional syntax extra. Python 3.12 or later. POSIX only: turbodesk uses termios and tty directly and there is no Windows support.

About 4,700 lines in the core and 4,400 in the widgets, under an Apache-2.0 licence.

What is stable is the page to read before you build on any of it. It says which names 1.0 will freeze, which are still collecting the second caller that settles their shape, and what is explicitly not an API at all.

Where it came from

Two complete applications were built on it while it was being written, and they are the reason most of the library exists:

  • Turbo Python, a Borland-shaped IDE — overlapping windows, a menu bar, a debugger and a language-server client. turbodesk.windows, widgets/menu, widgets/frame and turbodesk.shell are all things it needed first.
  • TurboVI, a vi clone that uses no widgets at all — views, events and hooks, nothing else. It is the proof that the core carries a real application on its own.

Both shipped as separate products at 0.3. A smaller showcase version of the editor stays in examples/.

Two ports from other frameworks came the other way, from Textual, and are what the comparison is grounded in. A library with one caller is a library shaped by one opinion; these are the second and third.

How it is kept honest

Documentation drifts, so several tests exist to stop it. Every ```python block in these pages, the README and the printed manual must parse and may only name attributes that exist. The widget catalogue's signatures are compared against inspect.signature. The examples inventory is checked against the files, and the widget gallery against a committed screen. A failure in any of them means the document is wrong, not the test.

Compared to other frameworks covers Textual, Rich, urwid and prompt_toolkit, including what you give up by having no stylesheet.