mileschou/pherm

A command line terminal utility in PHP

v0.2.1 2019-06-28 18:17 UTC

README

Build Status Coverage Status

This repo is fork from php-school/terminal

Small utility to help provide a simple, consise API for terminal interaction.

See examples to know how to use.

Usage

Hello world example:

$terminal = (new Terminal(new InputStream(), new OutputStream()))
    ->enableInstantOutput()
    ->bootstrap();

$terminal->clear();

$str = 'Hello world!';

$terminal->moveCursor()->center(-(mb_strlen($str) / 2))->write($str);

$terminal->moveCursor()->bottom();