Skip to content

clue/php-readline-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clue/readline-react Build Status

Experimental bindings for the readline extension (ext-readline)

Note: This project is in early alpha stage! Feel free to report any issues you encounter.

Quickstart example

Once installed, you can use the following code to present a prompt in a CLI program:

$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.

Install

The recommended way to install this library is through composer. New to composer?

{
    "require": {
        "clue/readline-react": "dev-master"
    }
}

License

MIT

About

Experimental reactive binding for ext-readline, built on top of React PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages