{
	m.spinner.UpdateText(message)
}Stop stops the spinner and marks it as finished.
spinner := myApp.CLI.StartSpinner("Loading the batmobile...")
time.Sleep(3 * time.Second)
spinner.Stop()
{
	if !m.finished {
		m.spinner.Stop()
		m.finished = true
	}
}{
	spinner, _ := pterm.DefaultSpinner.Start(message)
	spinner.Sequence = []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}
	return &SpinnerModel{
		spinner: spinner,
		message: message,
	}
}NewCLI sets up the CLI for the application using CLIOptions.
{
	rootCmd := &cobra.Command{
		Use:   options.Use,
		Short: options.Short,
		Long:  options.Long,
	}
	cli := &Command{
		Command: rootCmd,
	}
	cli.addManCommand()
	return cli
}Command is the root command for the application.
StartSpinner starts a spinner with a message.
The spinner can be stopped by calling the Stop method on the returned model.
spinner := myApp.CLI.StartSpinner("Loading the batmobile...")
time.Sleep(3 * time.Second)
spinner.Stop()
{
	model := newSpinnerModel(message)
	return model
}StartProgressBar starts a progress bar with a message and a total
The progress bar is stopped automatically when it reaches the total or
manually by calling the Stop method on the returned model.
progressBar := myApp.CLI.StartProgressBar("Loading the batmobile...", 100)
for i := 0; i < 100; i++ {
	progressBar.Increment(1)
	time.Sleep(50 * time.Millisecond)
}
{
	model := newProgressBarModel()
	model.progressBar, _ = pterm.DefaultProgressbar.WithTotal(total).WithTitle(message).Start()
	return model
}NewCommand returns a new Command with the provided inputs. Alias for
NewCommandRunE.
{
	return NewCommandRunE(use, long, short, runE)
}NewCommandRunE returns a new Command with the provided inputs. The runE function
is used for commands that return an error.
{
	cmd := &cobra.Command{
		Use:   use,
		Short: short,
		Long:  long,
		RunE:  runE,
	}
	return &Command{
		Command:  cmd,
		children: make([]*Command, 0),
	}
}NewCommandRun returns a new Command with the provided inputs. The run function
is used for commands that do not return an error.
{
	cmd := &cobra.Command{
		Use:   use,
		Short: short,
		Long:  long,
		Run:   run,
	}
	return &Command{
		Command:  cmd,
		children: make([]*Command, 0),
	}
}NewCustomCommand returns a Command created from
the provided cobra.Command
{
	return &Command{
		Command:  cmd,
		children: make([]*Command, 0),
	}
}ProgressBarModel represents a progress bar model
UpdateMessage updates the message of the progress bar
{
	m.progressBar.UpdateTitle(message)
}UpdateProgress increments the progress of the progress bar only if it
has not reached the total.
progressBar := myApp.CLI.StartProgressBar("Loading the batmobile...", 100)
progressBar.Increment(50)
{
	if m.progressBar.Total != m.progressBar.Current {
		m.progressBar.Add(progress)
	} else {
		m.Stop()
	}
}Stop stops the progress bar and marks it as finished.
progressBar := myApp.CLI.StartProgressBar("Loading the batmobile...", 100)
progressBar.Increment(50)
progressBar.UpdateMessage("Failed to load the batmobile")
progressBar.Stop()
{
	if !m.finished {
		m.progressBar.Stop()
		m.finished = true
	}
}newProgressBarModel creates a new progress bar model
{
	return &ProgressBarModel{}
}import "fmt"import "github.com/AlecAivazis/survey/v2"import "github.com/pterm/pterm"import "fmt"import "github.com/AlecAivazis/survey/v2"import "fmt"import "github.com/AlecAivazis/survey/v2"import "fmt"import "time"import "github.com/spf13/cobra"import "github.com/vanilla-os/sdk/pkg/v1/cli/types"import "github.com/vanilla-os/sdk/pkg/v1/roff"import "github.com/pterm/pterm"