# alecthomas/kong

Kong is a command-line parser for Go

Repository: https://github.com/alecthomas/kong
Canonical: https://ross.abutalabs.com/products/kong
Language: Go
License: MIT
License Family: permissive
Topics: go, golang, command-line, parser, commands, flags, tags, struct
Last push: 2026-08-26T16:02:36+00:00

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

## Adoption (not part of the score)
Stars 3162, forks 183 (observed 2026-08-28T04:07:46.588522+00:00)

## What it is
Kong is a command-line argument parser library for Go that maps flags, positional arguments, and subcommands onto Go structs using tags. It supports help generation, configuration file loading, plugins, validation, and custom decoders.

## Use cases
- parse command-line flags in a Go program
- build a CLI with subcommands in Go
- generate help text for a Go CLI
- load CLI defaults from config files
- define CLI arguments with struct tags

## When to choose
- you are writing a Go CLI and want struct-based flag and subcommand parsing
- you need rich help output, plugins, and configuration file support out of the box

## When to avoid
- you need a CLI parser in a language other than Go
- you want a minimal zero-dependency flag parser like the stdlib flag package

## Facets
- artifact type: library
- maturity: stable
- function: parser, cli, developer-tools
- domain: developer-tools, parsers
- platform: go, cli, cross-platform
- tags: flag-parsing, subcommands, struct-tags, help-generation, configuration, command-line

## Member repositories
- alecthomas/kong (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:46.588522+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:25:13.371571+00:00, confidence not recorded.
  - readme: https://github.com/alecthomas/kong (fetched 2026-08-28T04:07:46.588522+00:00, sha b747a5d11dbf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
