package cmd import ( "git.db.org.ai/dborg/internal/formatter" "github.com/spf13/cobra" ) var meCmd = &cobra.Command{ Use: "me", Short: "Get account information and usage statistics", Long: `Get your account information, credits, and usage statistics.`, RunE: runMe, } func init() { rootCmd.AddCommand(meCmd) } func runMe(cmd *cobra.Command, args []string) error { c, err := newClient() if err != nil { return err } response, err := c.GetAccountStats() if err != nil { return err } if err := checkError(response.Error); err != nil { return err } output, err := formatter.FormatAccountStats(response, IsJSONOutput()) if err != nil { return err } printOutput(output) return nil }