=========================================
cavctl 2025/05/22
=========================================

config file
-----------
   ~/.cavaliba/cavctl.yaml

   url: http://localhost:8000/api/
   client_id: key1
   client_secret: xxxxxxxxx
   timeout: 20000
   ssl_skipverify: true

Precedence
----------
   --url xxxxx                       CLI flag
   CAVALIBA_CAVCTL_PORT=xxxx         env
   cavctl.yaml port:xxxx             config file
   default (xxxx)                    sensible default


Global Flags
-------------
   --config myconfig.yaml
   -v,--verbose
   --timeout
   --url http://127.0.0.1:8000/api/
   --client_id XXX
   --client_secret XXX
   --ssl_skipverify





commands
--------

cavctl                displays cavctl version
cavctl ping           check connectivity to remote cavaliba server (no authentication required)
cavctl version        call and display cavaliba version
cavctl info
cavctl schema
cavctl asset
cavctl user
cavctl import --file XXX


roadmap/future
--------------
cavctl search
cavctl group
cavctl role
cavctl sirene
cavctl ipam
cavctl status
cavctl log



general cmd 
-----------

   // infoCmd represents the info command
   var infoCmd = &cobra.Command{
      Use:   "info",
      Short: "Display General information about a Cavaliba instance",
      Long:  ``,
      Run: func(cmd *cobra.Command, args []string) {

         // port := viper.GetInt("port")

         // if port < 1 || port > 65535 {
         // 	fmt.Fprintf(os.Stderr, "Error: port must be between 1 and 65535\n")
         // 	os.Exit(1)
         // }

         fmt.Printf("Info")
      },
   }

   func init() {
      rootCmd.AddCommand(infoCmd)

      // Here you will define your flags and configuration settings.

      // Cobra supports Persistent Flags which will work for this command
      // and all subcommands, e.g.:
      // infoCmd.PersistentFlags().String("foo", "", "A help for foo")

      // Cobra supports local flags which will only run when this command
      // is called directly, e.g.:
      // infoCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")

      //infoCmd.Flags().Int("port", 443, "Cavaliba port (default 443)")
   }





Revisions
---------

v1.2.1 - 2025/11/30  - added ping command ; api under /api/
v1.2.0 - 2025/08/22  - config cavctl.yaml, prefix CAVALIBA_CAVCTL
v1.1.0 - 2025/08/22  - ssl_skipverify, error display
v1.0.0 - 2025/08/19  - version
