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

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

dariuszp/cli-progress-bar
=========================

Cli progress bar

1.0.5(7y ago)80591.8k↓18.2%11[3 issues](https://github.com/dariuszp/cli-progress-bar/issues)11MITPHP

Since Nov 2Pushed 7y ago4 watchersCompare

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

READMEChangelogDependencies (1)Versions (8)Used By (11)

cli-progress-bar [![Build Status](https://camo.githubusercontent.com/6ae7426546ebb73c17385a82ab83a507479ab0194640dede9af4d2f4eacb35de/68747470733a2f2f7472617669732d63692e6f72672f6461726975737a702f636c692d70726f67726573732d6261722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/dariuszp/cli-progress-bar)
===========================================================================================================================================================================================================================================================================================================================

[](#cli-progress-bar-)

Progress bar for cli apps

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

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

[](#installation)

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

Usage
-----

[](#usage)

```
use Dariuszp\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 Dariuszp\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 Dariuszp\CliProgressBar;
$bar = new CliProgressBar(50, 0, "My Custom Text");
$bar->display();
$bar->end();
```

or

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

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.

---

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

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

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~224 days

Recently: every ~280 days

Total

6

Last Release

2732d ago

Major Versions

0.5.0 → 1.0.02015-11-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/194d57b1db64826066b7414fb25463ba47579bb253ddf8a8c684fe9d01f95a02?d=identicon)[dariuszp](/maintainers/dariuszp)

---

Top Contributors

[![dariuszp](https://avatars.githubusercontent.com/u/249863?v=4)](https://github.com/dariuszp "dariuszp (3 commits)")[![MatrixSenpai](https://avatars.githubusercontent.com/u/2157565?v=4)](https://github.com/MatrixSenpai "MatrixSenpai (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/dariuszp-cli-progress-bar/health.svg)](https://phpackages.com/packages/dariuszp-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)
