Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating a CLI in Pharo

Tags:

pharo

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

like image 816
Nicholas Greensmith Avatar asked May 05 '26 16:05

Nicholas Greensmith


1 Answers

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

like image 56
Be1dzr Avatar answered May 11 '26 15:05

Be1dzr