1. License
“PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version”
Any use is allowed; keep the PSF copyright notice with the code.
github.com/nodeca/argparse/blob/master/LICENSE2. Maintained
github.com/nodeca/argparse3. Used by agents' projects
Dependency in 2 public GitHub projects set up for AI coding agents that we scanned (0.0%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily; card checked Nov 11, 2026. Tap a verdict to see its source.How we checkedReport an error
What argparse does
This argparse is a free JavaScript library that reads the options typed after a command in Node.js programs. It copies the argparse module built into Python, so the help screen, error messages and option names work the same way. It is not Python's own module; it is the Node.js version of it.
What people build with it
Options for a build script
A script that builds your site takes --pages 120 or --dry-run, checks that numbers really are numbers and prints a help screen with -h.
One tool with several commands
A small admin tool for your project has separate build and publish commands, each with its own options and help.
Catch a typo in a command name
Someone types "pubish"; the tool answers "maybe you meant 'publish'?" instead of only an error.
Bring a Python tool to Node.js
Your team has a Python script with argparse options; the Node.js version keeps the same option names and help text with few changes.
Handle bad input inside your code
A tool that runs inside a bigger program catches a wrong value as an error object instead of quitting the whole process.
argparse popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How argparse is used
- argparse joined the catalog on its public numbers (384,858,248 downloads a week on npm and 515 GitHub stars), not on our project count: it is a dependency in 5 public GitHub projects of our scan, 2 of them set up for AI coding agents.
- The most used alternative in our scan is Commander (174 projects).
- Projects that use it most often also use dotenv (100.0%), glob (100.0%), cssnano (80.0%).
Often used with
More about argparse
Funding
- GitHub Sponsors: https://github.com/puzrin
- GitHub Sponsors: https://github.com/nodeca
- 2 GitHub sponsors
More in Dev workflow and config
Alternatives
argparse This page
Pick Commander for the most common Node.js way to describe commands and options, with chained method calls and many examples.
Pick yargs when you want commands, help and validation described as one object, plus shell completion.
Pick minimist when you only need to split --name value pairs into an object, with no help screen or checks.
Get started
Tell your AI assistant
“Use the npm package argparse (pin argparse@3.0.4) to parse this Node.js script's options with snake_case names (add_argument, parse_args, store_true), string types like 'int', subcommands via add_subparsers, and suggest_on_error true; read the Python 3.14 argparse docs for details.”
Read the Python argparse documentation for the options; this package has only notes on the differences.
Pass options as one object instead of Python's keyword arguments.
new ArgumentParser({ description: 'example', add_help: true })Name types as strings such as 'int', 'float' or 'str'.
.add_argument('-b', { type: 'int', help: 'help' })
Mistakes to avoid
Version 3 removed the camelCase aliases; in our run on 3.0.4 both methods were undefined.
Old option and action names were removed; in our run addHelp threw "got an unexpected keyword argument 'addHelp'".
JavaScript has no Python int type, so types are named with strings.
Dashes inside option names become underscores; our run printed {"dry_run":true}.
In our run the main parser suggested 'publish' for 'pubish', but the publish subcommand did not suggest 'production' for 'prodution' until its own parser had the option.
Questions
Is this Python's argparse?
No. It is a JavaScript copy of Python's module for Node.js, following Python 3.14.6.
Can I use it in a paid product?
Yes. The PSF-2.0 license allows any use; keep the copyright notice.
What changed in version 3?
It follows Python 3.14.6, adds colored help, typo suggestions and built-in TypeScript types, and drops the old camelCase names.
How does it behave on a wrong value?
It prints the usage line and an error and exits with code 2, unless exit_on_error is false; our run showed exit code 2.
Is it still maintained?
Yes. Version 3.0.4 came out on 2026-10-24, after five years at 2.0.1.