Make a script which accept command-line arguments
If you want to do more sophisticated stuff, the following modules are really helpful:
- yargs by Benjamin Coe
- commander by TJ Holowaychuk
- vorpal by David Caccavella
- nopt by Isaac Schlueter
And for fun
- cli-table by Guillermo Rauch
- node-multimeter by substack
- chalk by Sindre Sorhus
See http://nodejs.org/docs/latest/api/process.html#process_process_argv
In summary you'll run it like
node stuff.js blah hee "whoohoo!"
Then your arguments are available in process.argv