PHPackages                             isaeken/spinner - 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. isaeken/spinner

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

isaeken/spinner
===============

Elegant spinner for interactive CLI apps.

1.4.5(4y ago)821MITPHPPHP ^8.0

Since Jun 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/isaeken/spinner)[ Packagist](https://packagist.org/packages/isaeken/spinner)[ Docs](https://github.com/isaeken/spinner)[ RSS](/packages/isaeken-spinner/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

PHP Spinner
===========

[](#php-spinner)

> Elegant spinner for interactive CLI apps.
>
> PHP alternative for

[![Spinner](./example/example.gif)](./example/example.gif)

---

```
use IsaEken\Spinner\Spinner;$result = Spinner::run(function () {
    Spinner::setTitle('Calculating...');
    $a = 1;
    $b = 2;
    $c = $a + $b;
    Spinner::setTitle('Waiting...');
    sleep($c);
    return $c;
});

echo "The result is: $result!";
```

---

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

[](#requirements)

- PHP ^8.0
- Windows or Unix (Tested on Windows 10)
- PCNTL extension suggested on unix systems.

> Icons work properly in Windows Terminal application. You can create theme to remove or change icons.

---

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

[](#installation)

You can install using composer.

```
composer require isaeken/spinner
```

---

Examples
--------

[](#examples)

```
use IsaEken\Spinner\Enums\Status;
use IsaEken\Spinner\Spinner;
use IsaEken\Spinner\Themes\ClassicTheme;

// create spinner (you do not needed this because the 'run' command are automatically creates an instance.)
$spinner = new Spinner();
// or
$spinner = Spinner::getInstance();

// create a spinner process
// with theme
$execution_result = Spinner::run(fn () => 'Hello World!', ClassicTheme::class);
// without theme
$execution_result = Spinner::run(function () {
    // get the spinner instance.
    $spinner = Spinner::getInstance();

    // set the process title.
    Spinner::setTitle('Hello World!');
    // alternative
    $spinner->setTitle('Hello World!');

    // set the process status.
    Spinner::setStatus(Status::Success);
    Spinner::setStatus(Status::Warning);
    Spinner::setStatus(Status::Failed);

    // the end of process
    return 'Hello World!';
});

echo $execution_result; // Hello World!
```

---

Example Theme
-------------

[](#example-theme)

```
use Illuminate\Support\Collection;
use IsaEken\Spinner\Enums\Status;
use IsaEken\Spinner\Interfaces\ThemeInterface;
use IsaEken\Spinner\Themes\DefaultTheme;

class ExampleTheme extends DefaultTheme implements ThemeInterface
{
    /**
     * @inheritDoc
     */
    public static function frames(): Collection
    {
        return collect([
            '⠋',
            '⠙',
            '⠹',
            '⠸',
            '⠼',
            '⠴',
            '⠦',
            '⠧',
            '⠇',
            '⠏',
        ]);
    }

    /**
     * @inheritDoc
     */
    public static function icons(): Collection
    {
        return collect([
            Status::Success => '✔️',
            Status::Warning => '⚠️',
            Status::Failed  => '❌',
        ]);
    }

    /**
     * @inheritDoc
     */
    public static function messages(): Collection
    {
        return collect([
            Status::Success => 'Process successfully completed.',
            Status::Warning => 'Process completed but the warnings alerted.',
            Status::Failed  => 'Process cannot be completed successfully.',
        ]);
    }

    /**
     * @inheritDoc
     */
    public static function colors(): Collection
    {
        return collect([
            Status::Success => "\e[32m",
            Status::Warning => "\e[33m",
            Status::Failed  => "\e[31m",
        ]);
    }
}
```

---

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Recently: every ~19 days

Total

7

Last Release

1712d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27427375a2832cfe00cf076041951fd56f9cafa9696e77887bee805101f49bb9?d=identicon)[isaeken](/maintainers/isaeken)

---

Top Contributors

[![isaeken](https://avatars.githubusercontent.com/u/57031552?v=4)](https://github.com/isaeken "isaeken (21 commits)")

### Embed Badge

![Health badge](/badges/isaeken-spinner/health.svg)

```
[![Health](https://phpackages.com/badges/isaeken-spinner/health.svg)](https://phpackages.com/packages/isaeken-spinner)
```

###  Alternatives

[humbug/php-scoper

Prefixes all PHP namespaces in a file or directory.

7963.0M35](/packages/humbug-php-scoper)[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[bestmomo/nice-artisan

Web interface for Laravel Artisan

215149.3k](/packages/bestmomo-nice-artisan)[mahocommerce/maho

Free and open source ecommerce platform, created in 2024 on the M1 platform, PHP 8.3+

1322.1k12](/packages/mahocommerce-maho)

PHPackages © 2026

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