creating a CLI in Pharo

185 Views Asked by At

I'm having trouble figuring out how to pass arguments to a an object in the pharo image via the command line.

I know how to start the image from the command line by

pharovm image.image

But how can I register an object to respond to the next arguments that would be passed?

pharovm image.image do something

1

There are 1 best solutions below

0
Be1dzr On

You can use CLAP library, that would support CLI parameters: https://github.com/pharo-contributions/clap-st

Then you can run something like ./pharovm --headless pharo.image clap yourCommand yourParameter