Kingpin is a command-line and flag parser for Go that uses a fluent-style, type-safe API.
Kingpin solves the problem of parsing command-line arguments, flags, and subcommands in Go applications. It uses a fluent interface that chains method calls to define the structure of a CLI, allowing developers to specify flags, nested commands, and positional arguments in a readable, declarative way. The parser generates contextual help automatically at any point in the command line, prioritizing user-facing documentation alongside argument parsing.
Kingpin suits projects that need straightforward command-line interfaces with nested subcommands, repeatable flags, and custom argument parsing. The tool is feature-stable and handles common CLI patterns including shell completion for Bash, ZSH, and Fish. Developers should be aware that the original maintainer no longer actively develops the project and now uses an alternative tool; the project operates on a contributions-only basis, meaning fixes and new features depend on community pull requests.
The project is in a stable but unmaintained state. There are known bugs that remain unfixed due to lack of active development capacity. The tool is no longer used by its original author for new work.