clue/readline-react

Experimental bindings for the readline extension (ext-readline)

Maintainers

👁 clue

Package info

github.com/clue/php-readline-react

pkg:composer/clue/readline-react

Statistics

Installs: 36

Dependents: 1

Suggesters: 0

Stars: 6

Open Issues: 0

dev-master 2017-01-29 13:29 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 45a743023851b017c28bf94b6db084365a1a5972

  • Christian Lück <christian.woop@lueck.tv>

asyncreadlinereactphpext-readline

This package is auto-updated.

Last update: 2026-06-06 12:46:44 UTC


README

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