# jarro2783/cxxopts

Lightweight C++ command line option parser

Repository: https://github.com/jarro2783/cxxopts
Canonical: https://ross.abutalabs.com/products/cxxopts
Language: C++
License: MIT
License Family: permissive
Topics: c-plus-plus, option-parser, positional-arguments
Last push: 2026-07-13T20:09:41+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 8, longevity 100
- inputs: {"age_days": 4352, "days_push": 51, "days_rel": 464, "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 4800, forks 652 (observed 2026-08-28T04:09:00.199863+00:00)

## What it is
A lightweight, header-only C++ command line option parser supporting GNU-style syntax. It handles long and short options, typed values, defaults, and positional arguments with a simple declarative API.

## Use cases
- parse command line arguments in a C++ program
- support --long and -s short options with GNU syntax
- handle positional arguments after --
- define typed options with defaults for a CLI tool
- add argument parsing to a header-only C++ project without dependencies

## When to choose
- you need a lightweight, header-only option parser with no build step
- you want GNU-style long/short option parsing in C++
- you want typed options with automatic parsing via operator>>
- you need MIT-licensed parsing available via Conan, vcpkg, or Homebrew

## When to avoid
- you need subcommands or complex CLI frameworks with help generation beyond basics
- you are not writing C++
- you need runtime-configurable or config-file-driven options

## Facets
- artifact type: library
- maturity: stable
- function: parser, cli, developer-tools
- domain: developer-tools, cross-platform
- platform: cpp, cross-platform, windows
- tags: header-only, command-line-parsing, gnu-style-options, lightweight, command-line, linux, macos

## Member repositories
- jarro2783/cxxopts (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:00.199863+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:18:37.917566+00:00, confidence not recorded.
  - readme: https://github.com/jarro2783/cxxopts (fetched 2026-08-28T04:09:00.199863+00:00, sha d68c91e1b043)
- Data as of 2026-08-30T08:39:29.467469+00:00.
