Added command line support

Added command line support, ready to npm