{"id":21771150,"url":"https://github.com/initphp/console","last_synced_at":"2026-05-19T06:36:53.129Z","repository":{"id":57699103,"uuid":"511153574","full_name":"InitPHP/Console","owner":"InitPHP","description":"It is a simple helper library that will allow you to write your console/cli application with PHP.","archived":false,"fork":false,"pushed_at":"2023-12-16T15:57:33.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T18:58:30.887Z","etag":null,"topics":["php","php-console","php-console-framework","php7"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InitPHP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-07-06T13:42:35.000Z","updated_at":"2022-07-08T06:37:03.000Z","dependencies_parsed_at":"2023-12-16T06:21:40.653Z","dependency_job_id":"d9fe6c25-7713-4b6f-b35d-aa9c2a23df94","html_url":"https://github.com/InitPHP/Console","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"f78ce117e470cddaf6b48788d08db1ad345ea094"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FConsole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FConsole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FConsole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FConsole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InitPHP","download_url":"https://codeload.github.com/InitPHP/Console/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244746790,"owners_count":20503264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","php-console","php-console-framework","php7"],"created_at":"2024-11-26T14:15:13.473Z","updated_at":"2026-05-19T06:36:52.846Z","avatar_url":"https://github.com/InitPHP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Console\nIt is a simple helper library that will allow you to write your console/cli application with PHP.\n\n## Requirements\n\n- PHP 7.2 or higher\n\n## Installation\n\n```\ncomposer require initphp/console\n```\n\n## Usage\n\n```php\n#!/usr/bin/env php\n\u003c?php\nrequire_once __DIR__ . '/../vendor/autoload.php';\nuse \\InitPHP\\Console\\{Application, Input, Output};\n\n$console = new Application(\"My Console Application\", '1.0');\n\n// Register commands ...\n\n// hello -name=John\n$console-\u003eregister('hello', function (Input $input, Output $output) {\n    if ($input-\u003ehasArgument('name')) {\n        $output-\u003ewriteln('Hello {name}', [\n            'name'  =\u003e $input-\u003egetArgument('name')\n        ]);\n    } else {\n        $output-\u003ewriteln('Hello World!');\n    }\n}, 'Says hello.');\n\n\n$console-\u003erun();\n```\n\n```\nphp console.php list\n```\n\n## Credits\n\n- [Muhammet ŞAFAK](https://www.muhammetsafak.com.tr) \u003c\u003cinfo@muhammetsafak.com.tr\u003e\u003e\n\n## License\n\nCopyright \u0026copy; 2022 [MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitphp%2Fconsole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finitphp%2Fconsole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitphp%2Fconsole/lists"}