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

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

artarts36/shell-command
=======================

OOP ShellCommand

2.1.15(4y ago)02.1k↓76.9%5MITPHPPHP ^7.3 || 8.\*CI failing

Since Jun 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ArtARTs36/ShellCommand)[ Packagist](https://packagist.org/packages/artarts36/shell-command)[ RSS](/packages/artarts36-shell-command/feed)WikiDiscussions 2.x Synced yesterday

READMEChangelog (10)Dependencies (5)Versions (42)Used By (5)

ShellCommand - wrapper for calls console commands
-------------------------------------------------

[](#shellcommand---wrapper-for-calls-console-commands)

[![PHP Composer](https://github.com/ArtARTs36/ShellCommand/workflows/Testing/badge.svg?branch=master)](https://github.com/ArtARTs36/ShellCommand/workflows/Testing/badge.svg?branch=master)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Total Downloads](https://camo.githubusercontent.com/840fd636f536c8b2d3e75bc565c66340fb9a7aa7da2cf6f56f3e3d14f451c483/68747470733a2f2f706f7365722e707567782e6f72672f6172746172747333362f7368656c6c2d636f6d6d616e642f642f746f74616c2e737667)](https://poser.pugx.org/artarts36/pushall-sender/d/total.svg)

---

### Installation:

[](#installation)

Run: `composer require artarts36/shell-command`

---

### Examples:

[](#examples)

#### 1. Arguments &amp;&amp; Options

[](#1-arguments--options)

```
use ArtARTs36\ShellCommand\ShellCommand;

$command = ShellCommand::make('git')->addArgument('push')->addOption('force');

var_dump($command->__toString()); // git 'push' --force 2>&1
```

#### 2. Execute Commands

[](#2-execute-commands)

```
use ArtARTs36\ShellCommand\ShellCommand;

$command = ShellCommand::make('git')->addArgument('pull');
$result = $command->execute();

var_dump($result->getCommandLine());
var_dump($result->getCode());
var_dump($result->getDate());
var_dump($result->getResult());
var_dump($result->getError());
```

#### 3. SSH

[](#3-ssh)

To use ssh, you need to connect the library ["artarts36/shell-command-ssh-executor"](https://github.com/ArtARTs36/php-shell-command-ssh-executor):

Run command `artarts36/shell-command-ssh-executor`

```
$connection = \ArtARTs36\ShellCommandSshExecutor\SSH\Connection::withPassword(
    'remote.host',
    'user',
    'password'
);

$command = \ArtARTs36\ShellCommand\ShellCommand::make('ls');

$command->setExecutor(new \ArtARTs36\ShellCommandSshExecutor\SshCommandExecutor($connection));

var_dump($command->getShellResult());
```

#### 4. Mocking

[](#4-mocking)

```
$executor = new \ArtARTs36\ShellCommand\Executors\TestExecutor();

$command = new \ArtARTs36\ShellCommand\ShellCommand('reboot');

$executor->addSuccess('OK');

$command->execute($executor);
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~106 days

Total

41

Last Release

1236d ago

Major Versions

1.6.7 → 2.0.02021-08-09

PHP version history (2 changes)1.0PHP ^7.3

1.5.0PHP ^7.3 || 8.\*

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8027278?v=4)[Artem Ukrainskii](/maintainers/ArtARTs36)[@ArtARTs36](https://github.com/ArtARTs36)

---

Top Contributors

[![ArtARTs36](https://avatars.githubusercontent.com/u/8027278?v=4)](https://github.com/ArtARTs36 "ArtARTs36 (79 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  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)

PHPackages © 2026

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