COBRA(1)

πŸ“¦ version 1.3.0, in ubuntu jammy

✨ COBRA(1) β€” the Cobra Manual ✨

okay bestie, so this is cobra, and it's literally the glow-up tool for your Go CLI dreams πŸ’…


πŸ’– NAME πŸ’–

cobra β€” a generator for Cobra based Applications 🌸


πŸŽ€ SYNOPSIS πŸŽ€

cobra [OPTIONS]

that's it. that's the whole vibe. no subcommands up here, just options, and honestly? iconic. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so. Cobra is a CLI library for Go that empowers applications. yeah, "empowers" β€” that's the actual word, and it's giving main character energy fr fr.

and this thing right here? this application? it's a tool to generate the needed files so you can quickly create a Cobra application. like, scaffolding but make it slay. you run it, it hands you the files, you go build your whole command-line empire. no cap. ✨


🌈 OPTIONS 🌈

every single flag, laid out like a lil friendship bracelet. memorize them, bestie, they're your whole personality now 🫢

  • -a, --author="YOUR NAME" β€” the author name, used for copyright attribution. yes, you have to actually put your name in, "YOUR NAME" is a placeholder, not a suggestion 😭
  • --config="" β€” the config file. and the default is $HOME/.cobra.yaml, so if you don't say anything, that's where it's looking πŸ“
  • -l, --license="" β€” the name of the license for the project. also, you can provide licensetext in the config, so that's a whole option too πŸ’œ
  • -b, --projectbase="" β€” the base project directory. example, verbatim, do not come for me: github.com/spf13/ πŸ“
  • --viper[=true] β€” use Viper for configuration. it takes the [=true] form, so it's lowkey already true unless you say otherwise 🌟

πŸ‘€ SEE ALSO πŸ‘€

go bother these next, they're the rest of the squad:


πŸ’Œ a lil sign-off πŸ’Œ

this page lives at github.com/spf13/cobra and it's dated Dec 2015. ancient. vintage. still eating. periodt πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from