Files
yutu/cmd/root.go
T
Alex Zamai cced5ed466 📝 Update documentation
tiny fix, so that command is better copy paste-able.

Also, all of the shell commands have ❯  symbol  when copied, which adds a step of editing when running commands, let me know @OpenWaygate  if you allow me to remove those as well.
--credentials  → --credential
2024-11-26 00:45:28 +08:00

34 lines
546 B
Go

package cmd
import (
"os"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var RootCmd = &cobra.Command{
Use: "yutu",
Short: "A fully functional CLI for YouTube",
Long: "yutu is a fully functional CLI for YouTube, which can be used to manipulate YouTube videos, playlists, channels, etc.",
Run: func(cmd *cobra.Command, args []string) {
cmd.Help()
},
}
func Execute() {
err := RootCmd.Execute()
if err != nil {
os.Exit(1)
}
}
func init() {
cobra.OnInitialize(initConfig)
}
func initConfig() {
viper.AutomaticEnv()
}