An open API service indexing awesome lists of open source software.

https://github.com/initphp/console

It is a simple helper library that will allow you to write your console/cli application with PHP.
https://github.com/initphp/console

php php-console php-console-framework php7

Last synced: 10 months ago
JSON representation

It is a simple helper library that will allow you to write your console/cli application with PHP.

Awesome Lists containing this project

README

          

# Console
It is a simple helper library that will allow you to write your console/cli application with PHP.

## Requirements

- PHP 7.2 or higher

## Installation

```
composer require initphp/console
```

## Usage

```php
#!/usr/bin/env php
register('hello', function (Input $input, Output $output) {
if ($input->hasArgument('name')) {
$output->writeln('Hello {name}', [
'name' => $input->getArgument('name')
]);
} else {
$output->writeln('Hello World!');
}
}, 'Says hello.');

$console->run();
```

```
php console.php list
```

## Credits

- [Muhammet ŞAFAK](https://www.muhammetsafak.com.tr) <>

## License

Copyright © 2022 [MIT License](./LICENSE)