Overview of Cobra features
mainCobra provides a complete suite of features for building modern CLI tools:
- Subcommands: Easy support for nested subcommands (e.g.,
app server). - POSIX-compliant Flags: Supports both short and long versions of flags.
- Flag Scoping: Supports global, local, and cascading (persistent) flags.
- User Experience:
- Intelligent suggestions for typos.
- Automatic help generation and flag recognition (
-h,--help). - Grouped help for subcommands.
- Automation:
- Automatically generated shell autocomplete (bash, zsh, fish, powershell).
- Automatically generated man pages.
- Extensibility:
- Command aliases for backward compatibility.
- Seamless integration with viper for 12-factor applications.