PHPackages                             nimbly/minion - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. nimbly/minion

AbandonedArchivedLibrary[DevOps &amp; Deployment](/categories/devops)

nimbly/minion
=============

Framework and language agnostic remote deployment automation tool

3.0.3(4y ago)16.6kMITPHPPHP &gt;=7.4||^8.0

Since Oct 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/nimbly/minion)[ Packagist](https://packagist.org/packages/nimbly/minion)[ RSS](/packages/nimbly-minion/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (25)Used By (0)

How it works
------------

[](#how-it-works)

**minion** creates a new checkout/clone of your repo for each deployment. This allows clean installs and easy rollbacks to previous releases. The general idea is a single directory holds the releases and a symlink points to the current release.

**NOTE**: In order for this to work with your webserver (Apache, Nginx, etc), you **will need**to update its configuration to point to the symlink as its webroot.

During deployment, **minion** will apply your deployment **strategy** on each defined server. A deployment **strategy** is simply a list of **tasks** you would like **minion**to run.

**minion** has several built-in **tasks** - however, you will need to create and implement your own tasks to take full advantage. Some examples: install composer, run migrations, flush caches, restart web service, restart web application, etc.

Install
-------

[](#install)

`composer require nimbly/minion`

Initialize
----------

[](#initialize)

`minion make:init`

Configure
---------

[](#configure)

If you run the `make:init` command, minion will create a couple directories (`Tasks` and `Commands`) as well as generate a default configuration file (`minion.yml`).

The first several sections of the config file define *global* config options. Each environment defined may optionally override these global options.

The global sections are:

- remote
- authentication
- code

#### remote

[](#remote)

The remote section defines options on the remote server environment including where to deploy code.

The options for the *remote* sections are as follows:

- **path** \[string\] The absolute path to the code on the server. I.e. the path to deploy code to.
- **releaseDir** \[string\] The path to keep the releases (relative to **path**).
- **symlink** \[string\] Name of the symlink to create to point to current release.
- **keepReleases** \[integer\] The number of releases to keep before pruning old releases.

#### authentication

[](#authentication)

The authentication section defines how SSH can authenticate with your servers. You can either authenticate with a username and password *or* using a username, key and (optionally) a key pass phrase.

**NOTE:** because **minion** uses PHPSECLIB as its core SSH library, you can **only** use RSA keys - DSA keys are not supported at this time.

The options for the *authentication* sections are as follows:

- **username** \[string\] The SSH username to connect with.
- **password** \[string\] *optional*The SSH password to use (if not using key based authentication).
- **key** \[string\] *optional*Path and file name of RSA key file.
- **passphrase** \[string\] *optional*Pass phrase for key (if using key based authentication).

#### code

[](#code)

The code section defines how and where your code is stored.

- **scm** \[git, svn\] What source code management tool you use.
- **repo** \[string\] Repository URL/location
- **branch** \[string\] *optional*Repository branch (if any)
- **username** \[string\] *optional*Repository username
- **password** \[string\] *optional*Repository password

#### environments

[](#environments)

This section is where you define your server groups or environments. Each environment has a unique name and a list of servers. You must define a deployment **strategy** and provide an array of **servers**. A server must have a **host** property.

- **strategy** \[string\] Comma separated list of tasks to run, in the order specified.
- **servers** \[array\] Array of servers to deploy to
- **preDeploy** \[string\] Comma separated list of tasks to run before the deploy happens. These tasks will be run on the local machine (i.e. not remotely).
- **postDeploy** \[string\] Comma separate list of tasks to run after the deploy happens. These tasks will be run on the local machine (i.e. not remotely).

For example:

```
environments:
	production:
	    strategy: release, link, prune
		servers:
			- host: web-001.example.com
			- host: web-002.example.com
			- host: web-003.example.com
```

Within each environment, you may override some or all global options. For example, if your *staging* environment has a different set of SSH keys used to authenticate and uses the *staging* branch of your repo, you can define those changes within the *staging* environment.

For example:

```
environments:
	staging:
	    strategy: release, link, prune
		code:
			branch: staging
		authentication:
			username: deploy
			key: staging_id_rsa.pub
		servers:
			- host: staging-001.example.com
			- host: staging-002.example.com
```

A server may also override the environment strategy. This is useful if you have several servers and need to run a migration as it only needs to be run once.

For example:

```
environments:
	staging:

		code:
			branch: staging

		authentication:
			username: deploy
			key: staging_id_rsa.pub

		strategy: release, link, prune

		servers:
			- host: staging-001.example.com
			  strategy: release, link, migrate, prune
			- host: staging-002.example.com
```

Tasks
-----

[](#tasks)

A task is one or more shell commands that are issued on the remote server. **minion** is pre-configured with four tasks.

- `release` Creates a new release on the server.
- `link` Symlinks the newly created release to the current release directory (`current` by default).
- `prune` Prunes (deletes) old release directories.
- `update` Does a code update on the current release (`git pull` or `svn up`)

Extending
---------

[](#extending)

**minion** can be extended by creating new custom commands as well as custom tasks.

#### Commands

[](#commands)

To create a new command:

`minion make:command `

For example:

`minion make:command CacheFlushCommand`

Custom commands can be found in the `Commands` directory where you run **minion** from.

**minion** commands are powered by **Symfony Console**. Please refer to \[\] for documentation.

#### Tasks

[](#tasks-1)

To create a new task:

`minion make:task `

For example:

`minion make:task Migrate`

Custom tasks can be found in the `Tasks` directory where you run **minion** from.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity78

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

Recently: every ~279 days

Total

23

Last Release

1542d ago

Major Versions

1.5 → 2.02017-02-19

2.2.1 → 3.02022-02-26

PHP version history (4 changes)1PHP &gt;=5.3.0

2.2PHP &gt;=7.0

3.0PHP ^8.0

3.0.3PHP &gt;=7.4||^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/723164?v=4)[Brent Scheffler](/maintainers/brentscheffler)[@brentscheffler](https://github.com/brentscheffler)

---

Top Contributors

[![brentscheffler](https://avatars.githubusercontent.com/u/723164?v=4)](https://github.com/brentscheffler "brentscheffler (51 commits)")

---

Tags

phpautomationremotedeployment

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nimbly-minion/health.svg)

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

###  Alternatives

[wsdltophp/packagegenerator

Generate hierarchical PHP classes based on a WSDL

4351.9M19](/packages/wsdltophp-packagegenerator)[andres-montanez/magallanes

The Deployment Tool for PHP Applications

6901.1M6](/packages/andres-montanez-magallanes)[shopware/deployment-helper

Shopware deployment tools

19305.3k5](/packages/shopware-deployment-helper)[kohkimakimoto/altax

Altax is an extensible deployment tool for PHP.

2002.8k](/packages/kohkimakimoto-altax)[rizeway/anchour

Toolkit for deploying web applications

265.7k](/packages/rizeway-anchour)[mmoreram/translation-server

PHP translation server

233.7k2](/packages/mmoreram-translation-server)

PHPackages © 2026

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