Installation
libraryDependencies += "io.github.yuri4n" %% "tui4s-core" % "<version>"
tui4s-core gives the runner, TuiApp and the headless test kit in one dependency. Each artifact has its own version.
| Artifact | For |
|---|---|
io.github.yuri4n::tui4s-core | An app: tui4s-runner, tui4s-app and tui4s-testkit in one dependency. |
io.github.yuri4n::tui4s-runner | The terminal runner for kyo-ui: Tui.run, the components (Hooks, Component), the screen types. |
io.github.yuri4n::tui4s-app | TuiApp, the main class of an app. |
io.github.yuri4n::tui4s-testkit | tui4s.testkit.Headless, the headless test kit. |
io.github.yuri4n::tui4s-use | Composables over Kyo signals, for the JVM and Scala.js. |
io.github.yuri4n::tui4s-widgets | Widgets for the JVM and Scala.js, on tui4s-use. |
There is no ZIO or Cats Effect module. Issues #18 and #19 track them.
A library, or a main of its own with no TuiApp, can use the runner alone. Then add the test kit in the Test scope:
libraryDependencies += "io.github.yuri4n" %% "tui4s-runner" % "<version>"
libraryDependencies += "io.github.yuri4n" %% "tui4s-testkit" % "<version>" % Test
tui4s-core, tui4s-runner, tui4s-app and tui4s-testkit use the same packages (tui4s, tui4s.spi, tui4s.testkit), so the imports do not change.
Requirements
- JDK 25. Kyo 1.0.0-RC7 needs JDK 25 to compile and to run. Make sure that
java -versionshows 25. - Scala 3.9.0 or later.
- A deep compiler stack. Kyo's inline for-comprehensions need it. Put this line in the
.jvmoptsfile at the root of the build:
-Xss16m
Platforms
CI checks the real terminal path on Linux, with a pseudo-terminal (the PTY kit). CI does not check other platforms. Windows is experimental. tui4s reads the keyboard, a paste and a resize. It does not read the mouse.
Versions
Each module has its own version and its own release tag (<module>-v<version>). The versions follow early semantic versioning: 0.y.z to 0.y.(z+1) is binary compatible, and 0.y to 0.(y+1) can break binary compatibility.