Pure CLI argument parsing for the article-generator. The
parser maps process.argv.slice(2) into a CliOptions struct
and rejects historical / removed flags with an actionable error. The
only side-effects are (a) fs.existsSync to validate the --run
argument and (b) process.stdout.write + process.exit(0) for the
built-in --help text — both required to keep CLI ergonomics intact.
Description
Pure CLI argument parsing for the article-generator. The parser maps
process.argv.slice(2)into a CliOptions struct and rejects historical / removed flags with an actionable error. The only side-effects are (a)fs.existsSyncto validate the--runargument and (b)process.stdout.write+process.exit(0)for the built-in--helptext — both required to keep CLI ergonomics intact.