feat: added 'profile' and 'plugins' flags

This commit is contained in:
David Allen 2025-08-19 21:32:45 -06:00
parent 97fa0a1062
commit 4d33b12fe0
Signed by: towk
GPG key ID: 0430CDBE22619155
3 changed files with 16 additions and 0 deletions

View file

@ -84,6 +84,8 @@ func init() {
downloadCmd.Flags().StringVar(&host, "host", "http://localhost:5050", "Set the configurator remote host (can be set with CONFIGURATOR_HOST)")
downloadCmd.Flags().StringVarP(&path, "path", "p", ".", "Set the path to list files (can be set with CONFIGURATOR_PATH)")
downloadCmd.Flags().StringVarP(&outputPath, "output", "o", "", "Set the output path to write files")
downloadCmd.Flags().StringVar(&profile, "profile", "", "Set the profile to use to populate data store")
downloadCmd.Flags().StringSliceVar(&plugins, "plugins", []string{}, "Set the plugins to run before downloading files")
rootCmd.AddCommand(&downloadCmd)
}

11
cmd/plugin.go Normal file
View file

@ -0,0 +1,11 @@
package cmd
import "github.com/spf13/cobra"
var pluginCmd = &cobra.Command{}
var pluginCompileCmd = &cobra.Command{}
func init() {
rootCmd.AddCommand(pluginCmd, pluginCompileCmd)
}

View file

@ -17,8 +17,11 @@ var (
outputPath string
rootPath string
logLevel string
profile string
plugins []string
timeout int
)
var rootCmd = cobra.Command{
Use: "configurator",
Short: "Extensible configuration builder to download files",