Tui4j
TUI4J: Terminal User Interface library for Java that includes Bubble Tea ported from Go
Install / Use
/learn @WilliamAGH/Tui4jREADME
TUI4J
TUI4J (Terminal User Interface for Java) is a Java TUI framework inspired by Bubble Tea. It includes a compatibility module that mirrors the original Go API for developers familiar with the Charm ecosystem.

Installation
Maven
<dependency>
<groupId>com.williamcallahan</groupId>
<artifactId>tui4j</artifactId>
<version>0.3.1-preview</version>
</dependency>
Gradle
implementation 'com.williamcallahan:tui4j:0.3.1-preview'
Snapshots
Snapshots are published to Sonatype's snapshot repository (separate from Maven Central releases):
https://central.sonatype.com/repository/maven-snapshots/
Maven:
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
Gradle:
repositories {
mavenCentral()
maven(url = "https://central.sonatype.com/repository/maven-snapshots/")
}
dependencies {
implementation("com.williamcallahan:tui4j:0.3.3-SNAPSHOT")
}
Quick Start
TUI4J uses The Elm Architecture: implement a Model with init(), update(), and view() methods, then run it with Program:
new Program(new MyModel()).run();
Examples
See the examples directory for lists, text inputs, spinners, and more. For Spring Boot integration, see the Spring examples.
The screenshots above show Pulse (a terminal implementation demo) and Brief (a terminal AI chat client built with TUI4J).
Documentation
- Tutorial - Complete walkthrough
- List Component - List widget guide
- Compatibility Maps - Charm API mappings
- Porting Status - What's implemented
Built with TUI4J
Brief
Brief - Terminal AI chat client with slash-command palette and local tool execution. Available via Homebrew.
Using TUI4J in your project? We'd love to feature it! Open an issue or submit a PR.
Compatibility with Charmbracelet
TUI4J ports the charmbracelet ecosystem to Java:
| Go Library | Description | Java Package |
|------------|-------------|--------------|
| bubbletea | Core TUI framework | compat.bubbletea.* |
| bubbles | UI components (viewport, textarea, table, progress, etc.) | compat.bubbles.* |
| lipgloss | Styling, colors, borders, layout | compat.lipgloss.* |
| x/ansi | ANSI parsing, text width | compat.x.ansi.* |
| harmonica | Spring physics animation | compat.harmonica.* |
TUI4J seeks to replicate upstream behavior as closely as possible, with a general 1:1 mapping for compatibility. When TUI4J adds functionality without a charmbracelet equivalent, those APIs are treated as additive extensions.
Check status.md and docs/compatibility for current porting status.
Contributing
See CONTRIBUTING.md for guidelines on reporting issues and submitting PRs.
Acknowledgments & License
This project began as a fork of the original Latte by Lukasz Grabski, which was released under the MIT License.
Bubble Tea is a trademark of Charmbracelet, Inc. The original Go implementations are also licensed under MIT.
Other Java Projects
- Apple Maps Java - Java SDK for Apple Maps Server API
- Other projects - More from the author

