clue/readline-react
Experimental bindings for the readline extension (ext-readline), (*1)
Note: This project is in early alpha stage! Feel free to report any issues you encounter., (*2)
Quickstart example
Once installed, you can use the following code to present a prompt in a CLI program:, (*3)
$readline = new Readline($loop, 'demo > ');
$readline->on('line', function ($line) use ($readline) {
var_dump($line);
if ($line === 'quit' || $line === 'exit') {
$readline->pause();
}
});
See also the examples., (*4)
Install
The recommended way to install this library is through composer.
New to composer?, (*5)
{
"require": {
"clue/readline-react": "dev-master"
}
}
License
MIT, (*6)