# jessevdk/go-flags

go command line option parser

Repository: https://github.com/jessevdk/go-flags
Canonical: https://ross.abutalabs.com/products/go-flags
Homepage: http://godoc.org/github.com/jessevdk/go-flags
Language: Go
License: BSD-3-Clause
License Family: permissive
Last push: 2024-07-26T07:31:57+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5115, "days_push": 768, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2697, forks 325 (observed 2026-08-28T04:07:11.230299+00:00)

## What it is
go-flags is a Go library for parsing command line options, offering more features than the standard flag package. It uses structs, reflection, and struct tags to define options concisely, supporting short/long names, defaults, choices, slices, maps, callbacks, and automatic help generation.

## Use cases
- parse command line flags in a Go CLI
- define CLI options with struct tags instead of manual parsing
- generate formatted help messages for a command line tool
- support combined short options like -aux in a Go app
- parse options into typed fields like ints, slices, and maps
- build nested option groups and subcommands

## When to choose
- you need richer option parsing than Go's builtin flag package
- you want declarative option definitions via struct tags
- you need automatic, well-formatted help output
- your CLI uses short flags, long flags, choices, or repeated options

## When to avoid
- you only need a couple of simple flags and prefer zero dependencies
- you need subcommand-style CLIs with a framework like cobra
- you are not writing Go

## Facets
- artifact type: library
- maturity: stable
- function: parser, cli, developer-tools
- domain: developer-tools, programming-languages
- platform: go, cross-platform, cli
- tags: command-line-parsing, flags, option-parser, reflection-based, struct-tags, help-generation, command-line

## Member repositories
- jessevdk/go-flags (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:11.230299+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-30T02:16:13.109004+00:00, confidence not recorded.
  - readme: https://github.com/jessevdk/go-flags (fetched 2026-08-28T04:07:11.230299+00:00, sha 2fb73d61ab48)
  - homepage: http://godoc.org/github.com/jessevdk/go-flags (fetched 2026-08-29T09:59:20.732141+00:00, sha 62db5a7d5be2)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T09:59:20.745743+00:00, sha 757852027879)
  - site_page: https://go.dev/about (fetched 2026-08-29T09:59:20.747594+00:00, sha 8b6453863a90)
  - site_page: https://pkg.go.dev/github.com/jessevdk/go-flags (fetched 2026-08-29T09:59:20.742582+00:00, sha 1fab0d73d006)
  - site_page: https://go.dev/project (fetched 2026-08-29T09:59:20.749335+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
