Skip to content

About turbodesk

turbodesk builds 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.4.2. 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.

The core holds about 5,100 lines and the widgets 4,500, 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 and which are still collecting the second caller that settles their shape. It also lists what is not an API at all.

Where it came from

Two complete applications were built alongside it, as fully worked examples that are also meant to be used:

  • Turbo Python, a Borland-shaped IDE with 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 wanted first. On PyPI as turbopython-ide.
  • TurboVI, a vi clone that uses no widgets at all. Views, events and hooks take it from the operator-motion grammar through find-in-project to a quickfix list, which shows that the core can hold up a real application on its own. On PyPI as turbovi.

Both became separate products at 0.3. Each is one uvx away: the home page has the commands and the screens. 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 the documentation is checked

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 page 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.