Skip to content

It's a class to work with inputs/outputs from/to the gnu/linux terminal .

Notifications You must be signed in to change notification settings

AyachiOmarChaima/hydrogen-console

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

sudo composer require waliddz/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

[email protected]

About

It's a class to work with inputs/outputs from/to the gnu/linux terminal .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%