github.com/supabase/cli@v1.168.1/cmd/start.go (about) 1 package cmd 2 3 import ( 4 "strings" 5 6 "github.com/spf13/afero" 7 "github.com/spf13/cobra" 8 "github.com/supabase/cli/internal/start" 9 ) 10 11 var ( 12 allowedContainers = start.ExcludableContainers() 13 excludedContainers []string 14 ignoreHealthCheck bool 15 preview bool 16 17 startCmd = &cobra.Command{ 18 GroupID: groupLocalDev, 19 Use: "start", 20 Short: "Start containers for Supabase local development", 21 RunE: func(cmd *cobra.Command, args []string) error { 22 return start.Run(cmd.Context(), afero.NewOsFs(), excludedContainers, ignoreHealthCheck) 23 }, 24 } 25 ) 26 27 func init() { 28 flags := startCmd.Flags() 29 names := strings.Join(allowedContainers, ",") 30 flags.StringSliceVarP(&excludedContainers, "exclude", "x", []string{}, "Names of containers to not start. ["+names+"]") 31 flags.BoolVar(&ignoreHealthCheck, "ignore-health-check", false, "Ignore unhealthy services and exit 0") 32 flags.BoolVar(&preview, "preview", false, "Connect to feature preview branch") 33 cobra.CheckErr(flags.MarkHidden("preview")) 34 rootCmd.AddCommand(startCmd) 35 }