Added cli.js and updated code in README.md