Inspiration

Siglyph was inspired by pi-tui, a component-based terminal UI library used by modern developer tools. We wanted to bring similar editing and rendering capabilities to Scala 3 while keeping the library lightweight, Node-free, and usable on both the JVM and Scala Native.

What it does

Siglyph helps Scala applications build interactive terminal interfaces. It provides reusable components, typed keyboard input, Unicode-aware text editing, autocomplete, overlays, differential rendering, Markdown rendering, terminal image support, and JVM/Native terminal backends.

How we built it

We built Siglyph in Scala 3 around a small shared core. The core owns components, rendering, editing, and terminal abstractions, while platform-specific backends handle JVM stty integration and Scala Native POSIX terminal access. Optional Markdown, image, and helper-widget modules remain separate from the core.

We also built interactive demos, deterministic terminal recordings, and virtual-terminal tests. This let us test rendering and input behavior without depending entirely on a live terminal.

Challenges we ran into

Terminal programming is full of edge cases. Input can arrive as fragmented escape sequences, terminal capabilities vary, and a resize can invalidate a frame while it is being rendered.

Unicode editing was another major challenge. Cursor movement and deletion must work on user-visible grapheme clusters, not just bytes or individual code points. We addressed this with shared Unicode 17 grapheme data and conformance tests.

Supporting both the JVM and Scala Native also required clear boundaries between shared behavior and low-level terminal code.

Accomplishments that we're proud of

  • A dependency-light Scala 3 terminal UI library published for JVM and Scala Native use.
  • Typed input and structured render metadata instead of treating raw terminal escape strings as application data.
  • Unicode-aware editing, autocomplete, overlays, differential rendering, and virtual-terminal testing.
  • Optional Markdown and image modules that keep advanced features out of the core dependency surface.
  • Interactive demos that show prompt composition, file and tag completion, command palettes, and Unicode-safe input.

What we learned

We learned that reliable terminal UIs depend on explicit boundaries. Typed input is safer than raw escape sequences, structured terminal controls are safer than embedding protocol bytes in text, and a small testable core makes platform-specific work easier to manage.

We also learned that terminal UI quality depends on details users rarely see directly: grapheme-aware cursor behavior, safe resize handling, cleanup during shutdown, and correct rendering when terminal input or output is incomplete.

What's next for Siglyph

Siglyph is still pre-1.0. Next, we are focused on hardening pi-tui parity through real application use, stabilizing the public API, and validating autocomplete, selector, settings, and overlay behavior under more demanding workflows.

We are also exploring optional richer Markdown parsing, optional image scaling and transcoding, and further keyboard-protocol support where it can be implemented safely on both JVM and Scala Native.

Built With

Share this project:

Updates