# p-ranav/argparse

Argument Parser for Modern C++

Repository: https://github.com/p-ranav/argparse
Canonical: https://ross.abutalabs.com/products/argparse
Language: C++
License: MIT
License Family: permissive
Topics: cpp17, header-only, library, argument-parser, cross-platform, mit-license
Last push: 2025-01-26T23:27:21+00:00

## Health v2 (maintenance only)
Score: 24/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 3, release rhythm 8, longevity 100
- inputs: {"age_days": 2713, "days_push": 584, "days_rel": 585, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3532, forks 313 (observed 2026-08-28T04:08:08.956215+00:00)

## What it is
A single-header, C++17 argument parsing library for modern C++ with a Python argparse-like API. It supports positional and optional arguments, subcommands, mutually exclusive groups, and automatic help generation.

## Use cases
- parse command-line arguments in a C++ program
- add subcommands to a C++ CLI tool
- generate help messages for a C++ application
- handle optional and positional arguments in C++
- build a CLI tool with argument validation in C++

## When to choose
- you need a lightweight, header-only argument parser for C++17
- you want Python argparse-style ergonomics in C++
- you need subcommands and mutually exclusive argument groups
- you want zero build dependencies and easy CMake integration

## When to avoid
- your project targets C++ standards older than C++17
- you need a full CLI framework with colors, spinners, or interactive prompts
- you are building a GUI application without command-line interfaces

## Facets
- artifact type: library
- maturity: stable
- function: parser, cli, developer-tools
- domain: developer-tools
- platform: cpp, cross-platform, cli
- tags: header-only, cpp17, argument-parsing, mit-license, subcommands, command-line, cpp

## Member repositories
- p-ranav/argparse (main) score 24

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:08.956215+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:35:05.649207+00:00, confidence not recorded.
  - readme: https://github.com/p-ranav/argparse (fetched 2026-08-28T04:08:08.956215+00:00, sha fd9c834d5de9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
