jord-jd/php-cli-progress-bar

Progress bar for command line PHP scripts

Fund package maintenance!
DivineOmega

Installs: 21

Dependents: 8

Suggesters: 0

Security: 0

Stars: 15

Watchers: 0

Forks: 0

Open Issues: 1

pkg:composer/jord-jd/php-cli-progress-bar

v4.0.0 2026-02-14 21:40 UTC

This package is auto-updated.

Last update: 2026-02-14 22:02:34 UTC


README

Progress bar for command line PHP scripts.

Example of PHP CLI Progress Bar

Installation

To install, just run the following Composer command.

composer require jord-jd/php-cli-progress-bar

Usage

The following code snippet shows a basic usage example.

$max = 250;

$progressBar = new JordJD\CliProgressBar\ProgressBar;
$progressBar->setMaxProgress($max);

for ($i=0; $i < $max; $i++) { 
    usleep(200000); // Instead of usleep, process a part of your long running task here.
    $progressBar->advance()->display();
}

$progressBar->complete();