github.com/alecthomas/kingpin

kingpin

Package kingpin provides command line interfaces like this:

54

Decision Signals

Health score 54/100, confidence 80/100.

Caution
Maintenance 15
Adoption 61
Security 92
Maturity 52
Developer DX 83
Confidence 80

Install

go get github.com/alecthomas/kingpin

Package Data

updated Jun 11, 2026
Latest versionv2.2.6+incompatible
Imported by1.5K packages
Stars0
Forks0
Last activity8 years ago
Latest releaseUnknown
LicenseUnknown
Known vuln records0

API Surface

411 symbols
SymbolKindSynopsis
Action Type type Action func(*ParseContext) error
Application Type type Application struct{ ... }
Application.Action Method func (a *Application) Action(action Action) *Application
Application.Author Method func (a *Application) Author(author string) *Application
Application.CmdCompletion Method func (c *Application) CmdCompletion(context *ParseContext) []string
Application.Command Method func (a *Application) Command(name, help string) *CmdClause
Application.DefaultEnvars Method func (a *Application) DefaultEnvars() *Application
Application.ErrorWriter Method func (a *Application) ErrorWriter(w io.Writer) *Application
Application.Errorf Method func (a *Application) Errorf(format string, args ...interface{})
Application.FatalIfError Method func (a *Application) FatalIfError(err error, format string, args ...interface{})
Application.FatalUsage Method func (a *Application) FatalUsage(format string, args ...interface{})
Application.FatalUsageContext Method func (a *Application) FatalUsageContext(context *ParseContext, format string, args ...interface{})

Maintained Alternatives

limited recent repository activity

#1 urfave/cli

Package cli provides a minimal framework for creating and organizing command line Go applications.

Go CLI Frameworks 24.1K stars 23.1K imported-by 65% confidence
94

#2 Cobra

Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.

Go CLI Frameworks 44.1K stars 0 imported-by 65% confidence
87

#3 go-arg

Struct-based argument parsing in Go.

Go CLI Frameworks 2.3K stars 1.7K imported-by 65% confidence
87

#4 dasel

Unified querying, transformation, and modification of JSON, TOML, YAML, XML, INI, HCL, KDL and CSV.

Go CLI Frameworks 8.0K stars 0 imported-by 45% confidence
85

#5 kong

Package kong aims to support arbitrarily complex command-line structures with as little developer effort as possible.

Go CLI Frameworks 0 stars 3.1K imported-by 80% confidence
77

#6 mow.cli

Package cli provides a framework to build command line applications in Go with most of the burden of arguments parsing and validation placed on the framework instead of the user.

Go CLI Frameworks 884 stars 895 imported-by 100% confidence
74

Similar Packages

Go CLI Frameworks

#1 urfave/cli

Package cli provides a minimal framework for creating and organizing command line Go applications.

Go CLI Frameworks 24.1K stars 23.1K imported-by 65% confidence
94

#2 Cobra

Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.

Go CLI Frameworks 44.1K stars 0 imported-by 65% confidence
87

#3 go-arg

Struct-based argument parsing in Go.

Go CLI Frameworks 2.3K stars 1.7K imported-by 65% confidence
87

#4 dasel

Unified querying, transformation, and modification of JSON, TOML, YAML, XML, INI, HCL, KDL and CSV.

Go CLI Frameworks 8.0K stars 0 imported-by 45% confidence
85

#5 kong

Package kong aims to support arbitrarily complex command-line structures with as little developer effort as possible.

Go CLI Frameworks 0 stars 3.1K imported-by 80% confidence
77