Download the PHP package sitnikovik/clipher without Composer
On this page you can find all versions of the php package sitnikovik/clipher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sitnikovik/clipher
More information about sitnikovik/clipher
Files in sitnikovik/clipher
Package clipher
Short Description CLI tool to beatify your scripts with colors, bolds, loading bars and much more
License MIT
Informations about the package clipher
Console
Beatifies your cli scripts with colors, bolds, loading bars and much more
- Input
- confirm
- prompt
- Output
- println
- separate
- quit
- panic
- Colors
- Progressbar
Get started
Just create an object of Sitnikovik\Console\Console
and go on:
Input
confirm
Make user approve or decline some process with the y/n
prompt
Asks user input the answer needed to continue the program
Output
println
Prints the text console output with new line
separate
Prints a separate bar with provided width or stretched if width is 0
quit
Exit the program with 0
code and prints message text if not empty
panic
Exit the program with provided code signalizing the program failed and prints message in red color if not empty
Colors
If you want to switch color styles you have to provide Sitnikovik\Console\Style\StyleInterface
classes for text and background layout to colorize the output.
Customize style colors
Eitherway, you can create custom classes extended by Sitnikovik\Console\Style\AbstractStyle
or others implemented Sitnikovik\Console\Style\StyleInterface
and modify colors you prefer.
Colorize text
There are at least 8 methods to colorize text implemented by Sitnikovik\Console\Style\AbstractStyle
and Sitnikovik\Console\Style\StyleInterface
. Class calls the interface methods:
- black()
- red()
- green()
- yellow()
- blue()
- purple()
- cyan()
- white()
They return provided text colorized to called color.
Progress bar
If you need to visualize some process progress you can use Sitnikovik\Console\Progressbar\Progressbar
All versions of clipher with dependencies
ext-readline Version *