Type-safe Command-Line Arguments Parser
JSON →type-flag is a robust and type-safe command-line arguments parser for Node.js, primarily designed for TypeScript projects. It enables developers to define CLI flag schemas with strong type inference, ensuring that parsed arguments adhere to the expected types at compile-time and reducing common runtime errors. The current stable version is 4.2.0, while version 5.0.0 is actively under development in a beta phase, indicating a consistent and evolving release cadence. Key differentiators include its deep integration with TypeScript for compile-time validation of CLI flags, automatic camelCase to kebab-case conversion for flag names, and support for complex flag types, arrays, and custom parsers, offering a more predictable and maintainable approach to building command-line interfaces compared to untyped alternatives.
Traffic · last 30 days ↓56% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany