API Reference

@yargs/yargs

// registry.npmjs.org supports CORS, so we can fetch it directly fetch('https://registry.npmjs.org/yargs') .then(function (res) { return res.json() })…

Official Documentation ↗
CompatibilityThis documentation covers version v18.0. Check the official docs for the latest API surface.

Installation

npmnpm install @yargs/yargs
pnpmpnpm add @yargs/yargs
yarnyarn add @yargs/yargs

Methods

Overview

// registry.npmjs.org supports CORS, so we can fetch it directly fetch(‘https://registry.npmjs.org/yargs’) .then(function (res) { return res.json() }) .then(function (data) { if (!version) throw new Error(‘no latest version found’) console.

API reference status

This page lists only entry points that appear verbatim in the official README examples: fetch. Parameter and return types are not given by the official README, so signatures are marked unverified.

Verification notes

FAQ

What does @yargs/yargs do?
// registry.npmjs.org supports CORS, so we can fetch it directly fetch('https://registry.npmjs.org/yargs') .then(function (res) { return res.json() }) .then(function (data) { if (!version) throw new E
How do I install @yargs/yargs?
Run `npm install @yargs/yargs`.
Where can I verify the API details?
Official repository/documentation: https://yargs.js.org/docs/. Checked on 2026-11-04; signatures and return values not stated in the official README are marked unverified.