PHPackages                             knotsphp/system - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. knotsphp/system

ActiveLibrary[CLI &amp; Console](/categories/cli)

knotsphp/system
===============

Get information about your system

v1.0.2(1mo ago)22271MITPHPPHP ^8.2CI passing

Since Dec 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/knotsphp/system)[ Packagist](https://packagist.org/packages/knotsphp/system)[ GitHub Sponsors](https://github.com/SRWieZ)[ RSS](/packages/knotsphp-system/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (10)Versions (8)Used By (1)

System
======

[](#system)

[![Latest Stable Version](https://camo.githubusercontent.com/04ead8d01c043eb3ee2ed1286c768ba25702518290feeb1d36da45dbd1813108/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6f74737068702f73797374656d2f76)](https://packagist.org/packages/knotsphp/system)[![Total Downloads](https://camo.githubusercontent.com/8b3c30b092f719196f00a0b98c1c488effd689c05aabf6f5b68074d55f2efe5f/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6f74737068702f73797374656d2f646f776e6c6f616473)](https://packagist.org/packages/knotsphp/system)[![Latest Unstable Version](https://camo.githubusercontent.com/300297ddc5c928a2da30d00f7fa8f0f221486d55bc1d67144232dc490b3f87dc/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6f74737068702f73797374656d2f762f756e737461626c65)](https://packagist.org/packages/knotsphp/system)[![License](https://camo.githubusercontent.com/77ccb4efe6638e8c66c221efd41c61eefbb5dee6349ce5d142ebe41a3ad431c7/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6f74737068702f73797374656d2f6c6963656e7365)](https://packagist.org/packages/knotsphp/system)[![PHP Version Require](https://camo.githubusercontent.com/a2d042db6195d78ebf5307c3d02c54e07e75550454ad9ea14248dbef577bbc11/68747470733a2f2f706f7365722e707567782e6f72672f6b6e6f74737068702f73797374656d2f726571756972652f706870)](https://packagist.org/packages/knotsphp/system)[![GitHub Workflow Status (with event)](https://camo.githubusercontent.com/112442e50221b2e98006eae4ffb01074f72a0afd170838128e71e12304bac7ce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6e6f74737068702f73797374656d2f746573742e796d6c3f6c6162656c3d5465737473)](https://github.com/knotsphp/system/actions/workflows/test.yml)

A modern PHP library to get system information with Enums and Value Objects.

The goal is to get reliable and consistent system information across different operating systems.

This library use local commands to get the system information and parse the output to ensure consistency.

It also provides a command line utility: `sysinfo`.

Compatible with MacOS, Linux, and Windows.

This library is still very young and contributions are welcome.

🚀 Installation
--------------

[](#-installation)

```
composer require knotsphp/system
```

📚 Usage
-------

[](#-usage)

```
use KnotsPHP\System\System;
use KnotsPHP\System\Enums\OperatingSystem;

// Get the operating system
$os_enum = OperatingSystem::current(); // Returns an enum
$os = System::os(); // Returns an instance of OperatingSystemContract
```

The `OperatingSystemContract` provides the following methods through the `Windows`, `Linux`, and `MacOS` classes.

```
// Get basic system information
echo $os->name();           // MacOS    Ubuntu            Windows
echo $os->version();        // 15.2     20.04             10
echo $os->kernel();         // 24.2.0   5.4.0-42-generic  10.0.18363.1316
echo $os->build();          // 24C101   5.4.0-42-generic  21H2
```

📚 Use in command line
---------------------

[](#-use-in-command-line)

You can also use this library in the command line by using the `system` command.

It's recommended to install the library globally to use it in the command line.

```
composer global require knotsphp/system
```

Then you can use the `sysinfo` command.

```
# In your project directory
vendor/bin/sysinfo

# Globally installed
sysinfo
```

📖 Documentation
---------------

[](#-documentation)

This library is compatible with MacOS, Linux, and Windows.

Contributions are welcome to add more operating systems.

📋 TODO
------

[](#-todo)

- Make the Shell class usable through a pipeline to run commands through SSH
- Add an DataValueObject so the developer can feed raw data and pass it to other libraries
- Make a Machine class to get more information about the machine
- Make a Monitor class to get current system usage
- Make a Network class to get network information

Suggestions are welcome, but please follow these guidelines:

- Do not add anything that requires elevated access
- Do not add anything that requires writing to the system
- Do not add anything that requires installation of additional software

🤝 Contributing
--------------

[](#-contributing)

Clone the project and run `composer update` to install the dependencies.

Before pushing your changes, run `composer qa`.

This 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).

👥 Credits
---------

[](#-credits)

System was created by Eser DENIZ.

📝 License
---------

[](#-license)

System is licensed under the MIT License. See LICENSE for more information.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance92

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~255 days

Total

3

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/735894a4f6e39aa85e3d136abc9cf0be92da593d88731382384185293cbfe965?d=identicon)[SRWieZ](/maintainers/SRWieZ)

---

Top Contributors

[![SRWieZ](https://avatars.githubusercontent.com/u/1408020?v=4)](https://github.com/SRWieZ "SRWieZ (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

cliphpsysinfosystemuname

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/knotsphp-system/health.svg)

```
[![Health](https://phpackages.com/badges/knotsphp-system/health.svg)](https://phpackages.com/packages/knotsphp-system)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)[thettler/laravel-console-toolkit

This Package provides some usefully console features like the attribute syntax for arguments and options, validation, auto ask and casting.

324.1k](/packages/thettler-laravel-console-toolkit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
