Type-safe Command-Line Arguments Parser

JSON →
library 4.2.0 ·javascript
verified May 27, 2026

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.

total hits 14
actors 6 distinct systems
last hit 1d ago MetaBot
GPTBot
5
MetaBot
4
Script
1
Search engines
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany