macOS
brew install gflagslocal Homebrew formula metadata
sudo port install gflagsMacPorts ports tree · devel/gflags/Portfile · source: api.github.com
brew
Library for processing command-line flags. Version 2.3.0 via Homebrew; verified from local package data.
install
brew install gflagslocal Homebrew formula metadata
sudo port install gflagsMacPorts ports tree · devel/gflags/Portfile · source: api.github.com
sudo apk add gflagsAlpine Linux edge package indexes · gflags · source: dl-cdn.alpinelinux.org
sudo apt install libgflags-devDebian stable package indexes · libgflags-dev · source: deb.debian.org
sudo dnf install gflagsFedora Rawhide package metadata · gflags · source: dl.fedoraproject.org
nix profile install nixpkgs#gflagsnixpkgs package indexes · pkgs/by-name/gf/gflags/package.nix · source: api.github.com
sudo pacman -S gflagsArch Linux sync databases · gflags · source: geo.mirror.pkgbuild.com
sudo zypper install gflagsopenSUSE Tumbleweed package metadata · gflags · source: download.opensuse.org
overview
Library for processing command-line flags
history
gflags is the open-source C++ command-line flags library that began as Google Commandline Flags. Its distinguishing design is that flag definitions can live in the source file that uses them, with the library collecting, parsing, validating, and documenting those flags for an executable.
The changelog records a Google Inc. 0.1 release in December 2006, followed by 1.0 in October 2008 and several google-gflags releases through 2011. In January 2012, the project was renamed from google-gflags to gflags as Google stepped back from ownership and Andreas Schuh became maintainer.
gflags spread through C++ infrastructure because it offered a Google-style alternative to getopt-like parsers: each library or translation unit could declare its own flags, while users still received unified help output and parsing behavior. Later releases emphasized package and build-system integration, including CMake, Bazel, pkg-config, Homebrew, Debian/Ubuntu packages, and vcpkg.
Practitioners add `DEFINE_*` and `DECLARE_*` macros in C++ code, link the library, call the parser during program startup, and then read `FLAGS_name` variables from the relevant code. The installation docs cover use through distro packages, Homebrew, Bazel, vcpkg, and CMake.
gflags matters to package maintainers because it is both a runtime library and a build-system integration target for many C++ projects. The long namespace transition from `google` to `gflags`, plus compatibility for projects such as glog, made ABI and include-path behavior unusually important.
security posture
library-like package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
gflags_completions.sh | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/gflags/gflags
install metadata
| Package key | brew:gflags |
|---|---|
| Version | 2.3.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/gflags |
| Homepage | https://gflags.github.io/gflags/ |
| Repository | https://github.com/gflags/gflags |
| Upstream docs | https://gflags.github.io/gflags |
| License | BSD-3-Clause |
| Source archive | https://github.com/gflags/gflags/archive/refs/tags/v2.3.0.tar.gz |
| Build dependencies | cmake |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | gflags |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
libgflags-dev 2.2.2-2
commandline flags module for C++ (development files)
https://gflags.github.io/gflags/
sudo apt install libgflags-devlibgflags-doc 2.2.2-2
documentation of gflags
https://gflags.github.io/gflags/
sudo apt install libgflags-doclibgflags2.2 2.2.2-2
commandline flags module for C++ (shared library)
https://gflags.github.io/gflags/
sudo apt install libgflags2.2gflags
nix profile install nixpkgs#gflagslibgflags-dev 2.2.2-2build1
commandline flags module for C++ (development files)
https://gflags.github.io/gflags/
sudo apt install libgflags-devlibgflags-doc 2.2.2-2build1
documentation of gflags
https://gflags.github.io/gflags/
sudo apt install libgflags-doclibgflags2.2 2.2.2-2build1
commandline flags module for C++ (shared library)
https://gflags.github.io/gflags/
sudo apt install libgflags2.2gflags 2.3.0-r0
The gflags package contains a C++ library that implements commandline flags processing.
https://gflags.github.io/gflags/
sudo apk add gflagsgflags-dev 2.3.0-r0
The gflags package contains a C++ library that implements commandline flags processing. (development files)
https://gflags.github.io/gflags/
sudo apk add gflags-devgflags 2.2.2-19.fc44
Library for commandline flag processing
https://gflags.github.io/gflags/
sudo dnf install gflagsgflags-devel 2.2.2-19.fc44
Development files for gflags
https://gflags.github.io/gflags/
sudo dnf install gflags-develgflags 2.2.2-6
C++ Library for commandline flag processing
https://github.com/schuhschuh/gflags
sudo pacman -S gflagsgflags 2.2.2-4.5
Library for commandline flag processing
https://github.com/gflags/gflags
sudo zypper install gflagsgflags-devel 2.2.2-4.5
Development files for the dynamic gflags library
https://github.com/gflags/gflags
sudo zypper install gflags-devellibgflags2_2 2.2.2-4.5
Library for commandline flag processing
https://github.com/gflags/gflags
sudo zypper install libgflags2_2gflags
sudo port install gflagssource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.