yargs-patterns

Community

Robust Node.js CLIs with advanced yargs patterns.

Authorvanman2024
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps developers build robust Node.js CLIs using the yargs library by providing ready-to-use patterns for commands, options, middleware, and validation, reducing boilerplate and speeding up delivery.

Core Features & Use Cases

  • Subcommands and namespace options: Create multi-command CLIs with isolated option spaces for each command.
  • Options, flags, and validation: Define type coercion, defaults, and validation rules to catch errors early.
  • Middleware and hooks: Preprocess arguments, load configs, and modify argv before command handlers run.
  • Templates & Examples: Scaffold CLIs quickly with templates like basic-cli.js and advanced-cli.js, plus example subcommands.

Quick Start

Use the yargs-patterns skill to scaffold a new CLI by starting from the templates in templates/ and adapting the provided examples (such as subcommands-example.js) to your project. Then run the CLI and verify help and subcommand behavior.

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: yargs-patterns
Download link: https://github.com/vanman2024/cli-builder/archive/main.zip#yargs-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository