command line parsing, basic repl implementation