Idephix is a PHP tool for building automated scripts
-
Download the
idephix.phar
executable.$ curl http://getidephix.com/idephix.phar > idephix.phar
-
Create a idxfile.php in the root directory of you project. Define your tasks.
<?php use Idephix\Idephix; $targets = array( 'test' => array( 'hosts' => array('127.0.0.1'), 'ssh_params' => array('user' => 'kea') ), ); $idx = new Idephix($targets); $idx-> /** * Execute the touch of a file specified in input * @param string $name the name of the file to be touch-ed * @param bool $go if not specified the script execute a dry-run */ add('idephix:test-params', function ($name, $go = false) use ($idx) { $idx->local('touch /tmp/'.$name); $idx->remote('touch /tmp/'.$name.'_remote'); }); $idx->run();
-
Run Idephix:
php idephix.phar --env=test idephix:test-params Nome_file
You can choose to install idephix wherever you prefer. Idephix use the configuration file in the current path.
- Go to a PATH directory, e.g.
cd /usr/local/bin
- Get Idephix:
curl http://getidephix.com/idephix.phar > idephix.phar
- Make the phar executable
chmod a+x idephix.phar
- Go to a project directory, e.g.
cd /path/to/my/project
- Define your tasks in the idxfile.php file
- Just invoke the binary
idephix.phar
- You can optionally rename the idephix.phar to idx to make it easy to use
PHP 5.3.2 or above, >=5.3.12 recommended
- Manuel 'Kea' Baldssarri mb@ideato.it
- Michele 'Orso' Orselli mo@ideato.it
- Filippo De Santis fd@ideato.it
- other contributors
Idephix is licensed under the MIT License - see the LICENSE file for details