gobwas / shellstyle
ShellStyle is a simple php class that allows you to get wrapped Unix/Linux colored output with ANSI escape codes
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 0
pkg:composer/gobwas/shellstyle
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-25 18:13:56 UTC
README
ShellStyle
ShellStyle is a simple php class that allows you to get wrapped Unix/Linux colored output with ANSI escape codes:
Usage
Usage of ShellStyle is quite simple:
use Gobwas\ShellStyle\ShellStyle;
// First way to define style
$green = new ShellStyle();
$green
->addStyle(ShellStyle::FOREGROUND_GREEN)
->addStyle(ShellStyle::STYLE_BOLD);
// Another way to define style
$yellow = new ShellStyle(array(ShellStyle::FOREGROUND_YELLOW));
echo $green->parse("Hello");
echo $yellow->parse("World!");