title: NPM: module installation for a command line node tool?
body: <p>I have a command line tool written in node. I'd like to:</p>
  
  <ul>
  <li>Have the app be able to load its dependencies and work. Currently, after <code>npm install -g &lt;somemodule&gt;</code> that module is still not available. Things didn't used to work this way.</li>
  <li>Not have to run <code>npm link</code> on every folder, as I have read in the <a href="http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/" rel="nofollow">NPM 1.0 docs</a>. The above docs also talks about $PATH, which seems unrelated to the topic as I care about node modules, not binaries.</li>
  </ul>
  
  <p><strong>How can/should a node command line tool handle its dependencies</strong> so that the command line tool can run from any directory?</p>