Installation of Samurai
Samurai uses Composer and Git. So, you have to install them first.
Install Composer
Set the executable
See the Composer documentation for installation process.
For Unix system be sure that you have installed Composer globally:
# mv composer.phar /usr/local/bin/composer
So, you can execute directly the composer command anywhere (instead of the composer.phar only in a specific dir):
$ composer --version
Set the PATH of the composer bin
Second, to enable the execution of the samurai command, make sure to place the COMPOSER_BIN_DIR directory in your PATH.
Unix system
By default, the COMPOSER_BIN_DIR is the directory ~/.composer/vendor/bin
. To know your directory: $ cd ~/.composer && composer config --list | grep bin-dir
For all users (restart):
# echo 'PATH="$PATH:$HOME/.composer/vendor/bin"' > /etc/profile.d/composer.sh
For current user (relogin):
$ echo 'PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.profile
Windows
By default, the COMPOSER_BIN_DIR is the directory C:\Users\<user>\AppData\Roaming\Composer\vendor\bin
.
setx PATH "%PATH%;C:\%HOMEPATH%\AppData\Roaming\Composer\vendor\bin"
Install Git
For a better experience, you should also install Git.
Do not forget to add a global .gitignore, to exclude files or folders of your IDE or OS.
To test if git is installed:
$ git --version
Install Samurai
First, download Samurai with Composer in the global env.
$ composer global require raphhh/samurai
Test Samurai
The samurai executable is found when you run the following command in your terminal.
$ samurai --version
Install modules
Note, by default, no modules are installed. To install the recommended modules, execute the following command:
$ samurai module install
See modules docs for more information.
List commands and help
To list all the available commands, enter the 'list' command:
$ samurai list
To get help on a specific command, use the 'help' command:
$ samurai help <command>