by kohkimakimoto

kohkimakimoto / altax

[Deprecated - This project is no longer maintained] A deployment tool for PHP

207 Stars 13 Forks Last release: over 3 years ago (v3.0.16) Other 480 Commits 32 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


Build Status Coverage Status Latest Stable Version License

Altax is a deployment tool for PHP. I designed it as a command-line tool for running tasks to remote servers like the Capistrano, Fabric and Cinamon. It also has a plugin mechanism for managing and installing tasks easily.

This is a simple git deploy task definition. You can write any tasks in PHP.

// Register managed nodes to a role.
Server::node("", "web");
Server::node("", "web");
Server::node("",  "db");

// Register a task. Task::register("deploy", function($task){

$appDir = "/path/to/app";

// Execute parallel processes for each nodes.
$task->exec(function($process) use ($appDir){

    // Run a command remotely and get a return code.
    if ($process->run("test -d $appDir")->isFailed()) {
        $process->run("git clone [email protected]:path/to/app.git $appDir");
    } else {
            "cd $appDir",
            "git pull",

}, array("web"));


You can run it like below

$ altax deploy
[] Run: test -d /var/tmp/altax
[] Run: git clone [email protected]:kpath/to/app.git /path/to/app
Initialized empty Git repository in /path/to/app/.git/
[] Run: test -d /var/tmp/altax
[] Run: git clone [email protected]:kpath/to/app.git /path/to/app
Initialized empty Git repository in /path/to/app/.git/

You can get more information at


PHP5.3 or later.


I recommend you to install Altax as a phar (PHP Archive) which compiled to single executable file. Run the below command to get latest version of Altax.

$ curl -L | bash -s system

You will get

command file to
directory. In order to check installation, execute just
$ altax
Altax version 3.0.0

Altax is a extensible deployment tool for PHP. Copyright (c) Kohki Makimoto <kohki.makimoto> Apache License 2.0 ...



I describe basic usage in this section.


altax init
command to generate first configuration.
$ altax init
Created file: /path/to/your/directory/.altax/config.php
Created file: /path/to/your/directory/.altax/composer.json
Created file: /path/to/your/directory/.altax/.gitignore


file in your current directory is a main configuration file for altax. You can modify this file to define tasks and servers you managed. So now, add the following code in the file.
Task::register("hello", function($task){

$task->writeln("Hello world!");

})->description("This is a first sample task.");

This is a simple task definition. Defined task is listed by executing just

$ altax
Altax version 3.0.0

Altax is a deployment tool for PHP. it's designed as a command-line tool for running tasks to remote servers. Copyright (c) Kohki Makimoto <kohki.makimoto> Apache License 2.0


Available commands: hello This is a first sample task. ... </kohki.makimoto>

task you defined can be executed by
command with task name like the followiing.
$ altax hello
Hello world!

You got a first altax task now!

If you want to see more information, visit a documentation page.


See documentation page.


Altax has a extensible plugin mechanism. It makes adding functionality easy. Plugins are stored at Packagist and installed using composer. As Altax includes embedded composer, you can install plugins by altax command.

For instance, if you use PHP5.4 and MySQL database in your product, you can use Adminer database management tool via Altax plugin. Edit your

file like the following.
  "require": {
    "kohkimakimoto/altax-adminer": "dev-master"

And run altax update command which is a wrapper command of

composer update
for Altax.
$ altax update

Adminer altax plugin will be installed in your

directory. In order to register the plugin to your task, add the following line your
Task::register('adminer', 'Altax\Contrib\Adminer\Command\AdminerCommand');

Run the registered plugin task commnad.

$ altax adminer

Altax runs adminer on built-in web server. So you can use adminer at


If you are interested in Altax plugins, Search plugins at packagist!


Kohki Makimoto [email protected]


Apache License 2.0


Previous version

If you use Altax version 2. You can see 2.x branch. Altax version 1 is no longer maintained.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.