PHP Classes

Hydrogen Console: Process the shell console input and output

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 86 All time: 10,022 This week: 560Up
Version License PHP version Categories
hydrogen-console 1.0Custom (specified...7Console, PHP 7
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.

Picture of LAGGOUNE Walid
  Performance   Level  
Innovation award
Innovation award
Nominee: 3x

 

Documentation

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


  Files folder image Files (24)  
File Role Description
Files folder imageConsole (3 directories)
Files folder imagetester (1 file)
Files folder imagetests (1 file)
Files folder imagevendor (1 file, 1 directory)
Accessible without login Plain text file app.php Aux. Auxiliary script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:86
This week:0
All time:10,022
This week:560Up