Build cross-platform user interfaces with a simple Python API, in the terminal or a web browser
open sourceMITself-hostablefree
Textual is a Python framework for building terminal user interfaces that also run in a web browser. Its API borrows from web development: apps are composed from decoupled widgets, styled with CSS and arranged with a flexible layout system, with predefined themes so they look good out of the box. The widget library covers buttons, tree controls, data tables, inputs, text areas and more, every app gets a fuzzy-search command palette, and an advanced testing framework helps keep apps maintainable. It's asynchronous under the hood but doesn't force async on you. The textual-dev package adds a dev console that shows an app's logs and events from another terminal, and textual serve puts any Textual app in the browser. It's MIT licensed.
Problems it solves
- build a rich interactive terminal app in Python with widgets and mouse support
- a TUI dashboard for my Python tool that also runs in the browser
- style a terminal user interface with CSS instead of hand-drawing it
- show a sortable data table in the terminal from my Python script
- write automated tests for a terminal user interface
Features
- widget library: buttons, trees, data tables, inputs, text areas
- CSS styling and flexible layouts
- predefined themes
- fuzzy-search command palette
- testing framework
- dev console (textual-dev)
- serve apps in a web browser with textual serve
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
Alternatives
The same job
These do what Textual does.
- Ink React for interactive command-line apps
- Bubble Tea A Go framework for building terminal apps, based on The Elm Architecture
- Ratatui A Rust library for building fast, lightweight, rich terminal user interfaces
