add command line support

@bryan-coursera PTAL