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 repo has an upstream push as of 2024-07-18, but the most recent published updates shown here are older (5.0.2 on 2022-06-05), suggesting a long, quiet maintenance cadence rather than active, frequent development (as of 2026-06-09).
- Update cadence (apparent): Updates appear to be occasional, with large gaps between the last few versions (notably 2022, 2021, then 2020), and no evidence of regular releases in the last year+ relative to today.
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