PHPackages                             siteworxpro/cli-progress-bar - 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. siteworxpro/cli-progress-bar

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

siteworxpro/cli-progress-bar
============================

Cli progress bar

1.1.2(8y ago)2134.9k↓34.6%1MITPHP

Since Feb 15Pushed 8y agoCompare

[ Source](https://github.com/siteworxpro/cli-progress-bar)[ Packagist](https://packagist.org/packages/siteworxpro/cli-progress-bar)[ RSS](/packages/siteworxpro-cli-progress-bar/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

cli-progress-bar [![Build Status](https://camo.githubusercontent.com/7c7de4728ad8adf75268776ce3e39547536bfd46b444b90c1ae20d0c8e857467/68747470733a2f2f7472617669732d63692e6f72672f73697465776f727870726f2f636c692d70726f67726573732d6261722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/siteworxpro/cli-progress-bar)
====================================================================================================================================================================================================================================================================================================================================

[](#cli-progress-bar-)

Progress bar for cli apps

[Forked From dariuszp/cli-progress-bar](https://github.com/dariuszp/cli-progress-bar)

[![example animation](examples/img/terminal.gif)](examples/img/terminal.gif)

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

[](#installation)

```
composer require siteworx/cli-progress-bar
```

Usage
-----

[](#usage)

```
use Siteworx\ProgressBar\CliProgressBar;
$bar = new CliProgressBar(10, 5);
$bar->display();
$bar->end();
```

Code above will show half full progress bar:

```
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░ 50.0% (5/10)

```

Windows can't handle some UTF characters so there is an alternate method to display progress bar:

```
use  Siteworx\ProgressBar\CliProgressBar;
$bar = new CliProgressBar();
$bar->displayAlternateProgressBar(); // this only switch style

$bar->display();
$bar->end();
```

Output will be:

```
XXXX____________________________________ 10.0% (10/100)

```

Add text to the progress bar using the following methods

```
use Siteworx\ProgressBar\CliProgressBar;
$bar = new CliProgressBar(50, 0, "My Custom Text");
$bar->display();
$bar->end();
```

or

```
use Siteworx\ProgressBar\CliProgressBar;
$bar = new CliProgressBar();
$bar->setDetails("My Custom Text");
$bar->display();
$bar->end();
```

Estimated time to completion is available. At least 2 iterations are required to calculate an ET.
The more iterations the better the estimate calculation will be.

```
use Siteworx\ProgressBar\CliProgressBar;
$bar = new CliProgressBar();
$bar->displayTimeRemaining()->display();
$bar->end();
```

will output

```
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░ 50.0% (5/10) 02:14

```

Also update asynchronously with setDetails()

More features like:

- changing progress bar length (basicWithShortBar.php)
- changing bar color (colors.php)
- animation example (basic.php)
- etc...

in [example](examples/) directory.

---

Author: Półtorak Dariusz Contributors: [@mathmatrix828 - Mason Phillips](https://github.com/mathmatrix828/)

License: [MIT](https://opensource.org/licenses/MIT)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

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 ~16 days

Total

4

Last Release

2967d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19206279?v=4)[alphafloor](/maintainers/alphafloor)[@alphafloor](https://github.com/alphafloor)

---

Top Contributors

[![ronrise](https://avatars.githubusercontent.com/u/29732851?v=4)](https://github.com/ronrise "ronrise (10 commits)")

### Embed Badge

![Health badge](/badges/siteworxpro-cli-progress-bar/health.svg)

```
[![Health](https://phpackages.com/badges/siteworxpro-cli-progress-bar/health.svg)](https://phpackages.com/packages/siteworxpro-cli-progress-bar)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[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)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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