Modern task runner for PHP
Switch branches/tags
Clone or download
cedx and greg-1-anderson Support Windows line endings in ".semver" file (#788)
* Handles the Windows line endings (i.e. CRLF)

* Add a unit test for SemVer line endings

* Improve the SemVer unit test
Latest commit 4d7079b Oct 17, 2018
Failed to load latest commit information.
.github Use 'has tests' instead of 'needs test' in PR template. Nov 18, 2016
build/logs Add build/logs directory. Apr 25, 2016
data/Task/Development Add GenerateMarkdownDocCest test. Sep 3, 2016
docs Robo release 1.3.1 Aug 17, 2018
examples Add EnvConfig to Robo: set configuration values via environment varia… ( May 26, 2018
scenarios Update composer.lock (#785) Oct 4, 2018
scripts/composer Restore 5.5 fixup (#662) Dec 29, 2017
src Support Windows line endings in ".semver" file (#788) Oct 17, 2018
tests Support Windows line endings in ".semver" file (#788) Oct 17, 2018
.editorconfig Provide editorconfig file Mar 17, 2016
.gitattributes Prepare for Ignore all of scenarios directory in exports. (#680) Feb 28, 2018
.gitignore Add --coverage-html option to ./robo test command. May 20, 2016
.scrutinizer.yml Exclude RoboFile.php from Scrutinizer. (#401) Aug 6, 2016
.travis.yml Fix coveralls (#723) Apr 23, 2018 Update documentation and changelog for 1.3.0 release. May 27, 2018 Fix example of sniff command. Mar 30, 2016
LICENSE updated license and readme with Consolidation Nov 11, 2016 Actualize RoboFile of Codeception project link url in RADME.php (#756) Jul 27, 2018
RoboFile.php Add a guard to fail fast in phar:build when phar.readonly is on. Apr 6, 2018
appveyor.yml Add .gitattributes (#653) Dec 7, 2017
codeception.yml updated deps, config fixed Apr 25, 2016
composer.json Move self:update command to consolidation/self-update project. Aug 17, 2018
composer.lock Update composer.lock (#785) Oct 4, 2018
dependencies.yml Move g1a/composer-test-scenarios from require-dev to require. Jul 19, 2018
phpunit.xml Fix coveralls (#723) Apr 23, 2018
robo Fixes #661: Use Phar::running() in Robo entrypoint. Sep 27, 2018
robo.yml Add EnvConfig to Robo: set configuration values via environment varia… ( May 26, 2018


Modern and simple PHP task runner inspired by Gulp and Rake aimed to automate common tasks:

Gitter Latest Stable Version Latest Unstable Version Total Downloads PHP 7 ready License

Build Status Windows CI Scrutinizer Code Quality Dependency Status

  • writing cross-platform scripts
  • processing assets (less, sass, minification)
  • running tests
  • executing daemons (and workers)
  • watching filesystem changes
  • deployment with sftp/ssh/docker



Download robo.phar >


To install globally put robo.phar in /usr/bin. (/usr/local/bin/ in OSX 10.11+)

chmod +x robo.phar && sudo mv robo.phar /usr/bin/robo

OSX 10.11+

chmod +x robo.phar && sudo mv robo.phar /usr/local/bin/robo

Now you can use it just like robo.


  • Run composer require consolidation/robo:~1
  • Use vendor/bin/robo to execute Robo tasks.


All tasks are defined as public methods in RoboFile.php. It can be created by running robo. All protected methods in traits that start with task prefix are tasks and can be configured and executed in your tasks.


The best way to learn Robo by example is to take a look into its own RoboFile or RoboFile of Codeception project. There are also some basic example commands in examples/RoboFile.php.

Here are some snippets from them:

Run acceptance test with local server and selenium server started.

class RoboFile extends \Robo\Tasks

    function testAcceptance($seleniumPath = '~/selenium-server-standalone-2.39.0.jar')
       // launches PHP server on port 8000 for web dir
       // server will be executed in background and stopped in the end

       // running Selenium server in background
        $this->taskExec('java -jar ' . $seleniumPath)

        // loading Symfony Command and running with passed argument
        $this->taskSymfonyCommand(new \Codeception\Command\Run('run'))

If you execute robo you will see this task added to list of available task with name: test:acceptance. To execute it you should run robo test:acceptance. You may change path to selenium server by passing new path as a argument:

robo test:acceptance "C:\Downloads\selenium.jar"

Using watch task so you can use it for running tests or building assets.

class RoboFile extends \Robo\Tasks {

    function watchComposer()
        // when composer.json changes `composer update` will be executed
        $this->taskWatch()->monitor('composer.json', function() {

Cleaning logs and cache

class RoboFile extends \Robo\Tasks
    public function clean()


This task cleans app/cache and app/logs dirs (ignoring .gitignore and .gitkeep files) Can be executed by running:

robo clean

Creating Phar archive

function buildPhar()
    $files = Finder::create()->ignoreVCS(true)->files()->name('*.php')->in(__DIR__);
    $packer = $this->taskPackPhar('robo.phar');
    foreach ($files as $file) {
        $packer->addFile($file->getRelativePathname(), $file->getRealPath());

We need more tasks!

Create your own tasks and send them as Pull Requests or create packages with "type": "robo-tasks" in composer.json on Packagist.


Follow @robo_php for updates.

Brought to you by Consolidation Team and our awesome contributors.