tj/commander.js ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Node.js library for making command line tools easier to write.

I want it to let me define commands, options, and arguments in a simple way, then automatically parse what the user typed, show friendly errors for bad input, and print helpful usage text when they ask for help. It should support basic flags, options with values, default values, subcommands, and action handlers for each command. I’d also like it to work nicely with both plain JavaScript and TypeScript, and to include a few clear examples I can run from the command line.

Please make it feel polished, with good help output, sensible error messages, and test coverage for the main behaviors. If there are any current Node best practices or docs that would improve the implementation, look them up online and follow them.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab