# gflags/gflags

The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for standard types such as string and the ability to define flags in the source file in which they are used. Online documentation available at:

Repository: https://github.com/gflags/gflags
Canonical: https://ross.abutalabs.com/products/gflags
Homepage: https://gflags.github.io/gflags/
Language: C++
License: BSD-3-Clause
License Family: permissive
Last push: 2026-07-25T08:05:49+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 62, longevity 100
- inputs: {"age_days": 4883, "days_push": 39, "days_rel": 42, "gap_med": 228, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3025, forks 854 (observed 2026-08-28T04:07:38.613816+00:00)

## What it is
gflags is a C++ library for commandline flags processing, originally developed by Google. It supports built-in standard types and allows flags to be defined in the source file where they are used rather than centrally in main().

## Use cases
- parse commandline flags in a C++ application
- define flags next to the code that uses them
- validate flag values with sanity checks
- replace getopt with a more flexible flag library
- manage configuration flags across a large C++ codebase

## When to choose
- you need distributed flag definitions across source files in C++
- you want a mature, widely-used commandline flag library with CMake/Bazel support
- your project already uses gflags and only needs maintenance releases

## When to avoid
- you are starting a new project using Abseil (prefer Abseil's flags library)
- you need actively developed new features
- you are not writing C++

## Facets
- artifact type: library
- maturity: maintenance
- function: cli, parser, developer-tools
- domain: developer-tools, cross-platform
- platform: cpp, cross-platform, windows
- tags: commandline-flags, google, cmake, bazel, configuration, command-line, linux, macos

## Member repositories
- gflags/gflags (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:38.613816+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-30T07:29:54.018100+00:00, confidence not recorded.
  - readme: https://github.com/gflags/gflags (fetched 2026-08-28T04:07:38.613816+00:00, sha 575e4a8a96fc)
  - homepage: https://gflags.github.io/gflags/ (fetched 2026-08-29T09:44:55.391604+00:00, sha 8df2d8392b11)
- Data as of 2026-08-30T08:39:29.467469+00:00.
