PHPackages                             rizeway/anchour - 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. rizeway/anchour

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

rizeway/anchour
===============

Toolkit for deploying web applications

v1.1.0(11y ago)265.7k6[1 issues](https://github.com/youknowriad/anchour/issues)MITPHPPHP &gt;=5.3.2

Since Oct 25Pushed 11y ago2 watchersCompare

[ Source](https://github.com/youknowriad/anchour)[ Packagist](https://packagist.org/packages/rizeway/anchour)[ RSS](/packages/rizeway-anchour/feed)WikiDiscussions master Synced 1w ago

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

Anchour
=======

[](#anchour)

[![Build Status](https://camo.githubusercontent.com/85a5a933c0c31d5e318829e96f3ca3bf0e3342d6de0174b45c97ab7b9e0a2319/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f796f756b6e6f77726961642f616e63686f75722e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/youknowriad/anchour)

Anchour is a deployment engine for web applications

Installation
============

[](#installation)

```
wget http://rizeway.com/anchour.phar

```

Usage
=====

[](#usage)

First, Add a configuration file named `.anchour` to your project. This file defines some commands composed by an ordered set of steps

Example
-------

[](#example)

```
anchour:
    connections:
        MySSH:
            type: "ssh"
            options:
                host: "localhost"
                username: "foo"
                password: "bar"

    commands:
        deploy:
            steps:
                -
                    type: "echo"
                    options:
                        message: "A test message with formatted output"

                -
                    type: "rsync"
                    options:
                        key_file: "/home/username/.ssh/id_rsa_rsync"
                        source_dir: "tmp/minitwitter"
                        destination_dir: "tmp/minitwitter2"
                    connections:
                        connection: MySSH

```

Now deploy your project by running

```
./anchour.phar deploy

```

Connections
===========

[](#connections)

The connection types allowed by Anchour are

SSH with login and password
---------------------------

[](#ssh-with-login-and-password)

```
MySSH:
    type: "ssh"
    options:
        host: "localhost"
        username: "foo"
        password: "bar"

```

FTP
---

[](#ftp)

```
MyFTP:
    type: "ftp"
    options:
        host: "host.fr"
        username: "foo"
        password: "bar"

```

MySQL
-----

[](#mysql)

```
MySql1:
    type: "mysql"
    options:
        host: "host.fr"
        username: "foo"
        password: "bar"
        database: "db1"

```

Steps
=====

[](#steps)

The step types allowed by Anchour are

Echo
----

[](#echo)

This step type allows you to output a formatted message

### Usage

[](#usage-1)

```
type: "echo"
options:
    message: "A test message with formatted output"

```

Rsync
-----

[](#rsync)

This step type allows you to synchronize a local folder in a distant server using a SSH connection

### Usage

[](#usage-2)

```
type: "rsync"
options:
    key_file: "/home/username/.ssh/id_rsa_rsync"
    source_dir: "tmp/minitwitter"
    destination_dir: "tmp/minitwitter2"
connections:
    destination: "MySSH"

```

Ftp
---

[](#ftp-1)

This step type allows you to upload a local folder using a FTP connection

### Usage

[](#usage-3)

```
type: "ftp"
options:
    local_dir: "src"
    remote_dir: "test"
connections:
    connection: "MyFTP"

```

Ssh
---

[](#ssh)

This step type allows you to execute commands in a remote server using SSH

### Usage

[](#usage-4)

```
type: "ssh"
options:
    commands:
        - uname -a
        - date
connections:
    connection: "MySSH"

```

Git
---

[](#git)

This allows you to clone a GIT repository in a remote server using a SSH connection

### Usage

[](#usage-5)

```
type: "git"
options:
    repository: "git://github.com/jubianchi/minitwitter.git"
    remote_dir: "tmp/minitwitter"
    clean_scm: true
    remove_existing: true
    depth: 1
connections:
    connection: "MySSH"

```

MySql
-----

[](#mysql-1)

This step allows you to maka a Mysql Export/Import using two MySql Connections

### Usage

[](#usage-6)

```
type: "mysql"
options:
    create_database: true
    drop_database: true
connections:
    source: "MySQL1"
    destination: "MySQL2"

```

CliPhar
-------

[](#cliphar)

This step allows you to build a CLI Phar archive

### Usage

[](#usage-7)

```
type: "cliPhar"
options:
    directory: "."
    regexp: "^[^\.].*/a/.*|regexp/.*|used/(?!to).*|filter\.php"
    stub: "path/to/phar/stub.php"
    name: "name.phar"
    chmod: true

```

Variables
=========

[](#variables)

You may want to commit your .anchour file without some informations like passwords and hosts ... To do that, Anchour allows you to define some required variables in your connections like this

```
connections:
    MyFTP:
        type: ftp
        options:
            host: %my_host%
            username: %my_username%
            password: %my_password%

commands:
    deploy:
        description: Deploy using FTP

        steps:
            -
                type: ftp
                options:
                    remote_dir: %folder%
                connections:
                    connection: MyFTP

```

There is several way to set those variables : *command line arguments* &gt; *config file* &gt; *environment variable* and finally *interactive prompt*

```
anchour.phar my_host=domain.tld
anchour.phar -c config.json
my_host=domain.tld anchour.phar

```

When you run the command deploy (described above), anchour will detect all the required variables for your command, asks you their values, and use them in the right places (example: %my\_username% will be replaced by the value of the variable my\_username)

Contribute
==========

[](#contribute)

Install the dependancies using composer and your ready to go

```
git clone https://github.com/youknowriad/anchour.git && cd anchour
curl -s http://getcomposer.org/installer | php
./composer.phar install

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 65.7% 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 ~295 days

Total

2

Last Release

4150d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/327237?v=4)[Julien BIANCHI](/maintainers/jubianchi)[@jubianchi](https://github.com/jubianchi)

![](https://avatars.githubusercontent.com/u/325259?v=4)[riad](/maintainers/riad)[@riad](https://github.com/riad)

---

Top Contributors

[![jubianchi](https://avatars.githubusercontent.com/u/327237?v=4)](https://github.com/jubianchi "jubianchi (67 commits)")[![youknowriad](https://avatars.githubusercontent.com/u/272444?v=4)](https://github.com/youknowriad "youknowriad (35 commits)")

---

Tags

phpwebdeploy

### Embed Badge

![Health badge](/badges/rizeway-anchour/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[wsdltophp/packagegenerator

Generate hierarchical PHP classes based on a WSDL

4351.9M19](/packages/wsdltophp-packagegenerator)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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