castor icon indicating copy to clipboard operation
castor copied to clipboard

Run remote task

Open joelwurtz opened this issue 1 year ago • 1 comments

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

joelwurtz avatar Jun 16 '24 10:06 joelwurtz

Remind me https://github.com/sensiolabs/melody :D

lyrixx avatar Jun 17 '24 09:06 lyrixx

I see the issue mention npx but not cpx. So here is my two cent: https://cpx.dev/

Nek- avatar Oct 27 '24 16:10 Nek-

I'm closing this issue, since we have an open PR already

lyrixx avatar Feb 24 '25 10:02 lyrixx