docopt.go
A command-line arguments parser that will make you smile. (by docopt)
kingpin
CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser (by alecthomas)
Our great sponsors
docopt.go | kingpin | |
---|---|---|
3 | 2 | |
1,424 | 3,441 | |
0.6% | - | |
0.0 | 5.2 | |
5 months ago | 22 days ago | |
Go | Go | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
docopt.go
Posts with mentions or reviews of docopt.go.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-11-28.
-
Getopt like argument parser for Golang.
There isn't enough compelling reasons to use your library as mentioned by n4jm4 there is already docopt. https://github.com/docopt/docopt.go or the standard flag library.
-
The flag package: strange but good?
or the DSL docopt which will parse the opts from the usage help text.
- Does anyone know a cli module that allows git-like bash sub commands?
kingpin
Posts with mentions or reviews of kingpin.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-07-07.
-
climate "CLI Mate": a CLI library that autogenerates CLIs from structs / functions with support for nested subcommands, global / local flags, help generation from godocs, typo suggestions, shell completion and more
Args could also have detailed help (like flags) -- usage line is already auto-generated from arg(s) name and type but that's about it. This is something Cobra doesn't do for whatever reason (but https://github.com/alecthomas/kingpin does and I like it)
- What is the best way to handle flags?
What are some alternatives?
When comparing docopt.go and kingpin you can also consider the following projects:
cobra - A Commander for modern Go CLI interactions
argparse - Argparse for golang. Just because `flag` sucks
go-flags - go command line option parser
cli - CLI - A package for building command line app with go
urfave/cli - A simple, fast, and fun package for building command line apps in Go
climax - Climax is an alternative CLI with the human face
kong - Kong is a command-line parser for Go
go-arg - Struct-based argument parsing in Go
pflag - Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
flag - Flag is a simple but powerful command line option parsing library for Go support infinite level subcommand