You are reading the documentation for the 2.x version. Switch to the current version 3.x.

Console

Berlioz uses league/climate package to manage output.

CLImate allows you to easily output colored text, special formatting, and more. It makes output to the terminal clearer and debugging a lot simpler.

The console is accessible from environment variable passed in argument of CommandInterface::run(Environment $env) method.

Output

Example to colorize output:

// ...

$env->console()->red('Red output');
$env->console()->output('Normal output');

For all capabilities of console, refers you to the official documentation.

Last updated: Thu, 18 Sep 2025 16:20