You can install PHPCR Shell either as an embedded application or as a PHAR, or you can build it yourself (when you want the latest version).

Install as a PHAR

The latest release can be downloaded from the Github releases page.

After downloading it is recommended to install it in a path accessible by the system, for example:

$ sudo mv /usr/local/bin/phpcrsh
$ sudo chmod a+x /usr/local/bin/phpcrsh

You can now run PHPCRSH from anywhere:

$ phpcrsh --help

Install as an embedded application

If you are using a Symfony2 application and a version of DoctrinePHPCRBundle greater than 1.2 then you can easily integrate the PHPCR-Shell.

Simply add the shell with composer:

$ composer require phpcr/phpcr-shell

And you can start the shell as a symfony command:

$ php app/console doctrine:phpcr:shell

Build it from source

PHPCRSH uses the box PHAR building tool, install it here.

Build the PHAR:

$ cd phpcr-shell
$ box build

This will produce the file phpcr.phar, see Install as a PHAR for further instructions.