Let's take the following code (assume file is named demo.js).
#!/usr/bin/env node
var commands = require('commander');
commands
.option('-t, --test <value>', 'Just testing')
.parse(process.argv);
Let's try to run it:
./demo.js --test 5 - no errors
./demo.js --test 5 demo.js - no errors
./demo.js --test 5 --test2 demo.js - unknown option '--test2'
./demo.js demo.js --test 5 --test2 - no errors
Apparently extra arguments where added at the beginning suppress errors.