Cobra is a library for creating powerful modern CLI applications.
Cobra is used in many Go projects such as Kubernetes, Hugo, and GitHub CLI to name a few.
This is free and open source software.
Key Features
- Hierarchical command interfaces with nested subcommands.
- POSIX-compliant command-line flags with short and long options.
- Local and persistent flags with inheritance across subcommands.
- Suggestions for incorrectly entered command names.
- Automatic generation of command and flag help.
- Grouping of related commands in help output.
- Automatic recognition of help flags.
- Shell completion generation for Bash, Zsh, Fish and PowerShell.
- Automatic generation of manual pages and Markdown documentation.
- Command aliases.
- Customizable help and usage templates.
- Command argument validation.
- Pre-execution and post-execution hooks.
- Optional integration with Viper for application configuration.
Website: github.com/spf13/cobra
Support:
Developer: Steve Francia
License: Apache License 2.0
Cobra is written in Go. Learn Go with our recommended free books and free tutorials.
Related Software
| Go TUI Frameworks | |
|---|---|
| termui | Golang terminal dashboard |
| Bubble Tea | Fun, functional and stateful way to build terminal apps |
| tview | Terminal UI library with rich, interactive widgets |
| gocui | Minimalist Go package aimed at creating Console User Interfaces. |
| Tcell | Low-level Go package for portable terminal screen handling and input |
| PTerm | Go library for styled output, progress displays, and interactive prompts |
| Huh? | Go library for elegant, accessible interactive forms and prompts |
| Cobra | Library for creating powerful modern CLI applications |
| Bubbles | Reusable components for composing polished Bubble Tea applications |
| go-tui | Declarative toolkit for building interactive terminal applications |
| cview | Terminal-based user interface toolkit (fork of tview) |
| gotui | Modern Go library for creating rich interactive terminal interfaces |
| Phoenix | High-performance toolkit for building responsive terminal interfaces |
| Lip Gloss | Style definitions for nice terminal layouts |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.