PHPackages                             league/shunt - 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. league/shunt

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

league/shunt
============

PHP library for executing commands in parallel on multiple remote machines, via SSH

v2.1.1(12y ago)43452034[1 issues](https://github.com/thephpleague/shunt/issues)[3 PRs](https://github.com/thephpleague/shunt/pulls)MITPHPPHP &gt;=5.3.3

Since Jul 24Pushed 6y ago18 watchersCompare

[ Source](https://github.com/thephpleague/shunt)[ Packagist](https://packagist.org/packages/league/shunt)[ Docs](https://github.com/php-loep/shunt)[ RSS](/packages/league-shunt/feed)WikiDiscussions master Synced 3d ago

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

\#Shunt

[![Teaser](https://camo.githubusercontent.com/dd60b10586baa4430abd3b6bfc57b24552d08b24732f683b481ea226b4b71887/68747470733a2f2f692e696d6775722e636f6d2f6973676f63776c2e706e673f31)](https://github.com/thephpleague/shunt)

[![Build Status](https://camo.githubusercontent.com/9c0c58d4039704cfe2c5ca5a1c110fd9c6182deaea0bab298d4a2bbd16524e20/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7468657068706c65616775652f7368756e742e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/thephpleague/shunt) [![Dependencies Status](https://camo.githubusercontent.com/6b919398d30cbd0772697e7e510cf51e458b489055a9dd668cefbd60abefc346/68747470733a2f2f646570656e64696e672e696e2f7468657068706c65616775652f7368756e742e706e67)](https://depending.in/thephpleague/shunt) [![Coverage Status](https://camo.githubusercontent.com/59f86879dec559f7c66665f12b789a079c1226cd985a3ba5b9e6148b2e7d136e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7468657068706c65616775652f7368756e742f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/thephpleague/shunt?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/86ca930e9be4072529a0c130196330380237c9ddd03f6a0221ea0f6a3201198f/68747470733a2f2f706f7365722e707567782e6f72672f6c65616775652f7368756e742f762f737461626c652e706e67)](https://packagist.org/packages/league/shunt) [![Total Downloads](https://camo.githubusercontent.com/46b9f6755bb49786cc623a8936d45b84d1a10744d98258ea97228de987866ce2/68747470733a2f2f706f7365722e707567782e6f72672f6c65616775652f7368756e742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/league/shunt)

Inspired by Ruby's Capistrano, Shunt is PHP library for executing commands on multiple remote machines, via SSH. Specifically, this library was written to simplify and automate deployment of PHP applications to distributed environments.

Install
-------

[](#install)

Via Composer

```
{
    "require": {
        "league/shunt": "~2.0"
    }
}

```

Requirement
-----------

[](#requirement)

- PHP &gt;= 5.3.3
- libssh2
- ssh2.so

Additional Features
-------------------

[](#additional-features)

- Secure copy (SCP) support
- Secure FTP (SFTP) support

Assumptions
-----------

[](#assumptions)

Shunt has very firm ideas about how things ought to be done, and tries to force those ideas on you. Some of the assumptions behind these opinions are:

- You are using SSH to access the remote servers.
- You either have the same password to all target machines, or you have public keys in place to allow passwordless access to them.

Do not expect these assumptions to change.

Usage
-----

[](#usage)

In general, you'll use Shunt as follows:

- Create a recipe file (`Shuntfile`).
- Use the `shunt` script to execute your recipe.

From the root folder of your composer-based project, use the Shunt script as follows:

```
vendor/bin/shunt some_task some_host,other_host

```

By default, the script will look for a file called `Shuntfile`, which contain hosts information, credential and your tasks. Here the structure of `Shuntfile` :

```
