Instead of an environment variable, why not use command line parameters? `node generateKeys email numKeys`

Check out http://nodejs.org/api/process.html#process_process_argv