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.1(1y ago)2681MITPHPPHP ^8.2

Since Dec 24Pushed 1y 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 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)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

30

—

LowBetter than 64% of packages

Maintenance40

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

510d 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 (12 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

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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