What is the correct way to pass command line options?

It sounds like you want a mix task or an escript.