Getopts CLI Argument Parser
JSON →getopts is a lightweight and performant CLI argument parser for Node.js, currently at stable version 2.3.0. It aims to be a drop-in replacement for `minimist` and similar libraries, distinguishing itself through its small footprint (180 LOC), zero dependencies, and significantly faster parsing speeds, reportedly up to 6 times faster than alternatives. The library follows established utility conventions for argument parsing, providing sane defaults for common CLI patterns. It transitioned to ES modules in version 2.3.0 and has shipped TypeScript types since 2.1.1, facilitating modern JavaScript and TypeScript development workflows. Releases are generally driven by new features, bug fixes, and maintenance, with a recent focus on ESM migration.
Traffic · last 30 days ↑250% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇹🇷 Turkey · CO