mileschou/pherm

A command line terminal utility in PHP

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

README

License Build Status Coverage Status Codacy Badge

This repo is fork from php-school/terminal

Small utility to help provide a simple, consist 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();

Credits

License

The MIT License (MIT). Please see License File for more information.