
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
commander-remaining-args
Advanced tools
Get the remaining unknown arguments after parsing the CLI with commander.js
Get the remaining unknown arguments after parsing the CLI with commander.js
Example use case: your program launches a child process. User passes flags to your program. You parse certain flags but want the rest to be passed down to the child process.
Don't forget to set .allowUnknownOption() on your commander.js object.
const cli = require('commander');
const getRemainingArgs = require('commander-remaining-args');
cli
.allowUnknownOption()
.option('--some-flag')
.parse(process.argv);
// node myprogram.js --some-flag --unknown-flag --unknown-arg=value -x
getRemainingArgs(cli); // ['--unknown-flag', '--unknown-arg=value', '-x'])
FAQs
Get the remaining unknown arguments after parsing the CLI with commander.js
We found that commander-remaining-args demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies