spf13/cobra
Some data may be outdated — see provenance labels.
A Commander for modern Go CLI interactions observed · 2026-09-29
Health v2 · maintenance only
71/100
- Activity 83
- Release rhythm 40
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 47.0
- age_days: 4795
- days_rel: 321
- days_push: 102
- n_releases_24m: 5
Adoption not part of the score
44666 stars · 4484 forks observed · 2026-09-29
What it is AI-extracted, prompt v1, taxonomy v1, 2026-09-28, confidence 0.99
Cobra is a Go library for building modern command-line applications with subcommands, flags, and automatic help generation. It powers many large projects like Kubernetes, Hugo, and GitHub CLI.
Use cases
- create a multi‑command CLI tool in Go
- add POSIX‑compliant flag parsing to a Go application
- generate shell completions and man pages automatically
- build a hierarchical command structure for a DevOps utility
- integrate configuration management with Viper in a Go CLI
When to choose
- You need a battle‑tested, production‑ready framework for Go CLIs.
- Your application requires nested subcommands, intelligent suggestions, and auto‑generated documentation.
- You want seamless Viper integration for 12‑factor configuration.
When to avoid
- You are not using Go or need a language‑agnostic solution.
- Your CLI is extremely simple and does not need a full framework.
- You prefer a lightweight, zero‑dependency parser without code generation.
Facets
library · maturity active
cli developer-tools go cross-platform cli posix-flags subcommands autocomplete viper-integration go-modules
10 sources
- readme: https://github.com/spf13/cobra · fetched 2026-09-29 · 242afefd8aa2
- homepage: https://cobra.dev · fetched 2026-09-14 · ce890b4a9952
- site_page: https://cobra.dev/docs/explanations/enterprise-guide · fetched 2026-09-14 · 94981417d847
- site_page: https://cobra.dev/docs/how-to-guides/clis-for-llms · fetched 2026-09-14 · 240013d38009
- site_page: https://cobra.dev/docs/tutorials/first-cli · fetched 2026-09-14 · 48bb1c115c8b
- site_page: https://cobra.dev/docs/tutorials/getting-started · fetched 2026-09-14 · b7df3d662190
- site_page: https://cobra.dev/docs/how-to-guides · fetched 2026-09-14 · 51a1d455f3b6
- site_page: https://cobra.dev/docs · fetched 2026-09-14 · 94d2c55406b1
- site_page: https://cobra.dev/docs/how-to-guides/context-and-tracing · fetched 2026-09-14 · 6e16c9c50a4f
- site_page: https://cobra.dev/docs/examples · fetched 2026-09-14 · 1be70ee3c531
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spf13/cobra | main | 71 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem