Search node_modules for a specific prefix #2

mattmcmanus opened this Issue Jun 19, 2013 · 2 comments


None yet

2 participants


Allow for:

var cli = helmsman({ npmPrefix:'nabu-cli-' });

and it will automatically search the libraries npm installed packages and add any exposed 'commands'


hey @mattmcmanus this would be really cool, are you still interested in doing something this this?


as a hacky work-around, I just ended up doing this:

#!/usr/bin/env node

// load binaries from node_modules
var pkg = require('../package');
pkg.commands.forEach( function( moduleName ){
  process.env.PATH += ':' + process.cwd() + '/node_modules/' + moduleName + '/bin';

var helmsman = require('helmsman');
helmsman({ usePath: true }).parse();

... and in my package.json

  "commands": [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment