Installation

There are two ways to install Surf:

  1. Download phar archive
  2. Source composer installation
  3. Building a Surf phar from source

Download phar archive

To install Surf as phar archive, run the following commands:

mkdir /usr/local/surf
curl -L https://github.com/TYPO3/Surf/releases/download/|release|/surf.phar -o /usr/local/surf/surf.phar
chmod +x /usr/local/surf/surf.phar
ln -s /usr/local/surf/surf.phar /usr/local/bin/surf

You may need extended privileges e.g. sudo.

This way, you can add /usr/local/surf to PHP Include Paths of your IDE.

Upgrading Surf

Later, to upgrade Surf, run the command:

surf self-update

Source composer installation

To install Surf via composer, run the following commands:

composer global require typo3/surf:^2.0

This way, you can add ~/.composer/vendor/typo3/surf to PHP Include Paths of your IDE.

Building a Surf phar from source

Surf is built using the box project and the process is simple:

  • Download the latest box.phar and put in an executable directory
  • cd your/surf/clone
  • composer install --no-dev && php box.phar build

The generated surf.phar should work as expected.