From 4d33b12fe0e891de6cec3154749edf5ec6812e80 Mon Sep 17 00:00:00 2001 From: David Allen Date: Tue, 19 Aug 2025 21:32:45 -0600 Subject: [PATCH] feat: added 'profile' and 'plugins' flags --- cmd/download.go | 2 ++ cmd/plugin.go | 11 +++++++++++ cmd/root.go | 3 +++ 3 files changed, 16 insertions(+) create mode 100644 cmd/plugin.go diff --git a/cmd/download.go b/cmd/download.go index 1fb211b..5f787df 100644 --- a/cmd/download.go +++ b/cmd/download.go @@ -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) } diff --git a/cmd/plugin.go b/cmd/plugin.go new file mode 100644 index 0000000..bd9c7bd --- /dev/null +++ b/cmd/plugin.go @@ -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) +} diff --git a/cmd/root.go b/cmd/root.go index da93c0c..40ecd25 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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",