-
Easy subcommand-based CLIs: app server , app fetch , etc. -
Fully POSIX-compliant flags (including short & long versions) -
Nested subcommands -
Global, local and cascading flags -
Intelligent suggestions ( app srver ... did you mean app server ?) -
Automatic help generation for commands and flags -
Grouping help for subcommands -
Automatic help flag recognition of -h , --help , etc. -
Automatically generated shell autocomplete for your application (bash, zsh, fish, powershell) -
Automatically generated man pages for your application -
Command aliases so you can change things without breaking them -
The flexibility to define your own help, usage, etc. -
Optional seamless integration with viper for 12-factor apps
hugo server --port=1313
git clone URL --bare
go get -u github.com/spf13/ cobra@latest
import "github.com/spf13/cobra"
go install github.com/spf13/ cobra-cli@latest