Last updated: Mon, 07 Jun 2021 22:39

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.