PHPackages                             alex-heifetz/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. alex-heifetz/progress-bar

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

alex-heifetz/progress-bar
=========================

PHP CLI progress bar

1.4.0(3w ago)024Apache-2.0PHPPHP &gt;=7.4

Since Nov 9Pushed 3w ago1 watchersCompare

[ Source](https://github.com/alex-heifetz/progress-bar)[ Packagist](https://packagist.org/packages/alex-heifetz/progress-bar)[ RSS](/packages/alex-heifetz-progress-bar/feed)WikiDiscussions main Synced 2w ago

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

ProgressBar - PHP CLI progress bar
==================================

[](#progressbar---php-cli-progress-bar)

[![GitHub Release](https://camo.githubusercontent.com/1cc028f42a9576a9ddd17bbd31fa06f27c7d2fe5f1db14be8967b858b4b808f7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f616c65782d6865696665747a2f70726f67726573732d626172)](https://camo.githubusercontent.com/1cc028f42a9576a9ddd17bbd31fa06f27c7d2fe5f1db14be8967b858b4b808f7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f616c65782d6865696665747a2f70726f67726573732d626172)[![GitHub Downloads (all assets, all releases)](https://camo.githubusercontent.com/f9472b569e316d13ce121ee1049fe613c9c796f592e1d2536576a5a319c72d9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c65782d6865696665747a2f70726f67726573732d626172)](https://camo.githubusercontent.com/f9472b569e316d13ce121ee1049fe613c9c796f592e1d2536576a5a319c72d9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c65782d6865696665747a2f70726f67726573732d626172)[![GitHub License](https://camo.githubusercontent.com/b059c783b84d670caf4719d132d6391d3dabbe27c5708f60699ecf68b2dcc672/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616c65782d6865696665747a2f70726f67726573732d626172)](https://camo.githubusercontent.com/b059c783b84d670caf4719d132d6391d3dabbe27c5708f60699ecf68b2dcc672/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616c65782d6865696665747a2f70726f67726573732d626172)[![Packagist Dependency Version](https://camo.githubusercontent.com/5b76369fd7e84060b2519e0ece3833268d9324d2537e2b1786972bc94ad4b422/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f616c65782d6865696665747a2f70726f67726573732d6261722f706870)](https://camo.githubusercontent.com/5b76369fd7e84060b2519e0ece3833268d9324d2537e2b1786972bc94ad4b422/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f616c65782d6865696665747a2f70726f67726573732d6261722f706870)

[![Gif](https://github.com/Seraph90/my-gifs/raw/main/gifs/error-wait.gif?raw=true)](https://github.com/Seraph90/my-gifs/blob/main/gifs/error-wait.gif?raw=true)

Features
--------

[](#features)

- Compatible with PHP 7.4 and later
- Displays estimated completion time
- Separates successful and failed iterations
- Responds to terminal width changes
- Lets you configure the redraw interval

Why you might need this
-----------------------

[](#why-you-might-need-this)

When running long CLI commands, background jobs, or test scripts, it is useful to see that the process is still moving and estimate when it will finish. This library provides a compact progress bar for those cases.

Requirements
------------

[](#requirements)

- PHP 7.4+
- `ext-pcntl`
- A terminal with ANSI escape sequence support

Installation &amp; loading
--------------------------

[](#installation--loading)

Install the package with Composer:

```
composer require alex-heifetz/progress-bar
```

Or add it to your `composer.json` manually:

```
{
    "require": {
        "alex-heifetz/progress-bar": "^1.4"
    }
}
```

A Simple Example
----------------

[](#a-simple-example)

```
