cmdr

cmdr
is a POSIX-compliant, command-line UI (CLI) library in Golang.
It is a getopt-like parser of command-line options,
be compatible with the getopt_long
command line UI, which is an extension of the syntax recommended by POSIX.
We made many enhancements beyond the standard library flag
.
There is a fully-functional Options Store
(configurations) for your
hierarchical configuration dataset too.
The .netCore version Cmdr.Core is available now. And, a cxx version cmdr-cxx
was pre-released just now (Happy Spring Festival 2021).

See the image frames at #1.
See our extras:
and Bonus of #cmdr Series:
News
Features
Features.md
Old README.md: README.old.md
For Developer
For Developer
Import cmdr
With go-modules enabled:
import "github.com/hedzr/cmdr"
About the Docker build
Here is a docker build for cmdr/examples/fluent so that you can run it without go building or downloading the release files:
# from Docker Hub:
$ docker run -it --rm hedzr/cmdr-fluent
$ docker run -it --rm hedzr/cmdr-fluent --help
# from Github Packages (please following the guide of GitHub Packages Site):
$ docker run -it --rm docker.pkg.github.com/hedzr/cmdr/cmdr-fluent
$ docker run -it --rm docker.pkg.github.com/hedzr/cmdr/cmdr-fluent --help
Examples
-
short
simple codes with structured data style.
-
demo
normal demo with external config files.
-
wget-demo
partial-covered for GNU wget
.
-
fluent
demostrates how to define your command-ui with the fluent api style.
-
ffdemo
a demo to show you how to migrate from go flag
smoothly.
-
cmdr-http2
http2 server with daemon supports, graceful shutdown
-
awesome-tool
awesome-tool
is a cli app that fetch the repo stars and generate a markdown summary, accordingly with most of awesome-xxx list in github (such as awesome-go).
See Also the examples index: Examples.md (zh-cn TODO: Examples.zh-cn.md)
Uses
Contrib
Feel free to issue me bug reports and fixes. Many thanks to all contributors.
Thanks to JODL
Thanks to JetBrains for donating product licenses to help develop cmdr 

License
MIT
