{"id":18389543,"url":"https://github.com/netherphp/console","last_synced_at":"2025-07-22T09:09:02.322Z","repository":{"id":57025602,"uuid":"39045068","full_name":"netherphp/console","owner":"netherphp","description":"A CLI Parser.","archived":false,"fork":false,"pushed_at":"2025-05-13T20:29:46.000Z","size":264,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"redux","last_synced_at":"2025-06-17T02:05:13.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netherphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-14T00:46:08.000Z","updated_at":"2025-05-13T20:29:49.000Z","dependencies_parsed_at":"2023-10-14T14:22:13.294Z","dependency_job_id":"0fcde8dc-9922-41da-b7ee-6857a68d1663","html_url":"https://github.com/netherphp/console","commit_stats":{"total_commits":120,"total_committers":8,"mean_commits":15.0,"dds":"0.42500000000000004","last_synced_commit":"0c10162d232cf40ecb6df261e77d99d841d6020a"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/netherphp/console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netherphp%2Fconsole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netherphp%2Fconsole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netherphp%2Fconsole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netherphp%2Fconsole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netherphp","download_url":"https://codeload.github.com/netherphp/console/tar.gz/refs/heads/redux","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netherphp%2Fconsole/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266462799,"owners_count":23932867,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-06T01:43:41.430Z","updated_at":"2025-07-22T09:09:02.289Z","avatar_url":"https://github.com/netherphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Nether Console (netherphp/console)**\n\n[![Packagist](https://img.shields.io/packagist/v/netherphp/console.svg?style=for-the-badge)](https://packagist.org/packages/netherphp/console)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/netherphp/console/phpunit.yml?style=for-the-badge)](https://github.com/netherphp/console/actions)\n[![codecov](https://img.shields.io/codecov/c/gh/netherphp/console?style=for-the-badge\u0026token=VQC48XNBS2)](https://codecov.io/gh/netherphp/console)\n\nThis package provides some basic functionality for creating command line interfaces via PHP 8 attributes.\n\n\n\n\n# Quickstart\n\n```php\nrequire('vendor/autoloader.php');\n\nuse Nether\\Console\\Meta\\Command;\nuse Nether\\Console\\Meta\\Info;\nuse Nether\\Console\\Meta\\Arg;\nuse Nether\\Console\\Meta\\Toggle;\n\nclass App\nextends Nether\\Console\\Client {\n\n\t#[Command]\n\t#[Info('A whatever command.')]\n\tpublic function\n\tWhatever():\n\tint {\n\n\t\techo 'Whatever', PHP_EOL;\n\t\treturn 0;\n\t}\n\n\t#[Command]\n\t#[Info('A whenever command.')]\n\t#[Arg('date', 'A date input.')]\n\t#[Toggle('-u', 'Output as unix time.')]\n\tpublic function\n\tWhenever():\n\tint {\n\n\t\t$Date = $this-\u003eGetInput(1);\n\t\t$Unixise = $this-\u003eGetOption('u');\n\n\t\tif($Unixise)\n\t\techo date('U', strtotime($Date));\n\t\telse\n\t\techo date('Y-m-d', strtotime($Date));\n\n\t\techo PHP_EOL;\n\n\t\treturn 0;\n\t}\n\n}\n\nexit((new App)-\u003eRun());\n```\n\n```\n$ php ./test.php\n\nUSAGE: test.php \u003ccommand\u003e \u003cargs\u003e\n\n  whatever\n\n    A whatever command.\n\n  whenever \u003cdate\u003e\n\n    A whenever command.\n\n    -u\n      Output as unix time.\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetherphp%2Fconsole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetherphp%2Fconsole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetherphp%2Fconsole/lists"}