PHPackages                             gud3/executor - 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. gud3/executor

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

gud3/executor
=============

This extension works with files both locally and remotely

1.1.0-stable(8y ago)045Apache-2.0PHP

Since Jul 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/gud3/executor)[ Packagist](https://packagist.org/packages/gud3/executor)[ RSS](/packages/gud3-executor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Executor
========

[](#executor)

This extension works with files both locally and remotely. It can run commands in console mode. There are two different flags for execution with a response from the command and without (then the script will not wait for execution, an imitation of asynchronous execution). There are three public methods for working with the class: `exec(), getFile(), setFile()`. Each of the functions has a number of input parameters from which you can see below. To connect to the ssh2 in the constructor of the object, you need to transfer the data for the connection.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Enter run

```
php composer.phar require --prefer-dist gud3/executor "*"

```

or add

```
"gud3/executor": ">=1.0.0"

```

to the require section of your `composer.json` file.

Usage local
-----------

[](#usage-local)

To execute the command locally in the system where the script is located:

```
$console = (new \gud3\executor\Local())->exec('command');

```

The variable in the console will be the result of executing the command line. For asynchronous execution (mostly used to run PHP or other scripts), you must pass the second parameter to true.

```
$console = (new \gud3\executor\Local())->exec('command', true);

```

Also, to execute a number of commands, you can pass an array to a function. And they are executed one after another.

```
$console = (new \gud3\executor\Local())->exec(['command1', 'command2']);

```

Usage Ssh2 protocol
-------------------

[](#usage-ssh2-protocol)

To connect via the protocol, you must enter the IP address, login and password.

```
$connect = new \gud3\executor\Ssh2($ip, $login, $password, $port);
$console = $connect->exec(['command1', 'command2', 'command3']);

```

You can get the contents of the file as follows:
------------------------------------------------

[](#you-can-get-the-contents-of-the-file-as-follows)

```
$local = new \gud3\executor\Local();
$file = $local->getFile($path_to_file, $file_name);

```

or remotely

```
$local = new \gud3\executor\Ssh2($ip, $login, $password, $port);
$file = $local->getFile($path_to_file, $file_name);

```

Overwrite the file if it exists. If the file does not exist then it will be created
-----------------------------------------------------------------------------------

[](#overwrite-the-file-if-it-exists-if-the-file-does-not-exist-then-it-will-be-created)

```
$result = $local->setFile($path_to_file, $file_name, $content);

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

3161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8626fdc5b30c9e2aba183d1981e7a69f6840f07998647391396b3cbf8d328590?d=identicon)[gud3](/maintainers/gud3)

---

Top Contributors

[![gud3](https://avatars.githubusercontent.com/u/16295609?v=4)](https://github.com/gud3 "gud3 (5 commits)")

---

Tags

consolefilessh2executorexecexec-asyncexecute-ssh2-commandset-content-to-filessh2-filling-out-filesssh2-file-get-content

### Embed Badge

![Health badge](/badges/gud3-executor/health.svg)

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

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B11.3k](/packages/symfony-console)[psy/psysh

An interactive shell for modern PHP.

9.8k545.6M719](/packages/psy-psysh)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M286](/packages/nunomaduro-termwind)[wp-cli/php-cli-tools

Console utilities for PHP

68325.0M367](/packages/wp-cli-php-cli-tools)

PHPackages © 2026

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