arg
npmv5.0.2TypeScriptUnopinionated, no-frills CLI argument parser
Not recommended for new projects
No — arg should not be adopted for new projects. Last published 1557 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 1557 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 13 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 164 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding arg to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the arg README.
const arg = require('arg');
// `options` is an optional parameter
const args = arg(
spec,
(options = { permissive: false, argv: process.argv.slice(2) })
);Dependencies
Declared by arg v5.0.2. Runtime dependencies are installed with the package; dev dependencies are not.
Used by
Popular packages that depend on arg.
Relationship graph
Dependencies (left) and dependents (right) of arg.
Frequently installed together
The Expo SDK
Expo Router is a file-based router for React Native and web applications.
TypeScript definitions for node
The semantic version parser used by npm.
Resolve the path of a module like `require.resolve()` but from a given path
Get and typecast environment variables.
hydrate environment variables from .env files into process.env
Lightweight debugging utility for Node.js and the browser
A Promise-based interface into processes created by child_process.spawn
the most correct and second fastest glob implementation in JavaScript
TypeScript definitions for debug
This package exports the `expect` function used in [Jest](https://jestjs.io/). You can find its documentation [on Jest's website](https://jestjs.io/docs/expect).
Release history
No releases in the last two years, typically about 136 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.0.2latest | 4 years ago | 13 KB | MIT |
| 5.0.1 | 5 years ago | 13 KB | MIT |
| 5.0.0 | 5 years ago | 13 KB | MIT |
| 4.1.3 | 6 years ago | 13 KB | MIT |
| 4.1.2 | 6 years ago | 12 KB | MIT |
| 4.1.1 | 7 years ago | 12 KB | MIT |
| 4.1.0 | 7 years ago | 12 KB | MIT |
| 4.0.1 | 7 years ago | 12 KB | MIT |
| 3.0.0 | 7 years ago | 8.7 KB | MIT |
| 2.0.1 | 7 years ago | 7.6 KB | MIT |
| 2.0.0 | 8 years ago | 128 KB | MIT |
| 1.0.1 | 8 years ago | 125 KB | MIT |
| 1.0.0 | 9 years ago | — | MIT |
| 0.0.1 | 14 years ago | — | MIT |
Overview
arg is an npm package that unopinionated, no-frills CLI argument parser. It has 3 known dependents in the graph. The latest version is 5.0.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need unopinionated, no-frills CLI argument parser and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use arg?
No — arg should not be adopted for new projects. Last published 1557 days ago.
How do I install arg?
Run `npm install arg` to add arg to your npm project.
What license is arg released under?
arg is distributed under the MIT license.
How popular is arg?
npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on arg.
Is arg still maintained?
The most recent release of arg (v5.0.2) was published 4 years ago.
Does arg run install scripts?
No. arg does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.