package cmd import ( "fmt" "os" "git.db.org.ai/dborg/internal/utils" "github.com/spf13/cobra" ) var ( jsonOutput bool ) var rootCmd = &cobra.Command{ Use: "dborg", Short: "DB.org.ai CLI client", Long: `█▀▀▄ █▀▀▄ █▀▀█ █▀▀█ █▀▀▀ █▀▀█ ▀█▀ █░░█░█▀▀▄░░░█░░█░█▄▄▀░█░▀█░░░█▄▄█░░█ ▀▀▀▀ ▀▀▀▀ ▀ ▀▀▀▀ ▀ ▀ ▀▀▀▀ ▀ ▀ ▀ ▀▀▀ DB.org.ai CLI client`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { return utils.CheckForUpdates(cmd) }, } func Execute() { if err := rootCmd.Execute(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } func init() { rootCmd.PersistentFlags().BoolVarP(&jsonOutput, "json", "j", false, "Output raw JSON instead of formatted text") } func IsJSONOutput() bool { return jsonOutput }