PackageTrack
Sign in Get early access

clue/stdio-react

Async, event-driven console input & output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP

v2.7.0 12M downloads/mo #1571 most downloaded on Packagist clue/reactphp-stdio

What this package is like to depend on

Last release 2 months ago

14 Jun 2026

Ships unpredictably

gaps range from 2 weeks to 4.2 years

Nearly every release is documented

notes for 17 of 17 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

17 releases · first in 2014

1 release in the last 12 months

see the full history below

Release timeline

17 releases · Sep 2014 to Jun 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 17
  1. v2.7.0 14 Jun 2026
    Release notes
    Open source →
    Release notes
    • Feature: Improve PHP 8.5+, PHP 8.4+, PHP 8.3+ and PHP 8.2+ support and update test environment. (#112, #109 and #103 by @clue, #107 by @SimonFrings and #106 by @yadaiio)

    • Minor documentation improvements. (#105 by @yadaiio)

    • Improve test suite to ensure 100% code coverage, skip flaky tests and fix legacy tests. (#108, #113 and #111 by @clue and #102 by @SimonFrings)

    Open source →
  2. v2.6.0 18 Mar 2022
    Release notes
    Open source →
    Release notes
    • Feature: Full support for PHP 8.1 release. (#101 by @cdosoftei)
    Open source →
  3. v2.5.0 25 Oct 2021
    Release notes
    • Feature: Simplify usage by supporting new default loop.
      (#99 by @clue)

      // old (still supported)
      $stdio = new Clue\React\Stdio\Stdio($loop);
      
      // new (using default loop)
      $stdio = new Clue\React\Stdio\Stdio();
    • Improve code examples and documentation.
      (#100 by @clue and #98 by @PaulRotmann)

    • Use GitHub actions for continuous integration (CI).
      (#97 by @SimonFrings)

    Open source →
    Release notes
    • Feature: Simplify usage by supporting new default loop. (#99 by @clue)

      // old (still supported)
      $stdio = new Clue\React\Stdio\Stdio($loop);
      
      // new (using default loop)
      $stdio = new Clue\React\Stdio\Stdio();
      
    • Improve code examples and documentation. (#100 by @clue and #98 by @PaulRotmann)

    • Use GitHub actions for continuous integration (CI). (#97 by @SimonFrings)

    Open source →
  4. v2.4.0 20 Nov 2020
    Release notes
    • Fix: Refactor executing functional tests without ext-readline.
      (#95 by @clue)

    • Improve test suite and add .gitattributes to exclude dev files from export.
      Prepare PHP 8 support, update to PHPUnit 9 and simplify test matrix.
      (#93 and #94 by @SimonFrings)

    Open source →
    Release notes
    • Fix: Refactor executing functional tests without ext-readline. (#95 by @clue)

    • Improve test suite and add .gitattributes to exclude dev files from export. Prepare PHP 8 support, update to PHPUnit 9 and simplify test matrix. (#93 and #94 by @SimonFrings)

    Open source →
  5. v2.3.0 28 Aug 2019
    Release notes
    • Feature: Emit audible/visible BELL signal when using a disabled function.
      (#86 and #87 by @clue)

      By default, this project will emit an audible/visible BELL signal when the user
      tries to execute an otherwise disabled function, such as using the
      left or backspace keys when already at the beginning of the line.

    • Deprecated: Deprecate Readline class and move all methods to Stdio.
      (#84 by @clue)

      // deprecated:
      $stdio->getReadline()->setPrompt('> ');
      
      // recommended alternative:
      $stdio->setPrompt('> ');
    • Fix: Fix closing to emit final close event and clean up all listeners.
      (#88 by @clue)

    • Improve test suite to test against legacy PHP 5.3 through PHP 7.3 and support PHPUnit 7.
      (#85 by @clue)

    Open source →
    Release notes
    • Feature: Emit audible/visible BELL signal when using a disabled function. (#86 and #87 by @clue)

      By default, this project will emit an audible/visible BELL signal when the user tries to execute an otherwise disabled function, such as using the <kbd>left</kbd> or <kbd>backspace</kbd> keys when already at the beginning of the line.

    • Deprecated: Deprecate Readline class and move all methods to Stdio. (#84 by @clue)

      // deprecated:
      $stdio->getReadline()->setPrompt('> ');
      
      // recommended alternative:
      $stdio->setPrompt('> ');
      
    • Fix: Fix closing to emit final close event and clean up all listeners. (#88 by @clue)

    • Improve test suite to test against legacy PHP 5.3 through PHP 7.3 and support PHPUnit 7. (#85 by @clue)

    Open source →
  6. v2.2.0 03 Sep 2018
    Release notes
    • Feature / Fix: Accept CR as an alias for LF to support more platforms.
      (#79 by @clue)

      The enter key will usually end the line with a \n (LF)
      character on most Unix platforms. Common terminals also accept the
      ^M (CR) key in place of the ^J (LF) key.

      By now allowing CR as an alias for LF in this library, we can significantly
      improve compatibility with this common usage pattern and improve platform
      support. In particular, some platforms use different TTY settings (icrnl,
      igncr and family) and depending on these settings emit different EOL
      characters. This fixes issues where enter was not properly
      detected when using ext-readline on Mac OS X, Android and others.

    • Fix: Fix and simplify restoring TTY mode when ext-readline is not in use.
      (#74 and #78 by @clue)

    • Update project homepage, minor code style improvements and sort dependencies.
      (#72 and #81 by @clue and #75 by @localheinz)

    Open source →
    Release notes
    • Feature / Fix: Accept CR as an alias for LF to support more platforms. (#79 by @clue)

      The <kbd>enter</kbd> key will usually end the line with a \n (LF) character on most Unix platforms. Common terminals also accept the <kbd>^M</kbd> (CR) key in place of the <kbd>^J</kbd> (LF) key.

      By now allowing CR as an alias for LF in this library, we can significantly improve compatibility with this common usage pattern and improve platform support. In particular, some platforms use different TTY settings (icrnl, igncr and family) and depending on these settings emit different EOL characters. This fixes issues where <kbd>enter</kbd> was not properly detected when using ext-readline on Mac OS X, Android and others.

    • Fix: Fix and simplify restoring TTY mode when ext-readline is not in use. (#74 and #78 by @clue)

    • Update project homepage, minor code style improvements and sort dependencies. (#72 and #81 by @clue and #75 by @localheinz)

    Open source →
  7. v2.1.0 06 Feb 2018
    Release notes
    • Feature: Add support for binding custom functions to any key code.
      (#70 by @clue)

      $readline->on('?', function () use ($stdio) {
          $stdio->write('Do you need help?');
      });
    • Feature: Add addInput() helper method.
      (#69 by @clue)

      $readline->addInput('hello');
      $readline->addInput(' world');
    Open source →
    Release notes
    • Feature: Add support for binding custom functions to any key code. (#70 by @clue)

      $readline->on('?', function () use ($stdio) {
          $stdio->write('Do you need help?');
      });
      
    • Feature: Add addInput() helper method. (#69 by @clue)

      $readline->addInput('hello');
      $readline->addInput(' world');
      
    Open source →
  8. v2.0.0 24 Jan 2018
    Release notes

    A major compatibility release to update this package to support all latest
    ReactPHP components!

    This update involves a minor BC break due to dropped support for legacy
    versions. We've tried hard to avoid BC breaks where possible and minimize impact
    otherwise. We expect that most consumers of this package will actually not be
    affected by any BC breaks, see below for more details.

    • BC break: Remove all deprecated APIs (individual Stdin, Stdout, line etc.)
      (#64 and #68 by @clue)

      All of this affects only what is considered "advanced usage".
      If you're affected by this BC break, then it's recommended to first
      update to the intermediary v1.2.0 release, which provides alternatives
      to all deprecated APIs and then update to this version without causing a
      BC break.

    • Feature / BC break: Consistently emit incoming "data" event with trailing newline
      unless stream ends without trailing newline (such as when piping).
      (#65 by @clue)

    • Feature: Forward compatibility with upcoming Stream v1.0 and EventLoop v1.0
      and avoid blocking when STDOUT buffer is full.
      (#68 by @clue)

    Open source →
    Release notes

    A major compatibility release to update this package to support all latest ReactPHP components!

    This update involves a minor BC break due to dropped support for legacy versions. We've tried hard to avoid BC breaks where possible and minimize impact otherwise. We expect that most consumers of this package will actually not be affected by any BC breaks, see below for more details.

    • BC break: Remove all deprecated APIs (individual Stdin, Stdout, line etc.) (#64 and #68 by @clue)

      All of this affects only what is considered "advanced usage". If you're affected by this BC break, then it's recommended to first update to the intermediary v1.2.0 release, which provides alternatives to all deprecated APIs and then update to this version without causing a BC break.

    • Feature / BC break: Consistently emit incoming "data" event with trailing newline unless stream ends without trailing newline (such as when piping). (#65 by @clue)

    • Feature: Forward compatibility with upcoming Stream v1.0 and EventLoop v1.0 and avoid blocking when STDOUT buffer is full. (#68 by @clue)

    Open source →
  9. v1.2.0 18 Dec 2017
    Release notes
    • Feature: Optionally use ext-readline to enable raw input mode if available.
      This extension is entirely optional, but it is more efficient and reliable
      than spawning the external stty command.
      (#63 by @clue)

    • Feature: Consistently return boolean success from write() and
      avoid sending unneeded control codes between writes
      (#60 by @clue)

    • Deprecated: Deprecate input helpers and output helpers and
      recommend using Stdio as a normal DuplexStreamInterface instead.
      (#59 and #62 by @clue)

      // deprecated
      $stdio->on('line', function ($line) use ($stdio) {
          $stdio->writeln("input: $line");
      });
      
      // recommended alternative
      $stdio->on('data', function ($line) use ($stdio) {
          $stdio->write("input: $line");
      });
    • Improve test suite by adding forward compatibility with PHPUnit 6
      (#61 by @carusogabriel)

    Open source →
    Release notes
    • Feature: Optionally use ext-readline to enable raw input mode if available. This extension is entirely optional, but it is more efficient and reliable than spawning the external stty command. (#63 by @clue)

    • Feature: Consistently return boolean success from write() and avoid sending unneeded control codes between writes. (#60 by @clue)

    • Deprecated: Deprecate input helpers and output helpers and recommend using Stdio as a normal DuplexStreamInterface instead. (#59 and #62 by @clue)

      // deprecated
      $stdio->on('line', function ($line) use ($stdio) {
          $stdio->writeln("input: $line");
      });
      
      // recommended alternative
      $stdio->on('data', function ($line) use ($stdio) {
          $stdio->write("input: $line");
      });
      
    • Improve test suite by adding forward compatibility with PHPUnit 6. (#61 by @carusogabriel)

    Open source →
  10. v1.1.0 01 Nov 2017
    Release notes
    • Feature: Explicitly end stream on CTRL+D and emit final data on EOF without EOL.
      (#56 by @clue)

    • Feature: Support running on non-TTY and closing STDIN and STDOUT streams.
      (#57 by @clue)

    • Feature / Fix: Restore blocking mode before closing and restore TTY mode on unclean shutdown.
      (#58 by @clue)

    • Improve documentation to detail why async console I/O is not supported on Microsoft Windows.
      (#54 by @clue)

    • Improve test suite by adding PHPUnit to require-dev,
      fix HHVM build for now again and ignore future HHVM build errors and
      lock Travis distro so future defaults will not break the build.
      (#46, #48 and #52 by @clue)

    Open source →
    Release notes
    • Feature: Explicitly end stream on CTRL+D and emit final data on EOF without EOL. (#56 by @clue)

    • Feature: Support running on non-TTY and closing STDIN and STDOUT streams. (#57 by @clue)

    • Feature / Fix: Restore blocking mode before closing and restore TTY mode on unclean shutdown. (#58 by @clue)

    • Improve documentation to detail why async console I/O is not supported on Microsoft Windows. (#54 by @clue)

    • Improve test suite by adding PHPUnit to require-dev, fix HHVM build for now again and ignore future HHVM build errors and lock Travis distro so future defaults will not break the build. (#46, #48 and #52 by @clue)

    Open source →
  11. v1.0.0 08 Jan 2017
    Release notes
    • First stable release, now following SemVer.

    Contains no other changes, so it's actually fully compatible with the v0.5.0 release.

    Open source →
  12. v0.5.0 08 Jan 2017
    Release notes
    • Feature: Add history support. (#40 by @clue)

    • Feature: Add autocomplete support. (#41 by @clue)

    • Feature: Suggest using ext-mbstring, otherwise use regex fallback. (#42 by @clue)

    • Remove / BC break: Remove undocumented and low quality skeletons/helpers for Buffer, ProgressBar and Spinner (mostly dead code). (#39, #43 by @clue)

    • First class support for PHP 5.3 through PHP 7 and HHVM. (#44 by @clue)

    • Simplify and restructure examples. (#45 by @clue)

    Open source →
  13. v0.4.0 27 Sep 2016
    Release notes
    • Feature / BC break: The Stdio is now a well-behaving duplex stream. (#35 by @clue)

    • Feature / BC break: The Readline is now a well-behaving readable stream. (#32 by @clue)

    • Feature: Add Readline::getPrompt() helper. (#33 by @clue)

    • Feature / Fix: All unsupported special keys, key codes and byte sequences will now be ignored. (#36, #30, #19, #38 by @clue)

    • Fix: Explicitly redraw prompt on empty input. (#37 by @clue)

    • Fix: Writing data that contains multiple newlines will no longer end up garbled. (#34, #35 by @clue)

    Open source →
  14. v0.3.1 26 Nov 2015
    Release notes
    • Fix: Support calling Readline::setInput() during line event. (#28)

      $stdio->on('line', function ($line) use ($stdio) {
          $stdio->getReadline()->setInput($line . '!');
      });
      
    Open source →
  15. v0.3.0 18 May 2015
    Release notes
    • Feature: Support multi-byte UTF-8 characters and account for cell width. (#20)

    • Feature: Add support for HOME and END keys. (#22)

    • Fix: Clear readline input and restore TTY on end. (#21)

    Open source →
  16. v0.2.0 17 May 2015
    Release notes
    • Feature: Support echo replacements (asterisk for password prompts). (#11)

      $stdio->getReadline()->setEcho('*');
      
    • Feature: Add accessors for text input buffer and current cursor position. (#8 and #9)

      $stdio->getReadline()->setInput('hello');
      $stdio->getReadline()->getCursorPosition();
      
    • Feature: All setters now return self to allow easy method chaining. (#7)

      $stdio->getReadline()->setPrompt('Password: ')->setEcho('*')->setInput('secret');
      
    • Feature: Only redraw() readline when necessary. (#10 and #14)

    Open source →
  17. v0.1.0 08 Sep 2014
    Release notes
    • First tagged release.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive