wizardloop / wizardcli
๐งโโ๏ธ WizardCLI โ Magical PHP CLI styling: Colors, Tables, Progress bars & ASCII Art for beautiful terminal UX.
Fund package maintenance!
WizardLoop
wizardloop.t.me
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^10
README
The magical PHP CLI toolkit โ add color, tables, progress bars & ASCII Art to your terminal!
Turn your boring terminal into a magical world!
Add colors, enchanting tables, spellbinding progress bars, and wizardly ASCII art banners to any PHP console application.
โจ Features
- ๐ Colors & Styles โ Print colored and styled text in seconds
- ๐ช ASCII Art โ Wizard banners & magical terminal art
- ๐ Tables โ Clean, beautiful table rendering for your data
- โณ Progress Bars โ Show task progress with charm and multiple themes
- ๐ฉ Multiple Themes โ Wizard, Sorcerer, Dark, Gold & more
- ๐ Modern API โ Easy to use, works everywhere PHP runs
๐ Installation
composer require wizardloop/wizardcli
๐ช Quick Example
use WizardCLI\WizardCLI; require 'vendor/autoload.php'; $cli = new WizardCLI(['theme' => 'wizard']); $cli->art("WizardCLI"); // Magic banner $cli->color("Welcome to the magical CLI!", "magenta+bold"); $cli->table(["Name", "Spell"], [ ["Merlin", "Invisibility"], ["Morgana", "Fireball"] ]); $cli->progressBar(100, "Created By Wizard Loop | @WizardLoop"); for ($i = 1; $i <= 100; $i++) { usleep(40000); $cli->progressAdvance(); } $cli->progressFinish();
๐ More Examples
Progress Bar
$cli->progressBar(30, "Brewing potion"); for ($i = 1; $i <= 30; $i++) { usleep(40000); $cli->progressAdvance(); } $cli->progressFinish();
ASCII Art
$cli->art("โจ Wizard CLI โจ");
Table
$cli->table(["Wizard", "Power"], [ ["Gandalf", "Lightning"], ["Harry", "Expelliarmus"] ]);
See examples/ for more!
๐งช Run Tests
composer test
๐ ๏ธ Contributing
Pull requests, issues, and magical ideas are very welcome!
See CONTRIBUTING.md for details.
๐งโโ๏ธ Connect
- Telegram: wizardloop.t.me
- GitHub: WizardLoop
๐ License
MIT License
Made with ๐ช by WizardLoop
โจ Time for magic in your terminal! โจ