libkoto
[ C++23 · Terminal UI library ]
You describe the whole screen from your own state. koto works out which cells changed and writes only those. No widget tree, no dependencies, one CMake target.
[ Proof · A dashboard in 12 lines ]
✓ Compiled & renderedListState hosts({"alpha", "beta", "gamma"});hosts.set_selected(1);std::vector<uint64_t> load = {2, 4, 3, 6, 8, 7, 5, 9, 6, 4, 7, 10};
auto [left, right] = Layout::horizontal<2>(frame.area(), {Constraint::percent(35), Constraint::fill()});List(hosts).title("Hosts").highlight_symbol("> ").border_style(BorderStyle::Rounded).draw(frame, left);
auto [top, bottom] = Layout::vertical<2>(right, {Constraint::fixed(3), Constraint::fill()});Box().title("CPU").border_style(BorderStyle::Rounded).draw(frame, top);Gauge().percent(64).label("64%").draw(frame, top.inset(1, 1, 1, 1));Box().title("Load").border_style(BorderStyle::Rounded).draw(frame, bottom);Sparkline().data(load).draw(frame, bottom.inset(1, 1, 1, 1));╭─ Hosts ───────────╮╭──────────────── CPU ────────────────╮│ alpha ││█████████████████64%███▋ ││> beta │╰─────────────────────────────────────╯│ gamma │╭─────────────── Load ────────────────╮│ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ▂▄▃▅▇▆▅█▅▄▆█│╰───────────────────╯╰─────────────────────────────────────╯The output above is not a mockup. It was produced by compiling and running that code against the library, and the build of this site fails if it goes stale.
[ Why koto ]
Small surface, no surprises.
Rendering01
No widget tree
State lives in your variables. Widgets are cheap values you draw each frame, so there is nothing to keep in sync.
Immediate mode →Output02
Only what changed
A double-buffered diff renderer writes changed cells inside a synchronized update, so frames are minimal and tear-free where supported.
The renderer →Input03
Mouse and focus built in
Every drawn cell carries an id, so clicks resolve to widgets, focus follows the mouse, and modal dialogs trap Tab.
Hit buffer →Quality04
Testable without a terminal
Draw into an in-memory frame and assert on plain text. Every example in these docs is tested that way.
Headless testing →[ Next ]
Ship a terminal app today.
Read Requirements, then Installation. The widget reference covers everything that ships: Box, Text, List, Tabs, Button, TextInput, TextArea, Gauge, Sparkline, Rule, Fill, Clear, Vbox and Hbox. koto targets Linux and needs GCC 13+ or Clang 16+; see Limitations & FAQ for what it does not do.