Use php-box tool to build the .phar file: https://github.com/kherge/php-box Example: https://github.com/kherge/php-box-example