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

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

dezio/laravel-shell
===================

v1.17(9mo ago)050MITPHPPHP &gt;8.0

Since Feb 23Pushed 8mo ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (21)Used By (0)

Laravel Shell
=============

[](#laravel-shell)

A powerful Laravel package for executing SSH commands and managing remote servers directly from your Laravel application.

Description
-----------

[](#description)

Laravel Shell allows you to transform Laravel models into SSH-capable objects, enabling seamless interaction with remote servers. It provides a clean, fluent API for executing commands, managing files, and retrieving system information from remote servers.

This package uses [phpseclib/phpseclib](https://github.com/phpseclib/phpseclib) under the hood for secure SSH connections.

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- Laravel 11.0 or higher
- phpseclib/phpseclib 3.0 or higher

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

[](#installation)

Install via Composer:

```
composer require dezio/laravel-shell
```

The package will automatically register its service provider if you're using Laravel's package auto-discovery.

Publish and customize the configuration with:

```
php artisan vendor:publish --provider="DeZio\Shell\ShellServiceProvider"
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

The package provides a simple API to:

- Establish SSH connections to remote servers
- Execute commands and retrieve their output
- Manage files on remote servers (create, write, delete)
- Transform Laravel models into SSH-capable objects

Here's a basic example:

```
