A fluent-style, type-safe command line and flag parser for Go applications.
Kingpin is a command-line parser for Go that uses a fluent, type-safe API to define flags, arguments, and nested sub-commands. It focuses on providing detailed, contextual help output and flexible parsing to simplify building robust CLI tools.
Go developers building command-line applications, especially those needing structured sub-commands, comprehensive help generation, and shell completion.
Developers choose Kingpin for its fluent, declarative API that reduces boilerplate, its emphasis on self-documenting commands through automated help, and built-in features like shell completion and file argument expansion.
CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables declarative flag and command definition with chainable methods like 'Flag().Short().Bool()', reducing boilerplate and catching type errors at compile time, as shown in the simple example.
Automatically produces contextual help output with customizable Go templates, including compact and man page formats, making commands self-documenting without extra code.
Supports autocompletion for Bash, ZSH, and Fish out of the box, with APIs for dynamic hints, easing user interaction as detailed in the Shell Completion section.
Allows interspersed flags and file argument expansion via '@<file>' syntax, improving usability by letting flags appear anywhere after definition, as highlighted in the v2 changes.
The author explicitly states that fixes and new features depend on community PRs, as they have moved to Kong, meaning bugs may linger and updates are unlikely without contributor effort.
The fluent API and extensive feature set introduce complexity for straightforward CLI applications that don't require sub-commands or templated help, adding unnecessary learning curve.
While the README is detailed, the project's 'contributions only' status may lead to outdated examples or limited community support for edge cases compared to more actively maintained alternatives.