newConfigWizardCmd creates the config wizard command
()
| 9 | |
| 10 | // newConfigWizardCmd creates the config wizard command |
| 11 | func newConfigWizardCmd() *cobra.Command { |
| 12 | cmd := &cobra.Command{ |
| 13 | Use: "config-wizard", |
| 14 | Short: "Launch interactive config wizard", |
| 15 | Long: `Launch an interactive configuration wizard to set up your pvetui configuration. |
| 16 | |
| 17 | This wizard will guide you through creating a configuration file with your |
| 18 | Proxmox server details, authentication credentials, and other settings. |
| 19 | |
| 20 | You can add or edit a specific profile using the --profile flag: |
| 21 | pvetui config-wizard --profile my-profile`, |
| 22 | RunE: runConfigWizard, |
| 23 | } |
| 24 | |
| 25 | cmd.Flags().StringP("profile", "p", "", "Profile to add or edit") |
| 26 | |
| 27 | return cmd |
| 28 | } |
| 29 | |
| 30 | // runConfigWizard executes the config wizard |
| 31 | func runConfigWizard(cmd *cobra.Command, args []string) error { |