{"id":23871431,"url":"https://github.com/knotsphp/system","last_synced_at":"2026-02-01T22:31:20.513Z","repository":{"id":269577913,"uuid":"907804566","full_name":"knotsphp/system","owner":"knotsphp","description":"A modern PHP library to get system information with Enums and Value Objects.","archived":false,"fork":false,"pushed_at":"2024-12-24T21:38:10.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T02:21:33.648Z","etag":null,"topics":["cli","php","sysinfo","system","uname"],"latest_commit_sha":null,"homepage":"https://srwiez.com/open-source","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/knotsphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"SRWieZ"}},"created_at":"2024-12-24T12:34:44.000Z","updated_at":"2025-07-24T10:13:58.000Z","dependencies_parsed_at":"2025-09-08T21:32:19.625Z","dependency_job_id":"5183b466-579b-47af-99ed-c21b95263658","html_url":"https://github.com/knotsphp/system","commit_stats":null,"previous_names":["knotsphp/system"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/knotsphp/system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knotsphp%2Fsystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knotsphp%2Fsystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knotsphp%2Fsystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knotsphp%2Fsystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knotsphp","download_url":"https://codeload.github.com/knotsphp/system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knotsphp%2Fsystem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","php","sysinfo","system","uname"],"created_at":"2025-01-03T14:58:32.260Z","updated_at":"2026-02-01T22:31:20.496Z","avatar_url":"https://github.com/knotsphp.png","language":"PHP","funding_links":["https://github.com/sponsors/SRWieZ"],"categories":[],"sub_categories":[],"readme":"# System\n[![Latest Stable Version](https://poser.pugx.org/knotsphp/system/v)](https://packagist.org/packages/knotsphp/system) \n[![Total Downloads](https://poser.pugx.org/knotsphp/system/downloads)](https://packagist.org/packages/knotsphp/system) \n[![Latest Unstable Version](https://poser.pugx.org/knotsphp/system/v/unstable)](https://packagist.org/packages/knotsphp/system) \n[![License](https://poser.pugx.org/knotsphp/system/license)](https://packagist.org/packages/knotsphp/system) \n[![PHP Version Require](https://poser.pugx.org/knotsphp/system/require/php)](https://packagist.org/packages/knotsphp/system) \n[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/knotsphp/system/test.yml?label=Tests)](https://github.com/knotsphp/system/actions/workflows/test.yml)\n\nA modern PHP library to get system information with Enums and Value Objects.\n\nThe goal is to get reliable and consistent system information across different operating systems.\n\nThis library use local commands to get the system information and parse the output to ensure consistency.\n\nIt also provides a command line utility: `sysinfo`.\n\nCompatible with MacOS, Linux, and Windows.\n\nThis library is still very young and contributions are welcome.\n\n## 🚀 Installation\n\n```bash\ncomposer require knotsphp/system\n```\n\n## 📚 Usage\n\n```php\nuse KnotsPHP\\System\\System;\nuse KnotsPHP\\System\\Enums\\OperatingSystem;\n\n// Get the operating system\n$os_enum = OperatingSystem::current(); // Returns an enum\n$os = System::os(); // Returns an instance of OperatingSystemContract\n````\n\nThe `OperatingSystemContract` provides the following methods through the `Windows`, `Linux`, and `MacOS` classes.\n```php\n// Get basic system information\necho $os-\u003ename();           // MacOS    Ubuntu            Windows\necho $os-\u003eversion();        // 15.2     20.04             10\necho $os-\u003ekernel();         // 24.2.0   5.4.0-42-generic  10.0.18363.1316\necho $os-\u003ebuild();          // 24C101   5.4.0-42-generic  21H2\n```\n\n## 📚 Use in command line\n\nYou can also use this library in the command line by using the `system` command.\n\nIt's recommended to install the library globally to use it in the command line.\n```bash\ncomposer global require knotsphp/system\n```\n\nThen you can use the `sysinfo` command.\n```bash\n# In your project directory\nvendor/bin/sysinfo\n\n# Globally installed\nsysinfo\n```\n\n## 📖 Documentation\nThis library is compatible with MacOS, Linux, and Windows.\n\nContributions are welcome to add more operating systems.\n\n\n## 📋 TODO\n- [ ] Make the Shell class usable through a pipeline to run commands through SSH\n- [ ] Add an DataValueObject so the developer can feed raw data and pass it to other libraries\n- [ ] Make a Machine class to get more information about the machine\n- [ ] Make a Monitor class to get current system usage\n- [ ] Make a Network class to get network information\n\nSuggestions are welcome, but please follow these guidelines:\n- Do not add anything that requires elevated access\n- Do not add anything that requires writing to the system\n- Do not add anything that requires installation of additional software\n\n## 🤝 Contributing\nClone the project and run `composer update` to install the dependencies.\n\nBefore pushing your changes, run `composer qa`. \n\nThis will run [pint](http://github.com/laravel/pint) (code style), [phpstan](http://github.com/phpstan/phpstan) (static analysis), and [pest](http://github.com/pestphp/pest) (tests).\n\n## 👥 Credits\n\nSystem was created by Eser DENIZ.\n\n## 📝 License\n\nSystem is licensed under the MIT License. See LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknotsphp%2Fsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknotsphp%2Fsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknotsphp%2Fsystem/lists"}