wizardloop/wizardcli

๐Ÿง™โ€โ™‚๏ธ WizardCLI โ€“ Magical PHP CLI styling: Colors, Tables, Progress bars & ASCII Art for beautiful terminal UX.

1.0.0 2025-07-02 21:15 UTC

This package is auto-updated.

Last update: 2025-07-02 22:58:52 UTC


README

The magical PHP CLI toolkit โ€” add color, tables, progress bars & ASCII Art to your terminal!

MIT License Tests Packagist Packagist Downloads Build Status

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

๐Ÿ“„ License

MIT License
Made with ๐Ÿช„ by WizardLoop

โœจ Time for magic in your terminal! โœจ