
Embeddable terminal sessions and UI components: terminal emulator with PTY transport, Compose-based terminal view, theme catalog, font handling, extra-keys bar, scroll indicator, jump-to-bottom.
Kotlin Multiplatform bindings for libghostty-vt on Android and the desktop JVM (Linux, macOS and Windows on x86_64 and aarch64): terminal sessions, a Compose Multiplatform terminal, a theme catalog, and font handling.
dependencies {
implementation("io.github.xchacha20-poly1305:libghostty:0.4.1")
// optional
implementation("io.github.xchacha20-poly1305:libghostty-extras:0.4.1")
implementation("io.github.xchacha20-poly1305:libghostty-compose:0.4.1")
}val session = GhosttyTerminalSession()
session.transport = myPty // sends input and window size to the program
// on the thread that reads the program's output:
session.feedOutput(bytes, 0, count)
// in Compose
val state = rememberGhosttyTerminalState()
Box(Modifier.fillMaxSize()) {
GhosttyTerminal(session, Modifier.fillMaxSize(), state = state)
// optional widgets; each uses only the public state, so any of them can be replaced by your own
GhosttyScrollIndicator(state, Modifier.align(Alignment.CenterEnd))
GhosttyJumpToBottomButton(state, Modifier.align(Alignment.BottomEnd).padding(16.dp))
}
GhosttyExtraKeysBar(state) // keys a software keyboard lacks, with sticky Ctrl and Alt
GhosttyDialogs(state)Download a demo uber jar from GitHub Releases.
Choose the jar matching your operating system and CPU architecture (for example, linux-x64,
macos-arm64, or windows-x64 in the filename). Each release includes builds for the three CI runner platforms.
Install Java 17 or newer with desktop support, then run the downloaded jar from a terminal:
java -jar demo-desktop-linux-x64-<version>.jarReplace the filename with the jar you downloaded. The jar includes the application dependencies and
native libraries; Java must be installed separately. It opens a terminal window running your $SHELL,
falling back to /bin/sh on Linux/macOS or cmd.exe on Windows.
To run from source:
./gradlew :demo-desktop:runEvery push to cmp publishes the -SNAPSHOT version to
https://central.sonatype.com/repository/maven-snapshots/.
MIT
Kotlin Multiplatform bindings for libghostty-vt on Android and the desktop JVM (Linux, macOS and Windows on x86_64 and aarch64): terminal sessions, a Compose Multiplatform terminal, a theme catalog, and font handling.
dependencies {
implementation("io.github.xchacha20-poly1305:libghostty:0.4.1")
// optional
implementation("io.github.xchacha20-poly1305:libghostty-extras:0.4.1")
implementation("io.github.xchacha20-poly1305:libghostty-compose:0.4.1")
}val session = GhosttyTerminalSession()
session.transport = myPty // sends input and window size to the program
// on the thread that reads the program's output:
session.feedOutput(bytes, 0, count)
// in Compose
val state = rememberGhosttyTerminalState()
Box(Modifier.fillMaxSize()) {
GhosttyTerminal(session, Modifier.fillMaxSize(), state = state)
// optional widgets; each uses only the public state, so any of them can be replaced by your own
GhosttyScrollIndicator(state, Modifier.align(Alignment.CenterEnd))
GhosttyJumpToBottomButton(state, Modifier.align(Alignment.BottomEnd).padding(16.dp))
}
GhosttyExtraKeysBar(state) // keys a software keyboard lacks, with sticky Ctrl and Alt
GhosttyDialogs(state)Download a demo uber jar from GitHub Releases.
Choose the jar matching your operating system and CPU architecture (for example, linux-x64,
macos-arm64, or windows-x64 in the filename). Each release includes builds for the three CI runner platforms.
Install Java 17 or newer with desktop support, then run the downloaded jar from a terminal:
java -jar demo-desktop-linux-x64-<version>.jarReplace the filename with the jar you downloaded. The jar includes the application dependencies and
native libraries; Java must be installed separately. It opens a terminal window running your $SHELL,
falling back to /bin/sh on Linux/macOS or cmd.exe on Windows.
To run from source:
./gradlew :demo-desktop:runEvery push to cmp publishes the -SNAPSHOT version to
https://central.sonatype.com/repository/maven-snapshots/.
MIT