Clio is an open source software library to help improve PHP command line output, assisting in designing a display that is user friendly, using common design techniques.

The Clio project was born to encapsulate those crazy escape sequences to allow for easier text styling, as well as easier text positioning, as in a table, paragraphs, lists, etc. All console fonts are monospaced, which gives the ability to line things up neatly, making for powerful typographical techniques to better communicate with your user.

Clio is an easy to use PHP class for styling PHP CLI programs. In general, you will want to create one Clio instance to represent the terminal in which it is controlling.

Clio will send out the appropriate escape sequencing (depending on the mode) to achieve the text display you are requiring. If you are specifying RGB colors, but have to deal with a terminal capability of less colors, Clio utilizes the Color object to get as close as possible to that color.

To install via Composer:

composer require 1happyplace/clio

Or if you are not using composer, you can download it on the GitHub Repository: 1HappyPlace/clio.

The Clio set of software consists of the following classes:

Also, you can learn about Escape Sequencing.