Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CustomHelpTemplate = `🚀 ` + tui.BaseTextStyle.Render(internalVersion.AppName) + ` - Build AI Applications Faster (version ` + tui.InfoStyle.Render(internalVersion.Version) + `) {{with (or .Long .Short)}}{{. | trimTrailingWhitespaces}} {{end}}{{if or .Runnable .HasSubCommands}}` + tui.BaseTextStyle.Render("Usage:") + `{{if .Runnable}} {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}} {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}} ` + tui.BaseTextStyle.Render("Aliases:") + ` {{.NameAndAliases}}{{end}}{{if .HasExample}} ` + tui.BaseTextStyle.Render("Examples:") + ` {{.Example}}{{end}}{{if .HasAvailableSubCommands}}{{$cmds := .Commands}}{{if eq (len .Groups) 0}} ` + tui.BaseTextStyle.Render("Available Commands:") + `{{range $cmds}}{{if (or .IsAvailableCommand (eq .Name "help"))}} {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{else}}{{range $group := .Groups}} {{.Title}}{{range $cmds}}{{if (and (eq .GroupID $group.ID) (or .IsAvailableCommand (eq .Name "help")))}} ` + tui.SetAnsiForegroundColor(tui.DrPurpleLight) + `{{rpad .Name .NamePadding }}` + tui.ResetForegroundColor() + ` {{.Short}}{{end}}{{end}}{{end}}{{if not .AllChildCommandsHaveGroup}} ` + tui.BaseTextStyle.Render("Additional Commands:") + `{{range $cmds}}{{if (and (eq .GroupID "") (or .IsAvailableCommand (eq .Name "help")))}} ` + tui.SetAnsiForegroundColor(tui.DrPurpleLight) + `{{rpad .Name .NamePadding }}` + tui.ResetForegroundColor() + ` {{.Short}}{{end}}{{end}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}} ` + tui.BaseTextStyle.Render("Flags:") + ` {{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}} ` + tui.BaseTextStyle.Render("Global Flags:") + ` {{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}} ` + tui.BaseTextStyle.Render("Additional help topics:") + `{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}} {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}} Use "{{.CommandPath}} [command] --help" for more information about a command.{{end}}{{end}} `
View Source
var RootCmd = &cobra.Command{ Use: internalVersion.CliName, Short: "🚀 " + internalVersion.AppName + " - Build AI Applications Faster", Long: ` The DataRobot CLI helps you quickly set up, configure, and deploy AI applications using pre-built templates. Get from idea to production in minutes, not hours. ✨ ` + tui.BaseTextStyle.Render("What you can do:") + ` • Choose from ready-made AI application templates • Set up your development environment quickly • Deploy to DataRobot with a single command • Manage environment variables and configurations 🎯 ` + tui.BaseTextStyle.Render("Quick Start:") + ` dr templates setup # Interactive setup wizard dr run dev # Start development server dr --help # Show all available commands 💡 ` + tui.BaseTextStyle.Render("New to DataRobot CLI?") + ` Run 'dr templates setup' to get started!`, PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { return initializeConfig(cmd) }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
func Execute ¶
func Execute() error
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ExecuteContext ¶ added in v0.1.5
ExecuteContext executes the root command with the given context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.