alecrabbit / php-console-spinner
Colorful extremely flexible spinner for [async] php cli applications
Installs: 4 528
Dependents: 4
Suggesters: 0
Security: 0
Stars: 238
Watchers: 4
Forks: 15
Open Issues: 0
Requires
- php: >=8.2
Requires (Dev)
- alecrabbit/php-wcwidth: ^1.0.0-ALPHA.0
- fakerphp/faker: *
- nunomaduro/collision: ^7.0
- phpunit/php-code-coverage: *
- phpunit/phpunit: ^10.0
- react/event-loop: *
- react/http: *
- revolt/event-loop: ^1.0
- symfony/console: ^6.2
- symfony/var-dumper: *
Suggests
- ext-mbstring: For multibyte Unicode string functionality.
- ext-pcntl: For signal handling support.
- react/event-loop: For ReactPHP event-loop support.
- revolt/event-loop: For Revolt event-loop support.
This package is auto-updated.
Last update: 2023-03-30 14:48:53 UTC
README
Spinner - your task is running
🇺🇦 🏵️ PHP Console Spinner
New version 1.0.0
- WIP
- ‼️ API is subject to change until
1.0.0-BETA.0
- is intended to be used with event loop (see limitations)
Old version
0.55.0
is available in branch 0.55.x
Installation
composer require alecrabbit/php-console-spinner
Quick start (asynchronous)
use AlecRabbit\Spinner\Facade; $spinner = Facade::createSpinner(); // that's basically it :)
Examples can be found in example directory
For more information see Usage
Why?
Main purpose of this library is to provide a simple way to show spinner in console applications (mainly long-running ones). Spinner could be an indicator of running task. For more information see Features and Examples.
alecrabbit/php-console-spinner-extras library provides additional components to extend functionality:
- show progress of running task
- messages of some sort, like status messages
- additional spinners
Features
See Features and limitations for more details
Feature | |
---|---|
Extremely flexible | 🟢️ ️ |
Zero dependencies ️ | 🟢️ * |
Asynchronous | 🟢️ ️ |
Synchronous | 🟢️ ️ |
AutoStart (async) | 🟢️ ️ |
Signal handling (async) | 🟢️ ️ |
Cursor auto hide/show | 🟢️ ️ |
Links
- Inspired by sindresorhus/cli-spinners