████████╗███████╗██████╗ ███╗ ███╗██╗███╗ ██╗██╗ ██╗███████╗ ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██║████╗ ██║██║ ██║██╔════╝ ██║ █████╗ ██████╔╝██╔████╔██║██║██╔██╗ ██║██║ ██║███████╗ ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║██║██║╚██╗██║██║ ██║╚════██║ ██║ ███████╗██║ ██║██║ ╚═╝ ██║██║██║ ╚████║╚██████╔╝███████║ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
A React-inspired TUI framework for Java 21
// imports omitted public class App { public static void main(String[] args) { Layout root = Layout.column().padding(1).build(); root.add(Text.bold("My App", 0x7F77DD)); root.addFlex(Table.builder(model, columns).build()); root.add(statusBar); TerminusApp.run(root); } }
Component (abstract) ├── Leaf // renders directly │ ├── Text │ ├── ProgressBar │ ├── TextInput │ ├── Table │ └── [your component] └── Container └── Layout (row | column) └── gap · padding · flex
Wrap, align, truncate, color. The atom.
Four styles — eighths, block, ASCII, braille.
Cursor, history, selection, kill rings.
100k+ rows. Virtual scroll. Sortable.
| ↑ ↓ | move selection |
| Home / End | first / last row |
| PgUp / PgDn | scroll by page |
| s | cycle sort column |
| S | reverse sort direction |
| r | reset to original order |
| Enter | fire onSelect callback |
| PATTERN | WHERE |
|---|---|
| Composite | Component / Container / Leaf |
| Visitor | Renderer walking the tree |
| Chain of Resp. | EventDispatcher |
| Observer | markDirty() bubbling |
| Builder | Every component |
| Template Method | LayoutEngine |
| Strategy | FlexConfig, TableModel |
| PATTERN | WHERE |
|---|---|
| Command | Event sealed hierarchy |
| Double Buffer | ScreenBuffer |
| Repository | TableModel |
| Facade | TerminusApp, RenderPipeline |
| State Machine | KeyParser |
| Value Object | Cell, Bounds, Constraint |
dependencies { implementation 'io.terminus:terminus-core:1.0.0' }
<dependency> <groupId>io.terminus</groupId> <artifactId>terminus-core</artifactId> <version>1.0.0</version> </dependency>
$ git clone https://github.com/P0intMaN/terminus.git $ cd terminus $ ./gradlew :terminus-demo:shadowJar $ ./run-demo.sh # a real terminal — not via gradle