Type-Safe CLI Argument Parser
JSON →cli-vir is a command-line interface (CLI) argument parser for Node.js, built with a strong emphasis on type safety for parsed arguments. The current stable version is 1.0.3, indicating active development with frequent patch releases addressing minor issues and dependency updates. Key differentiators include its flexible handling of flag formats (single/double dashes, short/long forms), support for case-insensitive flag names across camelCase, kebab-case, and snake_case variants, and robust options to restrict argument values to specific sets or convert truthy/falsy strings to booleans. It provides comprehensive type inference for parsed values and automatically generates man-page-style documentation for parsing failures. This library streamlines CLI development by abstracting away common parsing complexities and enhancing developer experience with strong type guarantees. It requires Node.js version 22 or higher.
Traffic · last 30 days ↓57% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France