Run remote task
Some task may be provided by external providers or author that need to be run only once, some of them comes to my mind :
- Running a rector recipe
- Creating a project from an existing repository / template
There is a tool that does that in js : npx
I think we could provide similar behavior with castor with a specific command something like :
castor execute vendor/package-exec
Basically castor would install this composer repository inside a temp folder and run the first bin file declared
We could specify a version :
castor execute vendor/[email protected]
If there is different binaries we can imagine allow the following
castor execute --bin specific-binary vendor/package-exec
All arguments passed after the package could be transferred to the bin so someone can do
castor execute vendor/package-exec --package-exec-arg value
Remind me https://github.com/sensiolabs/melody :D
I see the issue mention npx but not cpx. So here is my two cent: https://cpx.dev/
I'm closing this issue, since we have an open PR already