PHPackages                             ghostwriter/shell - 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. ghostwriter/shell

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

ghostwriter/shell
=================

Execute commands and external programs

0.1.4(3mo ago)13.3M—3.1%8BSD-3-ClausePHPPHP ~8.4.0 || ~8.5.0

Since Jun 22Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ghostwriter/shell)[ Packagist](https://packagist.org/packages/ghostwriter/shell)[ Docs](https://github.com/ghostwriter/shell)[ GitHub Sponsors](https://github.com/sponsors/ghostwriter)[ RSS](/packages/ghostwriter-shell/feed)WikiDiscussions 0.1.x Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (14)Used By (8)

Shell
=====

[](#shell)

[![GitHub Sponsors](https://camo.githubusercontent.com/2ef96276cdb3db418ccb3c908bb48a83d4fb3b3660000e9088fc3bd901253592/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f67686f73747772697465723f6c6162656c3d53706f6e736f722b4067686f73747772697465722f7368656c6c266c6f676f3d4769744875622b53706f6e736f7273)](https://github.com/sponsors/ghostwriter)[![Automation](https://github.com/ghostwriter/shell/actions/workflows/automation.yml/badge.svg)](https://github.com/ghostwriter/shell/actions/workflows/automation.yml)[![Supported PHP Version](https://camo.githubusercontent.com/31c3413d95fb2c6a1e6c5ead1714f556f59b3c2eed95c1181a784d0b9d893050/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f67686f73747772697465722f7368656c6c3f636f6c6f723d383839326266)](https://www.php.net/supported-versions)[![Downloads](https://camo.githubusercontent.com/432cbdedb22d4c17cd87bf451ad3b71db13b52942cf66916031e322bba1cba65/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f67686f73747772697465722f7368656c6c3f636f6c6f723d626c7565)](https://packagist.org/packages/ghostwriter/shell)

Execute commands and external programs

Warning

This project is not finished yet, work in progress.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ghostwriter/shell
```

### Star ⭐️ this repo if you find it useful

[](#star-️-this-repo-if-you-find-it-useful)

You can also star (🌟) this repo to find it easier later.

Usage
-----

[](#usage)

```
$shell = Shell::new();

$shell->execute('cd', [sys_get_temp_dir()]);

$result = $shell->execute(PHP_BINARY, ['-r', 'echo "#BlackLivesMatter";']);

$exitCode = $result->exitCode(); // 0
if ($exitCode !== 0) {
    throw new RuntimeException($result->stderr());
}

if ($exitCode === 0) {
    echo $result->stdout(); // "#BlackLivesMatter"
}
```

### Credits

[](#credits)

- [Nathanael Esayeas](https://github.com/ghostwriter)
- [All Contributors](https://github.com/ghostwriter/shell/contributors)

### Changelog

[](#changelog)

Please see [CHANGELOG.md](./CHANGELOG.md) for more information on what has changed recently.

### License

[](#license)

Please see [LICENSE](./LICENSE) for more information on the license that applies to this project.

### Security

[](#security)

Please see [SECURITY.md](./SECURITY.md) for more information on security disclosure process.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance85

Actively maintained with recent releases

Popularity44

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity55

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 ~91 days

Recently: every ~15 days

Total

8

Last Release

54d ago

Major Versions

0.2.x-dev → 1.0.x-dev2026-03-25

PHP version history (2 changes)0.1.0PHP &gt;=8.3

0.1.1PHP ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1dbb0131801cc451dad9917ab29aa823b25d7eebc9f3875a9d481d109bdb44ee?d=identicon)[ghostwriter](/maintainers/ghostwriter)

---

Top Contributors

[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (1146 commits)")

---

Tags

ghostwriterprocessshellshellprocessghostwriter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ghostwriter-shell/health.svg)

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

###  Alternatives

[psy/psysh

An interactive shell for modern PHP.

9.8k545.6M719](/packages/psy-psysh)[mikehaertl/php-shellcommand

An object oriented interface to shell commands

32437.5M61](/packages/mikehaertl-php-shellcommand)[kevinlebrun/colors.php

Colors for PHP CLI scripts

3426.7M45](/packages/kevinlebrun-colorsphp)[mrrio/shellwrap

Use any command-line tool as a PHP function.

738198.8k2](/packages/mrrio-shellwrap)[titasgailius/terminal

Terminal is an Elegent wrapper around Symfony's Process component.

512340.9k11](/packages/titasgailius-terminal)[ptlis/shell-command

A basic wrapper around execution of shell commands.

2256.0k2](/packages/ptlis-shell-command)

PHPackages © 2026

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