wujunze/php-cli-color
wujunze/php-cli-color is a lightweight PHP library for adding ANSI colors and styles to command-line output. It supports foreground and background colors, 256-color terminals, and simple chained methods to make CLI scripts, logs, and console tools easier to read.
__callStatic wrapper.NO_COLOR, non-TTY output, and CI log capture?" This package emits raw escape sequences unconditionally — a genuine concern if output is piped into log aggregation or scheduler logs.Consider it when:
success()/warning()/error() helpers behind an internal interface.Look elsewhere when:
$this->info(), $this->error(), $this->line('<fg=green>...</>'), and <options=bold> are already available via Symfony Console with zero added dependencies — plus automatic TTY detection and --ansi/--no-ansi handling this package does not provide.nunomaduro/termwind, or laravel/prompts — not a color map.NO_COLOR, colorblind-safe palettes, meaningful non-color signal like [OK]/[FAIL] prefixes).To executives: This is a tiny, free, single-purpose utility for coloring terminal output. It is not a strategic dependency and requires no budget. My recommendation is not to adopt it — it has had no release since 2018, and the same result is available for free from the console component we already ship. The decision costs us nothing and avoids adding an unmaintained package to our dependency inventory.
To engineering: The functionality is ~50 lines: a color-name-to-ANSI-code map and a static accessor. Inside Laravel, use the built-in console helpers or Symfony's <fg=green> markup — they already handle TTY detection, --ansi/--no-ansi, and Windows terminals, which this package does not. If you want the ergonomics of success()/error()/warning(), add a three-method helper in our own codebase and wrap it so we control NO_COLOR and non-TTY behavior.
Bottom line: Low cost, low risk, low strategic value. Solve it in-house or with what's already installed; reserve the dependency slot for something that earns it.
How can I help you explore Laravel packages today?