Tcell is a Go package that provides a cell-based interface for rendering text to terminals, similar to termbox but with additional capabilities.
Tcell solves the problem of building terminal user interfaces by offering a portable abstraction layer over terminal capabilities. It handles the complexity of different terminal emulators and their varying support for features like Unicode, keyboard input, and mouse tracking. The package works by presenting a cell-based view where each character position on the screen can be independently styled and updated, allowing developers to build interactive terminal applications without managing low-level terminal control sequences.
Developers should choose Tcell if they need to build cross-platform terminal applications in Go with rich Unicode support and advanced input handling. It suits projects requiring wide character display, grapheme cluster handling, enhanced keyboard support including modifier discrimination, and mouse tracking with motion events and wheel support. The tool is pure Go with no CGO dependencies, making it portable across systems officially supported by Go. Compared to termbox, which inspired it, Tcell provides better Unicode handling, richer keyboard support for special keys and modifiers, and enhanced mouse capabilities.
The project maintains active development with regular updates to dependencies for security fixes. The maintainers follow Go's official support policy, targeting only the current stable version and the immediately prior version of Go, which enables adoption of newer language features and library capabilities. Documentation includes a tutorial and demonstration programs in dedicated directories, with a community wiki gallery for showcasing applications built with the tool.