The problem with untyped CLIs Commander.js is great for parsing arguments, but it hands you everything as string | undefined — regardless of what type you declared in the option definition. The in .option("--count ") is cosmetic. What lands in your action handler is raw text from process.argv, and the coercion, validation, and type-narrowing is entirely on you. Most developers paper over this w