initial command line parsing and REPL