Classes and helpers for terminal (based in league/climate + a little more)

2.2.2 2019-08-16 16:21 UTC

This package is auto-updated.

Last update: 2020-02-16 17:57:10 UTC


License Build Status codecov

This package is using package league/climate as base. A few basic static methods has been added for easy access.

Easy access to CLImate

CLImate can easily be reached through singleton method climate(). Documentation for CLImate can be found on

$climate = Console::climate();

Static often used methods.

// Get width of terminal.
$width = Console::getTerminalWidth();

// Get height of terminal.
$height = Console::getTerminalHeight();

// Show error message(s).

// Show simple message(s) with no styling.

// Show info message(s).

// Show shout message(s).

// Show warning message(s) in cyan.

// Show table with option to set new headers.
Console::table(array $rows, array $headers = []);

Additional static methods.

// Show separator (default length = 80. Can be changed through setLineLength*).
Console::separator($character = '-');

// Show header (title through ::info() followed by ::separator('=')).

// Show properties in a table with properties at the left.
Console::properties(array $properties, $separator = ':');

// Show list of words (same as implode($separator, $words)).
Console::words(array $words, $separator = ', ');


This package is heavily based on the awesome work of developers in team league (The League of Extraordinary Packages). All credits for the excellent work goes to them.