Files
terminal-ui/README.md

1.2 KiB

terminal-ui

Java library for terminal UI: tables, rules, colors, prompts, menus, SelectList, pager, and more. Fluent API, ANSI support, testable.

CI Java 21 License: MIT

Open in GitHub Codespaces

Requirements

  • Java 21
  • Gradle 9.x (wrapper included)

Build & Test

./gradlew build

Run tests:

./gradlew test

Usage (excerpt)

import dev.jakub.terminal.Terminal;
import dev.jakub.terminal.core.Color;

// Colored text
Terminal.print("Hello").color(Color.CYAN).bold().println();

// Table
Terminal.table()
    .header("A", "B")
    .row("1", "2")
    .row("3", "4")
    .print(System.out);

// Prompt
String name = Terminal.prompt("Name: ").ask();

// Menu
String choice = Terminal.menu()
    .title("Environment")
    .option("Dev").option("Prod")
    .select();

License

See LICENSE.