This plugin allows you to specify URLs to download on composer install
as scripts.
For example, you can download a binary or phar file into your vendor/bin
directory.
- Add PHP tools as phar files to alleviate the need to align composer requirements.
- Add scripts and tools written in other languages.
- Integrates with
composer install
.
-
Install the plugin.
$ composer require operations/remote-bin-scripts
-
Add to
composer.json
:{ "extra": { "remote-scripts": { "vendor/bin/hello-world": "https://raw.githubusercontent.com/operations-platform/composer-remote-bin-scripts/2.x/hello-world.sh" } } }
-
Run composer install:
$ composer install
-
Run your script from the composer bin path:
./vendor/bin/hello-world
Or, if you set PATH, just use the command.
PATH=$PATH:./vendor/bin hello-world
- Created by: Jon Pugh