🔤

CLI Argument Parser

Verified

by Community

Implements command-line argument parsing with support for flags, options, subcommands, and positional arguments. Covers getopts in bash, commander/yargs in Node.js, argparse in Python, and cobra in Go with help text generation.

cliargumentsparsingflagscommandline

CLI Argument Parser

Parse command-line arguments with flags, options, subcommands, and help text in any language.

Usage

Describe the CLI interface you want and this skill will implement argument parsing.

Examples

  • "Parse --input, --output, and --verbose flags in a bash script"
  • "Build a Node.js CLI with subcommands using commander"
  • "Implement argument parsing with type validation in Python"

Guidelines

  • Provide sensible defaults for optional arguments
  • Generate help text automatically from argument definitions
  • Validate argument types and ranges before processing
  • Support both short and long flag formats
  • Exit with meaningful error messages for invalid arguments