Created bin with mongo-migrate and put code for dealing with command line calls to the module here, leaving module code in index.js. Added bin key package.json to create a mongo-migrate link in /usr/local/bin for executing from command line; Changed mongodb to a dependency from a devDependency as the project will not run without it; Removed the need to pass -runmm when calling from the command line (now you just call mongo-migrate); Added a function which installs the mongodb module into the migration folder on create if it is not already there because the template crated for the migrations has a require('mongodb') statement which will fail if this module is not installed at the location;