The recommended way to use the PHPCR shell is as a phar archive.
Install box: https://box-project.github.io/box2/
Build the PHAR:
$ cd phpcr-shell
$ box build
This will produce the file phpcr.phar
.
Copy this file to your bin directory:
$ sudo cp phpcrsh.phar /usr/bin/local/phpcrsh
Read the documentation on readthedocs