# alecthomas/kingpin

CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser

Repository: https://github.com/alecthomas/kingpin
Canonical: https://ross.abutalabs.com/products/kingpin
Language: Go
License: MIT
License Family: permissive
Topics: go, kingpin, cli, command-line
Last push: 2026-08-26T17:57:59+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 4494, "days_push": 7, "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 3568, forks 279 (observed 2026-08-28T04:08:10.028567+00:00)

## What it is
Kingpin is a fluent-style, type-safe command-line and flag parser for Go, supporting flags, nested sub-commands, positional arguments, and shell completion. It is feature-stable but contributions-only, with the author recommending his newer library Kong for new projects.

## Use cases
- parse command-line flags in a Go program
- build a CLI tool with nested subcommands
- generate bash/zsh/fish shell completions for a Go CLI
- define required and default flag values with type safety
- handle positional arguments in a command-line application

## When to choose
- you are maintaining an existing Go project that already uses Kingpin
- you need a mature, feature-stable flag and subcommand parser for Go
- you want a fluent, type-safe API for CLI parsing

## When to avoid
- you are starting a new Go project and want active maintenance (consider Kong instead)
- you need bug fixes or new features guaranteed by the maintainer
- you need a parser for a language other than Go

## Facets
- artifact type: library
- maturity: maintenance
- function: cli, parser
- domain: developer-tools, parsers
- platform: go, cross-platform
- tags: flag-parsing, command-line-parser, subcommands, shell-completion, fluent-api, command-line

## Member repositories
- alecthomas/kingpin (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:10.028567+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:34:09.195449+00:00, confidence not recorded.
  - readme: https://github.com/alecthomas/kingpin (fetched 2026-08-28T04:08:10.028567+00:00, sha 46f2a8308947)
- Data as of 2026-08-30T08:39:29.467469+00:00.
