Skip to content

Commit a833765

Browse files
rvvanceRachel Vance
andauthored
Add brev register command for Spark waitlist (#271)
* Add brev register command for Spark waitlist * Fix linting error - remove unused error return from runRegister --------- Co-authored-by: Rachel Vance <[email protected]>
1 parent b888ed1 commit a833765

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

pkg/cmd/cmd.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"github.com/brevdev/brev-cli/pkg/cmd/recreate"
3333
"github.com/brevdev/brev-cli/pkg/cmd/redeem"
3434
"github.com/brevdev/brev-cli/pkg/cmd/refresh"
35+
"github.com/brevdev/brev-cli/pkg/cmd/register"
3536
"github.com/brevdev/brev-cli/pkg/cmd/reset"
3637
"github.com/brevdev/brev-cli/pkg/cmd/runtasks"
3738
"github.com/brevdev/brev-cli/pkg/cmd/scale"
@@ -286,6 +287,7 @@ func createCmdTree(cmd *cobra.Command, t *terminal.Terminal, loginCmdStore *stor
286287
cmd.AddCommand(reset.NewCmdReset(t, loginCmdStore, noLoginCmdStore))
287288
cmd.AddCommand(profile.NewCmdProfile(t, loginCmdStore, noLoginCmdStore))
288289
cmd.AddCommand(refresh.NewCmdRefresh(t, loginCmdStore))
290+
cmd.AddCommand(register.NewCmdRegister(t))
289291
cmd.AddCommand(runtasks.NewCmdRunTasks(t, noLoginCmdStore))
290292
cmd.AddCommand(proxy.NewCmdProxy(t, noLoginCmdStore))
291293
cmd.AddCommand(healthcheck.NewCmdHealthcheck(t, noLoginCmdStore))

pkg/cmd/register/register.go

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Package register provides the brev register command for DGX Spark registration
2+
package register
3+
4+
import (
5+
"github.com/brevdev/brev-cli/pkg/terminal"
6+
7+
"github.com/spf13/cobra"
8+
)
9+
10+
var (
11+
registerLong = `Register your DGX Spark with NVIDIA Brev
12+
13+
Join the waitlist to be among the first to register your DGX Spark
14+
for early access integration with Brev.`
15+
16+
registerExample = ` brev register`
17+
)
18+
19+
func NewCmdRegister(t *terminal.Terminal) *cobra.Command {
20+
cmd := &cobra.Command{
21+
Annotations: map[string]string{"configuration": ""},
22+
Use: "register",
23+
Aliases: []string{"spark"},
24+
DisableFlagsInUseLine: true,
25+
Short: "Register your DGX Spark with Brev",
26+
Long: registerLong,
27+
Example: registerExample,
28+
RunE: func(cmd *cobra.Command, args []string) error {
29+
runRegister(t)
30+
return nil
31+
},
32+
}
33+
34+
return cmd
35+
}
36+
37+
func runRegister(t *terminal.Terminal) {
38+
t.Vprint("\n")
39+
t.Vprint(t.Green("Thanks so much for your interest in registering your DGX Spark with Brev!\n\n"))
40+
t.Vprint("To be on the waitlist for early access to this feature, please fill out this form:\n\n")
41+
t.Vprint(t.Yellow(" 👉 https://forms.gle/RHCHGmZuiMQQ2faA6\n\n"))
42+
t.Vprint("We will reach out to the provided email with updates and instructions on how to register soon (:\n")
43+
t.Vprint("\n")
44+
}

0 commit comments

Comments
 (0)