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.
<dependency>
<groupId>com.williamcallahan</groupId>
<artifactId>tui4j</artifactId>
<version>0.3.0</version>
</dependency>implementation 'com.williamcallahan:tui4j:0.3.0'TUI4J uses The Elm Architecture: implement a Model with init(), update(), and view() methods, then run it with Program:
new Program(new MyModel()).run();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).
- Tutorial - Complete walkthrough
- List Component - List widget guide
- Compatibility Maps - Charm API mappings
- Porting Status - What's implemented
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.
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/maps for current porting status.
See CONTRIBUTING.md for guidelines on reporting issues and submitting PRs.
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.
- Apple Maps Java - Java SDK for Apple Maps Server API
- Other projects - More from the author

