mosaic

Build terminal UIs for Kotlin applications using the Mosaic runtime.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ClankerGuru/opsx --skill mosaic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mosaic
Source: https://github.com/ClankerGuru/opsx/tree/main/cli/src/main/resources/content/skills/mosaic
Command: npx skills add https://github.com/ClankerGuru/opsx --skill mosaic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building rich terminal user interfaces in Kotlin can be error-prone and tedious when manual ANSI drawing and imperative updates are used. Mosaic provides a declarative runtime and a composable model to render terminal UIs reliably, with built-in state and effects management.

Core Features & Use Cases

  • Declarative UI tree: Text, Row, Column, Box, Spacer, Filler, Static for structured, dynamic UIs.
  • State and effects: remember, mutableStateOf, rememberCoroutineScope, LaunchedEffect, DisposableEffect for robust lifecycle management.
  • Keyboard input and layout: LocalTerminal access and modifiers for interactive prompts, dashboards, and live tailers.
  • Use cases: dashboards, progress renderers, live status displays, and CLI tools that need responsive UIs.

Quick Start

Create a Kotlin module, apply the Mosaic Gradle plugin, and run a simple dashboard using runMosaicBlocking to render the UI.

Frequently Asked Questions about mosaic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Kotlin terminal UI with declarative state management?

Build a Kotlin terminal UI using a declarative composable tree and coroutines to drive rendering. This approach replaces manual ANSI drawing with structured components like Text, Row, and Column for reliable dynamic interfaces.

What is the best way to handle keyboard input in a Kotlin CLI application?

Handle keyboard input in a Kotlin CLI by accessing LocalTerminal within the composable tree. This provides interactive prompt capabilities and modifier key detection for responsive terminal tools.

Can I use Jetpack Compose runtime concepts like remember and LaunchedEffect for terminal dashboards?

Use Compose runtime concepts like remember, mutableStateOf, and LaunchedEffect for terminal dashboards. The runtime supports robust lifecycle management and state observation to drive live status displays.

Does building terminal UIs in Kotlin require the Mosaic Gradle plugin?

Building terminal UIs requires the Mosaic Gradle plugin, Kotlin JVM, and the mosaic-runtime dependency. This setup enables runMosaicBlocking to render interactive dashboards and live monitors.

Why does my imperative terminal drawing code fail to update dynamic displays?

Imperative terminal drawing fails because manual ANSI updates are error-prone for dynamic displays. A declarative UI tree with built-in state management reliably renders live tailers and progress indicators.