Registry / cli / alecthomas-kingpin-v2

alecthomas-kingpin-v2

JSON →
library2.4.0gogounverified

Command-line argument and flag parser for Go applications with support for subcommands and complex interfaces.

go get gopkg.in/alecthomas/kingpin.v2
INSTALL
IMPORT
SIG · ALECTHOMAS-KINGPIN
A
alecthomas-kingpin-v2
cligov2.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

kingpin
gopkg.in/alecthomas/kingpin.v2

Define a flag and a required argument, then parse command-line input.

package main import ( "gopkg.in/alecthomas/kingpin.v2" ) var ( verbose = kingpin.Flag("verbose", "Enable verbose mode").Bool() name = kingpin.Arg("name", "Your name").Required().String() ) func main() { kingpin.Parse() println("Hello", *name) }
Debug
Known issues
gotchaKingpin v2 is in maintenance mode; consider migrating to Kong or another library.
fix
Use github.com/alecthomas/kong for new projects.
affects: >=2.4.0
Upgrade
Version history
2.4.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
32
Perplexity
1
OpenAI (training)
1
Resources
alecthomas-kingpin-v2 — go get alecthomas-kingpin-v2 · libregistry