PHPackages                             legionth/reactphp-progressbar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. legionth/reactphp-progressbar

ActiveLibrary[CLI &amp; Console](/categories/cli)

legionth/reactphp-progressbar
=============================

A way to create a progressbar stream with ReactPHP

v1.0.1(6y ago)14[1 PRs](https://github.com/legionth/reactphp-progressbar/pulls)MITPHPCI passing

Since Oct 25Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/legionth/reactphp-progressbar)[ Packagist](https://packagist.org/packages/legionth/reactphp-progressbar)[ RSS](/packages/legionth-reactphp-progressbar/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (8)Used By (0)

ProgressbarStream
=================

[](#progressbarstream)

An event-driven progressbar stream that can be added to other streams to show its current progress.

**Table of Contents**

- [Usage](#usage)
    - [data-Event](#data-event)
    - [currentValue-Event](#currentvalue-event)
    - [maximumValue-Event](#maximumvalue-event)
- [Installation](#installation)

Usage
-----

[](#usage)

This stream can be integrate like any other [ReactPHP Stream](https://github.com/reactphp/stream/)

```
$loop = Factory::create();

$progressBarStream = new ProgressbarStream();

$input = new React\Stream\WritableResourceStream(STDOUT, $loop);
$output = new React\Stream\ReadableResourceStream(STDIN, $loop);

$output->pipe($progressBarStream);

$progressBarStream->on('error', function ($errorMessage) {
    echo $errorMessage;
});

$progressBarStream->on('data', function ($progressBarString) use ($input) {
    $input->write($progressBarString . PHP_EOL);
});

$loop->addPeriodicTimer(1, function () use ($output) {
    $output->emit('data', array(1));
});

$loop->addPeriodicTimer(3, function () use ($output) {
    $output->emit('data', array(10));
});

$loop->run();
```

This example will update the progressbar every 1 second by 1 unit/percent and every 3 seconds by 10 units/percent. This example can be found in the [examples folder](/examples).

The progressbar stream will never overflow the maximum value. The stream will end if the current value reaches or goes beyond the maximum value.

### data-Event

[](#data-event)

The `data` event contains the visualization of the progress bar. The data emitted by this event is a string. This event will be emitted if the progressbar is updated.

### currentValue-Event

[](#currentvalue-event)

The `currentValue` event contains the integer value of the current progressbar. This event will be emitted if the progressbar is updated.

### maximumValue-Event

[](#maximumvalue-event)

The `maximumValue` event contains the integer value of the maximum reachable value of the progressbar. This event will be emitted if the progressbar is updated.

Installation
------------

[](#installation)

The recommended way to install this library is [through Composer](https://getcomposer.org). [New to Composer?](https://getcomposer.org/doc/00-intro.md)

This will install the latest supported version:

```
$ composer require legionth/progressbar:^1.0
```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance57

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

2

Last Release

2382d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3241ea646d5298776a417a7e552e7bec0d3dd81ada4be370f8f0b91cd2d09b3?d=identicon)[legionth](/maintainers/legionth)

---

Top Contributors

[![legionth](https://avatars.githubusercontent.com/u/1578709?v=4)](https://github.com/legionth "legionth (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/legionth-reactphp-progressbar/health.svg)

```
[![Health](https://phpackages.com/badges/legionth-reactphp-progressbar/health.svg)](https://phpackages.com/packages/legionth-reactphp-progressbar)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M319](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M18](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[clue/stdio-react

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

19810.2M27](/packages/clue-stdio-react)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[clue/term-react

Streaming terminal emulator, built on top of ReactPHP.

10410.2M2](/packages/clue-term-react)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
