package cli import ( "fmt" "github.com/charmbracelet/lipgloss" "github.com/spf13/cobra" ) func NewTypesCmd() *cobra.Command { return &cobra.Command{ Use: "types", Short: "List active activity types", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { client, err := RequireClient() if err != nil { return err } d, err := client.GetDay(Today(), TZ()) if err != nil { return err } for _, t := range d.Types { sw := lipgloss.NewStyle().Foreground(lipgloss.Color(t.Color)).Render("●") fmt.Printf("%s %s\n", sw, t.Name) } return nil }, } }