write the code in ./lib/index.js parse cmd arguments in ./bin go the the product root and install globally using: npm install -g . go the the product root and uninstall globally using: npm uninstall -g .