package commands

import (
	"github.com/spf13/cobra"
)

func RootCmd() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "craban",
		Short: "Webapp to play RPG games and manage their assets",
	}

	cmd.CompletionOptions.DisableDefaultCmd = true

	cmd.PersistentFlags().StringP("config", "c", "craban.yml", "path to the configuration file")

	cmd.AddCommand(
		ServeCmd(),
		UserCmd(),
		GameCmd(),
	)

	return cmd
}
