Skip to main content
SCALA 3 / TERMINAL UI

Terminal UI,written like Scala.

A reactive, batteries-included toolkit for terminal apps that feel designed—not assembled. Typed views, real widgets, expressive motion, and native binaries from one coherent stack.

$mvn"com.worxbend::tui-dsl:0.18.3"
01 PRODUCT SIGNAL
glyphora Scala terminal UI toolkit banner
⚡ reactive
✓ native-image
40+widgets
1DSL import
0reflection config
100%headless-testable
inspect the stack →
02 / CAPABILITIES

Less framework ceremony.
More terminal craft.

Each layer is useful alone. Together they cover the path from state mutation to the final ANSI diff—without reflection or a browser-shaped architecture.

01
⚡ REACTIVE CORE

State that redraws only what reads it.

Signal and Computed track dependencies while your view runs. Change a value; glyphora invalidates the right work without reducers, dispatch loops, or dependency arrays.

Signal[A]Computed[A]ReactiveScope
02
🧩 WIDGET ATLAS

A serious UI kit for a text grid.

Compose inputs, tables, markdown, trees, charts, forms, loading states, and rich layout primitives without leaving typed Scala.

40+ widgetsbraille chartscluster-safe input
03
⌘ APP CHROME

The shell is already wired.

Top bar, sidebar, status hints, themes, screen stacks, toasts, and a fuzzy command palette share one key registry.

Ctrl+Pscreenstoasts
04
✦ MOTION

Effects after render.

Fade, sweep, coalesce, dissolve, pulse, and typewriter transforms compose with easing—without contaminating widget logic.

sequenceparallelEasing
05
📦 NATIVE FIRST

Ship one fast binary.

GraalVM native-image works with --no-fallback and no reflect-config. Compile-time Scala 3 derivation keeps runtime honest.

GraalVMzero reflectfast start
06
🌍 TERMINAL TRUTH

Emoji, CJK, flags, and combining marks line up.

Unicode display width comes from generated UCD tables. Grapheme-aware measuring, wrapping, clipping, and editing are foundational—not patches.

ZWJ familiesCJKgraphemes
07
🧪 HEADLESS BY DESIGN

Test the app, not screenshots of the app.

Run complete input and render cycles against HeadlessBackend. Pilot types, clicks, resizes, waits, and exposes the terminal exactly as a user sees it.

PilotBufferAssertionsCI friendly
03 / ONE PIPELINE

From a signal to a terminal cell.

The runtime records signal reads, rebuilds the element tree, renders widgets into a headless buffer, and flushes only changed cells. The exact pipeline powers production and tests.

Walk through the architecture →
01Signaltracked state
02Elementtyped view tree
03Widgetbuffer render
04Diffchanged cells only
05ANSIyour terminal
04 / YOUR FIRST 10 MINUTES

Model. Compose. Ship.

Three ideas carry from a hello-world counter to dashboards, forms, file pickers, and full-screen tools.

01

Model

Put mutable values in Signal. Derive everything else with Computed.

val filter = Signal("")
02

Compose

Return an Element tree from view. Layout and style stay typed and local.

panel("Jobs")(dataTable(state))
03

Ship

Run on the JVM, test headlessly, or compile a zero-reflection native binary.

./mill app.nativeImage
05 / START HERE

A complete reactive app in one file.

Add one dependency, declare the keys, and return an element tree. The status bar is generated from the same bindings that dispatch commands.

  • ✓ no plugin or code generator
  • ✓ no UI thread ceremony
  • ✓ no runtime reflection
Counter.scalaScala 3
import io.worxbend.tui.dsl.*

class CounterApp extends TuiApp:
private val count = Signal(0)

override def bindings: KeyBindings = KeyBindings(
binding("+", "increment")(count.update(_ + 1)),
binding("q", "quit")(quit()),
)

def view(using ReactiveScope, Theme): Element =
scaffold(statusBar = Some(statusBar(bindings))) {
centered(34, 7) {
panel("Counter")(
text(s"count: ${count.get}").bold.fg(Color.Cyan),
text("press + to increment").dim,
).rounded
}
}

object Counter extends CounterApp
READY WHEN YOUR TERMINAL IS

Build something
glyphorious.