cobra-cli-add1
Add a command to a cobra application
Usage
cobra add
[COMMAND
NAME]
[OPTIONS]
Overview
Add (cobra-cli add) will create a new command, with a license and the appropriate structure for a Cobra-based CLI application, and register it to its parent (default RootCmd).
If you want your command to be public, pass in the command name with an initial uppercase letter.
Example: cobra-cli add server -> resulting in a new cmd/server.go
Aliases
add, command
Options
-
-h, --help -
help for add
-
-p, --parent string -
variable name of parent command for this command (default “rootCmd”)
Options inherited from parent command
|
author name for copyright attribution (default “YOUR NAME”) |
|---|---|
|
config file (default is $HOME/.cobra.yaml) |
|
name of license for the project |
|
Use Viper for configuration |
Releases
Unchanged in 2 releases since Debian 12 (Bookworm).