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.
- Host: GitHub
- URL: https://github.com/initphp/console
- Owner: InitPHP
- License: mit
- Created: 2022-07-06T13:42:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-16T15:57:33.000Z (about 2 years ago)
- Last Synced: 2025-02-27T18:58:30.887Z (10 months ago)
- Topics: php, php-console, php-console-framework, php7
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)