noccylabs/term-io

$ git tag
0.0.1
0.1.0

$ git branch
* master

Terminal IO Library for PHP

// Terminal is a singleton
$term = Terminal::getInstance();

[$h,$w] = $term->getDimensions();

$term->clearScreen();

$term->setStyle('text', [ 0, 37 ]);
$term->setDefaultStyle('text');

$term->write(1, 1, "Hello World", "text");
$term->write(2, 1, "Hello World"); // using default style 'text'

$key = $term->readKey();
if ($key instanceof MouseEvent) {
    //
} elseif ($key instanceof Key) {
    //
}