Arg is an unopinionated CLI argument parser for Node.js. It parses command line flags into an object (consumed options become properties, extra positional values go into `result._`) and supports basic types, aliases, and permissive parsing behavior. It is useful for turning `process.argv` into structured inputs for command line tools.
Project status
- Maintenance status: The last published updates are 5.0.2 from 2022-06-05, and the most recent upstream push was 2024-07-18, but there is no evidence of tagged package updates since 2022, so the project appears quiet/dormant in practice as of 2026-09-10.
- Update cadence: After several major updates from 2017 to 2020, there were patch updates in 2021 and 2022, with a long gap to the present date. This suggests no regular release cadence recently.
AI summary generated
Recent updates
5.0.2
Release 5.0.2 is a small patch release focused on TypeScript type definitions. The documented change exports the internal `flagSymbol` so it can be referenced in the `arg` namespace typing.
5.0.1
Release 5.0.1 is described as a patch release that updates dependencies and switches CI to GitHub Actions. The diff shows no clear functional changes to the arg parser itself, but it does include tooling and formatting updates across the repository.
5.0.0
Release 5.0.0 introduces a new error model via `arg.ArgError`, with `.code` values and lowercase error message starts. The codebase also adds new parsing capabilities (including flag counting and positional parsing control) and tightens validation around argument specification keys.
BreakingFeatures3.0.0
Release 3.0.0 tightens validation of the argument specification object and improves error reporting. It also adds first-class TypeScript type definitions and updates the package metadata to ship them.
BreakingFeatures2.0.1
Release 2.0.1 is described in the release notes as a publish-size optimization only. However, the actual code diff shows a major public API change to how the exported arg() function is called, including different error handling and new parsing options behavior.
Features1.0.1
Release 1.0.1 is presented as a small patch, noting a move from a scoped package to a public package and the addition of a lockfile. The code diff shows that this patch also renames the library from zarg to arg, including the exported function and package metadata, which is not described in the release notes.
Breaking0.2.0
Release 0.2.0 introduces a new spec referenced as issue #1. The release notes do not describe any API changes, bug fixes, security updates, or migration steps.
Features