diff --git a/pkg/cmd/cmd.go b/pkg/cmd/cmd.go index 30d418511..2980b0ce6 100644 --- a/pkg/cmd/cmd.go +++ b/pkg/cmd/cmd.go @@ -32,6 +32,7 @@ import ( "github.com/brevdev/brev-cli/pkg/cmd/recreate" "github.com/brevdev/brev-cli/pkg/cmd/redeem" "github.com/brevdev/brev-cli/pkg/cmd/refresh" + "github.com/brevdev/brev-cli/pkg/cmd/register" "github.com/brevdev/brev-cli/pkg/cmd/reset" "github.com/brevdev/brev-cli/pkg/cmd/runtasks" "github.com/brevdev/brev-cli/pkg/cmd/scale" @@ -286,6 +287,7 @@ func createCmdTree(cmd *cobra.Command, t *terminal.Terminal, loginCmdStore *stor cmd.AddCommand(reset.NewCmdReset(t, loginCmdStore, noLoginCmdStore)) cmd.AddCommand(profile.NewCmdProfile(t, loginCmdStore, noLoginCmdStore)) cmd.AddCommand(refresh.NewCmdRefresh(t, loginCmdStore)) + cmd.AddCommand(register.NewCmdRegister(t)) cmd.AddCommand(runtasks.NewCmdRunTasks(t, noLoginCmdStore)) cmd.AddCommand(proxy.NewCmdProxy(t, noLoginCmdStore)) cmd.AddCommand(healthcheck.NewCmdHealthcheck(t, noLoginCmdStore)) diff --git a/pkg/cmd/register/register.go b/pkg/cmd/register/register.go new file mode 100644 index 000000000..1c16586bc --- /dev/null +++ b/pkg/cmd/register/register.go @@ -0,0 +1,44 @@ +// Package register provides the brev register command for DGX Spark registration +package register + +import ( + "github.com/brevdev/brev-cli/pkg/terminal" + + "github.com/spf13/cobra" +) + +var ( + registerLong = `Register your DGX Spark with NVIDIA Brev + +Join the waitlist to be among the first to register your DGX Spark +for early access integration with Brev.` + + registerExample = ` brev register` +) + +func NewCmdRegister(t *terminal.Terminal) *cobra.Command { + cmd := &cobra.Command{ + Annotations: map[string]string{"configuration": ""}, + Use: "register", + Aliases: []string{"spark"}, + DisableFlagsInUseLine: true, + Short: "Register your DGX Spark with Brev", + Long: registerLong, + Example: registerExample, + RunE: func(cmd *cobra.Command, args []string) error { + runRegister(t) + return nil + }, + } + + return cmd +} + +func runRegister(t *terminal.Terminal) { + t.Vprint("\n") + t.Vprint(t.Green("Thanks so much for your interest in registering your DGX Spark with Brev!\n\n")) + t.Vprint("To be on the waitlist for early access to this feature, please fill out this form:\n\n") + t.Vprint(t.Yellow(" 👉 https://forms.gle/RHCHGmZuiMQQ2faA6\n\n")) + t.Vprint("We will reach out to the provided email with updates and instructions on how to register soon (:\n") + t.Vprint("\n") +}