Skip to content

WilliamAGH/tui4j

Repository files navigation

TUI4J

Maven Central GitHub Release Context7 DeepWiki

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.

Pulse TUI4J

Brief screenshot

Installation

Maven

<dependency>
    <groupId>com.williamcallahan</groupId>
    <artifactId>tui4j</artifactId>
    <version>0.3.0</version>
</dependency>

Gradle

implementation 'com.williamcallahan:tui4j:0.3.0'

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

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/maps for current porting status.

Contributing

See CONTRIBUTING.md for guidelines on reporting issues and submitting PRs.

Acknowledgments & License

MIT 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

About

TUI4J: Terminal User Interface library for Java that includes Bubble Tea ported from Go

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages