finds.dev

JakeWharton/mosaic

Build terminal UI in Kotlin using Jetpack Compose

View on GitHub

★ 2,764KotlinApache-2.0updated Sep 2026

// the take

Mosaic lets you build terminal UIs in Kotlin using the Jetpack Compose compiler and runtime instead of a bespoke widget tree, so state changes redraw the screen the same way Compose redraws a UI on Android. It's aimed at Kotlin developers who already know Compose and want CLI tools with reactive layout instead of manually managing ANSI escape codes.

Reusing the actual Compose compiler/runtime for a non-UI target is a genuinely interesting piece of engineering, not just an API that mimics Compose syntax. It's Kotlin Multiplatform (JVM, Linux, macOS, mingw native targets), so the same composables run without a JVM if you build native binaries. The module split (runtime, animation, terminal, testing) means you can pull in an animation system or a standalone testing harness for asserting terminal output instead of building either yourself.

It's explicitly experimental (0.18.0, no 1.0), and the API surface (`mosaic-runtime.api`) will likely keep shifting. It only works in a real TTY — no Gradle `run`, no IntelliJ console — which makes iteration and debugging noticeably more friction than typical CLI dev. Docs are just KDoc plus five samples; there's no explanation of how layout/measurement diverges from Compose UI's, so you're reading source to understand constraints. And Compose's incremental-recomposition model is arguably overkill for most CLI tools that just print and exit — the value shows up mainly for interactive/long-running terminal apps.

We read the README, the directory tree and a key source file in September 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,764
Forks
103
Language
Kotlin
License
Apache-2.0
Last commit
23 Sep 2026

// nearby

If mosaic isn't quite it.

All repos →