cobra icon indicating copy to clipboard operation
cobra copied to clipboard

A Commander for modern Go CLI interactions

Results 294 cobra issues
Sort by recently updated
recently updated
newest added

it looks like the parser is having trouble with space delimited persistent flags, where a sub command aligns with the value of the first of many flags: for `./app -z...

kind/bug
area/flags-args

I feel like I'm missing something with autocomplete suggestions. I want it to suggest the names "steve" and "john" (for the command below) but all it does is suggest files...

kind/support

### Description This PR adds minimum token permissions for the GITHUB_TOKEN in GitHub Actions workflows using https://github.com/step-security/secure-workflows. GitHub Actions workflows have a GITHUB_TOKEN with `write` access to multiple scopes. Here...

size/S
area/github

If you use a function to create a new instance of a command to allow testing with different arg inputs without risk of state being preserved between tests, can run...

kind/support
area/flags-args
area/lib

First, spf13/cobra is just brilliant and elegant! Also, it is extremely popular and broadly used. I was inspired by a functionality that exists in [`azure-cli`](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/feedback/custom.py) that automates and makes more...

kind/feature

This test Cobra app, https://github.com/kurtpeek/myCobraApp, illustrates the issue. It was scaffolded using the Cobra generator with the following commands: ``` cobra add serve cobra add config cobra add command cobra...

area/flags-args
triage/needs-info

It looks like the disable ordering feature is not working with commands with persistent flags **only**. But works fine if commands have local flags or both local and persistent flags....

kind/bug
area/flags-args
lifecycle/needs-pr

Hi. It would be nice to allow the user to auto complete flags like `--help, `--version` etc. For example, the `git` completion allows `git --v[TAB]` to auto complete to `git...

kind/bug
area/shell-completion

## Description Add group flags Close https://github.com/spf13/cobra/issues/1327 ## Example main.go ``` package main import ( "fmt" "github.com/spf13/cobra" ) func main() { var output string var rootCmd = &cobra.Command{ Use: "root...

size/L

Using spf13/Cobra for cli flag parsing. root command has a field marked required: ``` rootCmd.PersistentFlags().StringVarP(&configFilePath, "config", "c","", "REQUIRED: config file") rootCmd.MarkPersistentFlagRequired("config") rootCmd.MarkFlagRequired("config") ``` However, cobra does not raise an error...

kind/bug
area/flags-args
triage/needs-triage