{"library":"type-flag","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"4.2.0","tags":["javascript","cli","command-line","flag","argv","arguments","parser","typed","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install type-flag","imports":["import typeFlag from 'type-flag'","import { flagNameToKebab } from 'type-flag'","import type { TypeFlag } from 'type-flag'"]},{"cmd":"yarn add type-flag","imports":[]},{"cmd":"pnpm add type-flag","imports":[]}],"homepage":null,"github":"https://github.com/privatenumber/type-flag","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/type-flag","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/type-flag/compatibility"}}