PHPackages                             ed9/php-indicators - 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. ed9/php-indicators

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

ed9/php-indicators
==================

PHP Indicators for command line interface (CLI)

v0.1.8(7y ago)04MITPHPPHP ^7.1

Since Sep 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ed9/php-indicators)[ Packagist](https://packagist.org/packages/ed9/php-indicators)[ RSS](/packages/ed9-php-indicators/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (10)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/739b21da360dd3d8dd34c752b967ccf784a66ee57df69611a17b63f0a717154c/68747470733a2f2f706f7365722e707567782e6f72672f6564392f7068702d696e64696361746f72732f762f737461626c65)](https://packagist.org/packages/ed9/php-indicators)[![Total Downloads](https://camo.githubusercontent.com/fa02e5361d4f65a5b0f5e41ffcec91b8f6d9387d7bdf1f8a867052c26d670933/68747470733a2f2f706f7365722e707567782e6f72672f6564392f7068702d696e64696361746f72732f646f776e6c6f616473)](https://packagist.org/packages/ed9/php-indicators)[![Travis CLI](https://camo.githubusercontent.com/794a864df98fc5ffbdeda726aaf55ee17d4d09127930ffc44a752a5dda6f8257/68747470733a2f2f7472617669732d63692e6f72672f6564392f7068702d696e64696361746f72732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ed9/php-indicators)[![License](https://camo.githubusercontent.com/c63b80f23310d9ff1c18bb1e44319fd92616445848b3f4fc2d1cf3e48b0c5ab0/68747470733a2f2f706f7365722e707567782e6f72672f6564392f7068702d696e64696361746f72732f6c6963656e7365)](https://packagist.org/packages/ed9/php-indicators)

Indicator library
=================

[](#indicator-library)

PHP Indicators for command line interface (CLI)

### Dependency notice

[](#dependency-notice)

To run this library you must have php 7.1 or greater.

### Installation

[](#installation)

This library can be found on [packagist](https://packagist.org/packages/ed9/php-indicators) and installed using composer:

`composer require ed9/php-indicators`

Loading indicator
-----------------

[](#loading-indicator)

Enable loading indicator for your CLI application. View the full example usage code at: [example](https://github.com/ed9/php-indicators/blob/master/examples/loading.php).

[![loading preview](https://camo.githubusercontent.com/ae846da3b645545a27d46808e772540f16982512d0963dfccfb983b11f83c480/68747470733a2f2f73332e65752d776573742d322e616d617a6f6e6177732e636f6d2f6564392f6769746875622f7068702d696e64696361746f72732f6c6f6164696e672d6578616d706c652d707265766965772e706e67)](https://camo.githubusercontent.com/ae846da3b645545a27d46808e772540f16982512d0963dfccfb983b11f83c480/68747470733a2f2f73332e65752d776573742d322e616d617a6f6e6177732e636f6d2f6564392f6769746875622f7068702d696e64696361746f72732f6c6f6164696e672d6578616d706c652d707265766965772e706e67)

#### Indicator methods:

[](#indicator-methods)

Initiate new loading instance by overwriting the total row count, the bar length and auto step increment straight from the constructor.

`$loading = new \Edward\Indicator\Loading(100, 30, true);`

Overwrite the bar length on demand

`$loading->setBarLength(30);`

Overwrite the total row count on demand

`$loading->setTotal(100);`

Overwrite the necessity for steps to be incremented on every ping automatically. If set to false, the script will not increment when ping is called but will rely on you to update via setCurrent()

`$loading->setAutoIncrement(true);`

You can change the current step even if auto increment is enabled, it will follow your input.

`$loading->setCurrent(0);`

Run ping on every row you are processing and it will output the string into your console if no argument is provided.

`$loading->ping();`

Alternatively you can provide a callable argument to process the output yourself.

- The variables you will receive in the argument:
- `string` - A formatted string that can be outputted
- `process.current` - Integer representing current step
- `process.total` - Integer representing total row count
- `percentageCompleted` - Float represented completion percentage
- `elapsed.value` - Time unit elapsed since initial ping
- `elapsed.format` - Time format elapsed since initial ping (seconds,minutes,hours)
- `eta.value` - Estimated time unit until completion
- `eta.format` - Estimated time format until completion (seconds,minutes,hours)

```
$loading->ping(function ($info) use ($loading) {
    print $info['string'];
});

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

9

Last Release

2787d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19610073?v=4)[Edgars Kohs](/maintainers/ed9)[@ed9](https://github.com/ed9)

---

Top Contributors

[![ed9](https://avatars.githubusercontent.com/u/19610073?v=4)](https://github.com/ed9 "ed9 (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ed9-php-indicators/health.svg)

```
[![Health](https://phpackages.com/badges/ed9-php-indicators/health.svg)](https://phpackages.com/packages/ed9-php-indicators)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

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

Initialize Symfony Console commands from annotated command class methods.

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

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[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)

PHPackages © 2026

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