PHPackages                             iperamuna/laravel-remote-commands - 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. iperamuna/laravel-remote-commands

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

iperamuna/laravel-remote-commands
=================================

Remote SSH Access for the Laravel Framework via phpseclib.

0.0.4(2mo ago)017MITPHPPHP ^8.0

Since Aug 8Pushed 2mo agoCompare

[ Source](https://github.com/iperamuna/laravel-remote-commands)[ Packagist](https://packagist.org/packages/iperamuna/laravel-remote-commands)[ RSS](/packages/iperamuna-laravel-remote-commands/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

Laravel Remote Commands
=======================

[](#laravel-remote-commands)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dd29e765810e2ded742269a5bafc81cf9a30b99c494b9a9cc87ae50e2d142526/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69706572616d756e612f6c61726176656c2d72656d6f74652d636f6d6d616e64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/iperamuna/laravel-auto-translations)[![Total Downloads](https://camo.githubusercontent.com/e6cf8d4b93665cb838792cf3d94d7cb7cb440ef1499e92daee44c3e38ec1cc57/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69706572616d756e612f6c61726176656c2d72656d6f74652d636f6d6d616e64732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/iperamuna/laravel-remote-commands)[![License](https://camo.githubusercontent.com/8169e7e03fbea01e4b1d8ebe29084a2954c1e8eade1b0829694c8bf8d8bce0d2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69706572616d756e612f6c61726176656c2d72656d6f74652d636f6d6d616e64733f7374796c653d666c61742d737175617265)](LICENSE)

✨ A lightweight Laravel package that enables executing commands on remote servers over SSH using phpseclib. Designed for Laravel developers who need a simple and secure way to run remote commands — no file transfers, just command execution.

---

📦 Installation
--------------

[](#-installation)

```
composer require iperamuna/laravel-remote-commands
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag="remote-commands-config"
```

Configure your servers in `config/remote-commands.php`:

```
'servers' => [
    'production' => [
        'host' => '1.2.3.4',
        'port' => 22,
        'username' => 'deploy',
        'auth_type' => 'key', // 'password' or 'key'
        'password' => '',
        'key' => '/path/to/id_rsa', // Path to public / private key file
        'keytext' => '', // OR direct content of public / private key
        'passphrase' => '', // Optional key passphrase
    ],
],
```

Usage
-----

[](#usage)

### Using the Facade

[](#using-the-facade)

```
use LaravelRemoteCommands\Facades\RemoteCommand;

// Run commands and get output as an array
$output = RemoteCommand::into('production')->run([
    'cd /var/www/html',
    'ls -la',
]);

foreach ($output as $line) {
    echo $line . PHP_EOL;
}

// Or stream output via callback
RemoteCommand::into('production')->run([
    'git pull origin main',
], function($line) {
    Log::info("Deployment: " . $line);
});
```

Diagnostics
-----------

[](#diagnostics)

You can test your connectivity and prompt detection using the built-in diagnostic command:

```
php artisan remote:diagnostic {server_name}
```

---

📜 License
---------

[](#-license)

This package is open-source software licensed under the [MIT license](LICENSE).

---

🙋‍♀️ Contributing
-----------------

[](#‍️-contributing)

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

---

📣 Credits
---------

[](#-credits)

Made with ❤️ by [Indunil Peramuna](https://github.com/iperamuna)
Built for Laravel developers who want to run commands on remote servers.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance87

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Total

4

Last Release

66d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7f282b7449477d5baaf64bdb40fcb7d9c8c638fb96a431413c7293344e3182f?d=identicon)[iperamuna](/maintainers/iperamuna)

---

Top Contributors

[![iperamuna](https://avatars.githubusercontent.com/u/3013395?v=4)](https://github.com/iperamuna "iperamuna (6 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/iperamuna-laravel-remote-commands/health.svg)

```
[![Health](https://phpackages.com/badges/iperamuna-laravel-remote-commands/health.svg)](https://phpackages.com/packages/iperamuna-laravel-remote-commands)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[bestmomo/nice-artisan

Web interface for Laravel Artisan

215149.3k](/packages/bestmomo-nice-artisan)[statamic/cli

Statamic CLI Tool

7587.7k](/packages/statamic-cli)[mwguerra/web-terminal

A web-based terminal component for Filament/Laravel with command whitelisting and multiple connection types

251.1k](/packages/mwguerra-web-terminal)[sunaoka/laravel-facade-generator

Provide command line generation of facade layer files.

171.9k](/packages/sunaoka-laravel-facade-generator)

PHPackages © 2026

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