Skip to content
JS
Package

getopts

Parse CLI arguments.

v2.3.0, 15 Feb 2021MITESM + CommonJSTypes: BundledCLI tools and terminal utilities
$ npm install getopts

Key numbers

As of 25 Sept 2026
Weekly downloads
3.5m
+78% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
5 years ago
v2.3.0
GitHub stars
634
22 forks
Open issues / PRs
5 / 0
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
02m4m6mSept 2025Mar 2026Sept 2026High 5m (25 Aug 2026)Low 1.4m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

3,453,318 downloads last week, 16,634,240 in the last month. The 12-month change of +78% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
021 in total
Latest version
2.3.0, 15 Feb 20215 years ago
First published
8 May 2015
Last push to GitHub
3 Jul 2025448 days before the snapshot
Repository archived
No
Open issues
5
Open pull requests
0
Commits, last 52 weeks
0
Dependents on npm
204

Major versions

  1. v2 first release 2.0.0, 12 Nov 2017
  2. v1 first release 1.0.0, 28 Oct 2017
  3. v0 first release 0.0.1, 26 Aug 2017

Recent releases

VersionPublished
2.3.015 Feb 2021
2.2.528 Jun 2019
2.2.422 Feb 2019
2.2.32 Nov 2018
2.2.219 Oct 2018
2.2.124 Aug 2018
2.2.017 Aug 2018
2.1.218 Jul 2018
2.1.117 Jul 2018
2.1.017 Jul 2018
2.0.610 Apr 2018
2.0.517 Mar 2018
2.0.417 Mar 2018
2.0.317 Mar 2018
Module format
ESM + CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
18 kB
Dependencies (0)
None
npm install getopts
  • jsDelivrhttps://cdn.jsdelivr.net/npm/getopts@2.3.0/
  • unpkghttps://unpkg.com/getopts@2.3.0/
  • esm.shhttps://esm.sh/getopts@2.3.0
PackageWeekly downloadsGzipLast releaseModuleComparison
cleye332.7k-6 days agoESM + CommonJS-
type-flag387.8k-6 days agoESM + CommonJS-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.