Parse an array of CLI argument strings into a typed CLIOptions object.
Supports the canonical flags --help / -h, --version / -v, and --health.
--help
-h
--version
-v
--health
Array of raw argument strings (typically process.argv.slice(2))
process.argv.slice(2)
Typed CLI options with boolean flags
const opts = parseCLIArgs(['--health']);if (opts.health) showHealth(); Copy
const opts = parseCLIArgs(['--health']);if (opts.health) showHealth();
Parse an array of CLI argument strings into a typed CLIOptions object.
Supports the canonical flags
--help/-h,--version/-v, and--health.