Ratings | | Unique User Downloads | | Download Rankings |
Not enough user ratings | | Total: 85 | | All time: 9,912 This week: 200 |
|
Description | | Author |
This package can process the shell console input and output.
There is one input class that processes the command line arguments and prompts the user for input values.
The output class can output text with a given foreground and background color, optionally underlined. It can also show a progress bar with a given size. | |
 |
|
Innovation award
 Nominee: 2x |
|
Details
hydrogen-console
CLI library to work with inputs/outputs from/to the gnu/linux terminal .
License
MIT
Requirements
-
php7.
-
Input/output streams local.
-
exec function activated.
-
Gnu/Linux system or mac os (not working on Microsoft Widnows).
Install
composer require dilawsky/hydrogen-console dev-master
DOCS
Download the docs
Simple example
<?php
require "vendor/autoload.php";
use Console\Input\Classes\Input as Input;
use Console\Output\Classes\Output as Output;
$Input = new Input;
$Output = new Output;
$Input->process($argv);
$Input->ask("Would you like a tea ?", function($answer) use ($Output) {
if($answer === "yes") {
$Output->write("preparing the tea ...","green");
}
});
?>
Contact
walidlaggoune159@gmail.com
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.