Getopt is a project mainly written in Haxe, it's free.
Haxe getopt style command line arguments parser
Utility to parse command line arguments using same/similar conventions as the Unix getopt() function.
var go = new Getopt();
go.addSwitch( ["f"], store( "filename", TString ) );
go.parse( ["-f","myfile"] );
go.parseString( "-f myfile" );
trace( go.opt.filename ); // myfile