Skip to main content
TUI4J ports the Charmbracelet Go ecosystem to Java with a 1:1 API mapping. Each Go package maps to a corresponding Java package under com.williamcallahan.tui4j.compat.*, preserving type names, method signatures, and behavioral semantics as closely as the JVM permits.

Package mapping

The bubbletea package is further split into sub-packages that match its internal structure:

Naming convention

TUI4J uses *Message as the canonical name for all message types. *Msg variants exist as deprecated shims for backwards compatibility and extend their *Message counterparts without adding logic.
Always use *Message types in new code. The *Msg aliases are retained only for existing downstream consumers and will be removed in a future release.
For example, use QuitMessage rather than QuitMsg. This pattern applies across the bubbletea compat package for every message type ported from the upstream Go codebase.

Native TUI4J extensions

TUI4J adds packages that have no upstream Charmbracelet equivalent. These are additive extensions — they do not conflict with any compat package and are available to all consumers.

x sub-packages not yet ported

The charmbracelet/x repository contains several packages that TUI4J has not yet ported. Only x/ansi (core files and its parser sub-package) is available. The following packages remain unmapped:
  • x/cellbuf — cell buffer for efficient terminal rendering
  • x/colors — color conversion and manipulation utilities
  • x/editor — launch external text editor
  • x/conpty — Windows ConPTY integration
  • x/errors — error helpers
  • x/etag — ETag helpers
For detailed per-file porting status across all packages, see the Porting status page.