diff --git a/README.md b/README.md index 46108294..742221ed 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![](https://uohmivykqgnnbiouffke.supabase.co/storage/v1/object/public/landingpage/createdevenv1.svg)](https://console.brev.dev/environment/new?repo=https://github.com/brevdev/brev-cli&instance=2x8) -[Brev.dev](https://brev.dev) makes it easy to develop on remote machines. Use Brev.dev to start a project and share your development environment. +[Brev.dev](https://brev.dev) makes it easy to develop on remote machines. Use Brev.dev to start a project and share your intance. ## Install the cli diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 8fe45444..62bf9872 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -177,7 +177,7 @@ start a workspace using this repo as a base brev start https://github.com/brevdev/brev-cli -n bcli-runner-0 ``` -open a shell in your environment +open a shell in your instance ```sh brev shell bcli-runner-0 diff --git a/flake.nix b/flake.nix index 459e7662..aab55acd 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "golang development environment "; + description = "golang instance "; inputs = { flake-utils.url = "github:numtide/flake-utils"; diff --git a/pkg/cmd/clipboard/clipboard.go b/pkg/cmd/clipboard/clipboard.go index 7eb864d5..38857c81 100644 --- a/pkg/cmd/clipboard/clipboard.go +++ b/pkg/cmd/clipboard/clipboard.go @@ -86,8 +86,8 @@ func SendToClipboard(t *terminal.Terminal, clipboardStore ClipboardStore) *cobra Annotations: map[string]string{"clipboard": ""}, Use: "clipboard", DisableFlagsInUseLine: true, - Short: "Copies clipboard from remote environment to local clipboard", - Long: "Copies clipboard from remote environment to local clipboard", + Short: "Copies clipboard from remote instance to local clipboard", + Long: "Copies clipboard from remote instance to local clipboard", Example: "clipboard", Args: cmderrors.TransformToValidationError(cobra.ExactArgs(0)), ValidArgsFunction: completions.GetAllWorkspaceNameCompletionHandler(clipboardStore, t), diff --git a/pkg/cmd/cmd.go b/pkg/cmd/cmd.go index 1b05cc8f..3bfb3484 100644 --- a/pkg/cmd/cmd.go +++ b/pkg/cmd/cmd.go @@ -125,9 +125,9 @@ func NewBrevCommand() *cobra.Command { //nolint:funlen // define brev command SilenceErrors: true, SilenceUsage: true, Use: "brev", - Short: "brev client for managing dev environments", + Short: "brev client for managing instances", Long: ` - brev client for managing dev environment + brev client for managing instances Find more information at: https://brev.dev`, @@ -413,7 +413,7 @@ Examples: {{- if hasWorkspaceCommands . }} -Dev Environment Commands: +Instance Commands: {{- range workspaceCommands . }} {{rpad .Name .NamePadding }} {{.Short}} {{- end}}{{- end}} diff --git a/pkg/cmd/connect/connect.go b/pkg/cmd/connect/connect.go index 5b5f73f8..dbb26346 100644 --- a/pkg/cmd/connect/connect.go +++ b/pkg/cmd/connect/connect.go @@ -34,7 +34,7 @@ func NewCmdConnect(t *terminal.Terminal, store connectStore) *cobra.Command { } func RunConnect(t *terminal.Terminal, _ []string, _ connectStore) error { - t.Vprintf("Connect the AWS IAM user to create dev environments in your AWS account.\n") + t.Vprintf("Connect the AWS IAM user to create instances in your AWS account.\n") t.Vprintf(t.Yellow("\tFollow the guide here: %s", "https://onboarding.brev.dev/connect-aws\n\n")) // t.Vprintf(t.Yellow("Connect the AWS IAM user to create dev environments in your AWS account.\n\n")) diff --git a/pkg/cmd/create/create.go b/pkg/cmd/create/create.go index 4f40c1b2..59b50979 100644 --- a/pkg/cmd/create/create.go +++ b/pkg/cmd/create/create.go @@ -57,7 +57,7 @@ func NewCmdCreate(t *terminal.Terminal, createStore CreateStore) *cobra.Command InstanceType: gpu, }, createStore) if err != nil { - if strings.Contains(err.Error(), "duplicate environment with name") { + if strings.Contains(err.Error(), "duplicate instance with name") { t.Vprint(t.Yellow("try running:")) t.Vprint(t.Yellow("\tbrev start --name [different name] [repo] # or")) t.Vprint(t.Yellow("\tbrev delete [name]")) @@ -122,7 +122,7 @@ func createEmptyWorkspace(user *entity.User, t *terminal.Terminal, options Creat cwOptions.WithInstanceType(options.InstanceType) } - t.Vprintf("Creating environment %s in org %s\n", t.Green(cwOptions.Name), t.Green(orgID)) + t.Vprintf("Creating instane %s in org %s\n", t.Green(cwOptions.Name), t.Green(orgID)) t.Vprintf("\tname %s\n", t.Green(cwOptions.Name)) if options.InstanceType != "" { t.Vprintf("\tGPU instance %s\n", t.Green(options.InstanceType)) @@ -149,7 +149,7 @@ func createEmptyWorkspace(user *entity.User, t *terminal.Terminal, options Creat } fmt.Print("\n") - t.Vprint(t.Green("Your dev environment is ready!\n")) + t.Vprint(t.Green("Your instance is ready!\n")) displayConnectBreadCrumb(t, w) return nil @@ -175,9 +175,9 @@ func resolveWorkspaceUserOptions(options *store.CreateWorkspacesOptions, user *e } func displayConnectBreadCrumb(t *terminal.Terminal, workspace *entity.Workspace) { - t.Vprintf(t.Green("Connect to the dev environment:\n")) - t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev open %s\t# brev open -> open dev environment in VS Code\n", workspace.Name))) - t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev shell %s\t# brev shell -> ssh into dev environment (shortcut)\n", workspace.Name))) + t.Vprintf(t.Green("Connect to the instance:\n")) + t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev open %s\t# brev open -> open instance in VS Code\n", workspace.Name))) + t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev shell %s\t# brev shell -> ssh into instance (shortcut)\n", workspace.Name))) // t.Vprintf(t.Yellow(fmt.Sprintf("\tssh %s\t# ssh -> ssh directly to dev environment\n", workspace.GetLocalIdentifier()))) } @@ -195,9 +195,9 @@ func pollUntil(t *terminal.Terminal, wsid string, state string, createStore Crea if err != nil { return breverrors.WrapAndTrace(err) } - s.Suffix = " environment is " + strings.ToLower(ws.Status) + s.Suffix = " instance is " + strings.ToLower(ws.Status) if ws.Status == state { - s.Suffix = "Environment is ready!" + s.Suffix = "Instance is ready!" s.Stop() isReady = true } diff --git a/pkg/cmd/delete/delete.go b/pkg/cmd/delete/delete.go index 3cd80eae..8ea95d9a 100644 --- a/pkg/cmd/delete/delete.go +++ b/pkg/cmd/delete/delete.go @@ -32,7 +32,7 @@ func NewCmdDelete(t *terminal.Terminal, loginDeleteStore DeleteStore, noLoginDel Annotations: map[string]string{"workspace": ""}, Use: "delete", DisableFlagsInUseLine: true, - Short: "Delete a Brev dev environment", + Short: "Delete a Brev instance", Long: stripmd.Strip(deleteLong), Example: deleteExample, ValidArgsFunction: completions.GetAllWorkspaceNameCompletionHandler(noLoginDeleteStore, t), @@ -75,7 +75,7 @@ func deleteWorkspace(workspaceName string, t *terminal.Terminal, deleteStore Del return breverrors.WrapAndTrace(err) } - t.Vprintf("Deleting dev environment %s. This can take a few minutes. Run 'brev ls' to check status\n", deletedWorkspace.Name) + t.Vprintf("Deleting instance %s. This can take a few minutes. Run 'brev ls' to check status\n", deletedWorkspace.Name) return nil } diff --git a/pkg/cmd/envsetup/envsetup.go b/pkg/cmd/envsetup/envsetup.go index 73901c73..4bc9f6be 100644 --- a/pkg/cmd/envsetup/envsetup.go +++ b/pkg/cmd/envsetup/envsetup.go @@ -144,7 +144,7 @@ func RunEnvSetup( if err != nil { return breverrors.WrapAndTrace(err) } - fmt.Println("setting up dev environment") + fmt.Println("setting up instance") params, err := store.GetEnvSetupParams(workspaceid) if err != nil { @@ -184,7 +184,7 @@ func RunEnvSetup( return breverrors.WrapAndTrace(err) } - fmt.Println("done setting up dev environment") + fmt.Println("done setting up instance") return nil } diff --git a/pkg/cmd/hello/hello.go b/pkg/cmd/hello/hello.go index 3a7bd3cb..b63ea7a8 100644 --- a/pkg/cmd/hello/hello.go +++ b/pkg/cmd/hello/hello.go @@ -119,8 +119,8 @@ func RunOnboarding(t *terminal.Terminal, user *entity.User, store HelloStore) er s += "\nbtw, text me or call me if you need anything" s += ". My cell is " + t.Yellow("(415) 237-2247") - s += "\n\nBrev is a dev tool for creating and sharing dev environments" - s += "\nRun " + t.Green("brev ls") + " to see your dev environments 👇\n" + s += "\n\nBrev is a dev tool for creating and sharing instances" + s += "\nRun " + t.Green("brev ls") + " to see your instances 👇\n" wg.Add(2) go finishOutput(t, s) diff --git a/pkg/cmd/hello/steps.go b/pkg/cmd/hello/steps.go index bb0380bb..7a7eb4d3 100644 --- a/pkg/cmd/hello/steps.go +++ b/pkg/cmd/hello/steps.go @@ -21,27 +21,27 @@ func GetTextBasedONStatus(status string, t *terminal.Terminal) string { switch status { case "RUNNING": case "DEPLOYING": - s += t.Yellow("Your dev environment is deploying.") - s += "\nPlease wait for it to finish deploying then run " + t.Yellow("brev hello") + " to resume this walk through when your dev env is ready\n" + s += t.Yellow("Your instance is deploying.") + s += "\nPlease wait for it to finish deploying then run " + t.Yellow("brev hello") + " to resume this walk through when your instance is ready\n" case "UNHEALTHY": - s += t.Red("Your dev environment seems stuck. Can you reach out to support?") + s += t.Red("Your instance seems stuck. Can you reach out to support?") s += "\nMessage us " s += "\n\t in discord 👉 " + t.Yellow("https://discord.gg/RpszWaJFRA") s += "\n\t via text or call 👉 " + t.Yellow("(415) 237-2247\n") - s += "\n\nRun " + t.Yellow("brev hello") + " to resume this walk through when your dev env is ready\n" + s += "\n\nRun " + t.Yellow("brev hello") + " to resume this walk through when your instance is ready\n" case "STOPPED": - s += t.Yellow("Your dev environment is stopped.") + s += t.Yellow("Your instance is stopped.") s += "\nRun this in your terminal to start it 👉 " + t.Yellow("brev start %s", DefaultDevEnvName) - s += "\n\nRun " + t.Yellow("brev hello") + " to resume this walk through when your dev env is ready\n" + s += "\n\nRun " + t.Yellow("brev hello") + " to resume this walk through when your instance is ready\n" case "STOPPING": - s += t.Yellow("Your dev environment is stopped.") + s += t.Yellow("Your instance is stopped.") s += "\nRun this in your terminal to start it 👉 " + t.Yellow("brev start %s", DefaultDevEnvName) - s += "\n\nRun " + t.Yellow("brev hello") + " to resume this walk through when your dev env is ready\n" + s += "\n\nRun " + t.Yellow("brev hello") + " to resume this walk through when your instance is ready\n" default: - s += t.Red("Please create a running dev environment for this walk through. ") + s += t.Red("Please create a running instance for this walk through. ") s += "\n\tYou can do that here: " + t.Yellow("https://console.brev.dev/environments/new") - s += "\n\nRun " + t.Yellow("brev hello") + " to resume this walk through when your dev env is ready\n" + s += "\n\nRun " + t.Yellow("brev hello") + " to resume this walk through when your instance is ready\n" } return s } @@ -60,9 +60,9 @@ func GetDevEnvOrStall(t *terminal.Terminal, workspaces []entity.Workspace) *enti } if noneFound { - s := t.Red("Please create a running dev environment for this walk through. ") + s := t.Red("Please create a running instance for this walk through. ") s += "\n\tYou can do that here: " + t.Yellow("https://console.brev.dev/environments/new") - s += "\n\nRun: " + t.Yellow("brev hello") + " to resume this walk through when your dev env is ready\n" + s += "\n\nRun: " + t.Yellow("brev hello") + " to resume this walk through when your instance is ready\n" TypeItToMe(s) return nil } @@ -74,13 +74,13 @@ func GetDevEnvOrStall(t *terminal.Terminal, workspaces []entity.Workspace) *enti } func printLsIntroText(t *terminal.Terminal, _ entity.Workspace) { - s := "\nThe command " + t.Yellow("brev ls") + " shows your dev environments" - s += "\nIf the dev environment is " + t.Green("RUNNING") + ", you can open it." + s := "\nThe command " + t.Yellow("brev ls") + " shows your instances" + s += "\nIf the instance is " + t.Green("RUNNING") + ", you can open it." TypeItToMe(s) } func printBrevShellOnboarding(t *terminal.Terminal, firstWorkspace *entity.Workspace) { - s := "\n\nTry opening a terminal SSHed in your dev environment" + s := "\n\nTry opening a terminal SSHed in your instance" s += "\nIn a new terminal, run " + t.Green("brev shell %s", firstWorkspace.Name) + "\n" TypeItToMe(s) } @@ -95,14 +95,14 @@ func printAskInstallVsCode(t *terminal.Terminal) { } func printBrevOpen(t *terminal.Terminal, firstWorkspace entity.Workspace) { - s := "\n\nTry opening VS Code in your dev environment" + s := "\n\nTry opening VS Code in your instance" s += "\nIn a new terminal, run " + t.Green("brev open %s", firstWorkspace.Name) + "\n" TypeItToMe(s) } func printCompletedOnboarding(t *terminal.Terminal) { - s := "\n\nI think I'm done here. Now you know how to open a dev environment and start coding." - s += "\n\nUse the console " + t.Yellow("(https://console.brev.dev)") + " to create a new dev environment or share it with people" + s := "\n\nI think I'm done here. Now you know how to open an instance and start coding." + s += "\n\nUse the console " + t.Yellow("(https://console.brev.dev)") + " to create a new instance or share it with people" s += "\nand use this CLI to code the way you would normally 🤙" s += "\n\nCheck out the docs at " + t.Yellow("https://brev.dev") + " and let us know if we can help!\n" s += "\n\nIn case you missed it, my cell is " + t.Yellow("(415) 237-2247") + "\n\t-Nader\n" diff --git a/pkg/cmd/login/login.go b/pkg/cmd/login/login.go index 50d1d3f5..09e96c58 100644 --- a/pkg/cmd/login/login.go +++ b/pkg/cmd/login/login.go @@ -108,8 +108,8 @@ func (o LoginOptions) checkIfInWorkspace() error { return breverrors.WrapAndTrace(err) } if workspaceID != "" { - fmt.Println("can not login to dev environment") - return breverrors.NewValidationError("can not login to dev environment") + fmt.Println("can not login to instance") + return breverrors.NewValidationError("can not login to instance") } return nil @@ -378,7 +378,7 @@ func OnboardUserWithEditors(t *terminal.Terminal, _ LoginStore, ide string) (str } } } else { - t.Print("To use " + ide + " for your environment. Use the following command to remote into your machine") + t.Print("To use " + ide + " for your instance. Use the following command to remote into your machine") t.Print(t.Green("Brev Shell")) } return ide, nil @@ -410,18 +410,18 @@ func (o LoginOptions) showBreadCrumbs(t *terminal.Terminal, org *entity.Organiza } if len(allWorkspaces) == 0 { - t.Vprintf(t.Green("create a dev environment:\n")) + t.Vprintf(t.Green("create an instance:\n")) t.Vprintf(t.Yellow("\tbrev start https://github.com/brevdev/hello-react\n")) } if len(userWorkspaces) == 0 && len(allWorkspaces) > 1 { - t.Vprintf(t.Green("list teammates dev environments:\n")) + t.Vprintf(t.Green("list teammates instances:\n")) t.Vprintf(t.Yellow("\tbrev ls --all\n")) - t.Vprintf(t.Green("clone a teammate's dev environment:\n")) + t.Vprintf(t.Green("clone a teammate's instance:\n")) t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev start %s\n", allWorkspaces[0].Name))) } if len(userWorkspaces) > 0 { - t.Vprintf(t.Green("list your dev environments:\n")) + t.Vprintf(t.Green("list your instances:\n")) t.Vprintf(t.Yellow("\tbrev ls\n")) } diff --git a/pkg/cmd/ls/ls.go b/pkg/cmd/ls/ls.go index b57eaa52..28ec8dbb 100644 --- a/pkg/cmd/ls/ls.go +++ b/pkg/cmd/ls/ls.go @@ -40,8 +40,8 @@ func NewCmdLs(t *terminal.Terminal, loginLsStore LsStore, noLoginLsStore LsStore cmd := &cobra.Command{ Annotations: map[string]string{"context": ""}, Use: "ls", - Short: "List dev environments within active org", - Long: "List dev environments within your active org. List all dev environments if no active org is set.", + Short: "List instances within active org", + Long: "List instances within your active org. List all instances if no active org is set.", Example: ` brev ls brev ls orgs @@ -303,12 +303,12 @@ func (ls Ls) ShowUserWorkspaces(org *entity.Organization, otherOrgs []entity.Org func (ls Ls) displayWorkspacesAndHelp(org *entity.Organization, otherOrgs []entity.Organization, userWorkspaces []entity.Workspace, allWorkspaces []entity.Workspace) { if len(userWorkspaces) == 0 { - ls.terminal.Vprint(ls.terminal.Yellow("No dev environments in org %s\n", org.Name)) + ls.terminal.Vprint(ls.terminal.Yellow("No instances in org %s\n", org.Name)) if len(allWorkspaces) > 0 { - ls.terminal.Vprintf(ls.terminal.Green("See teammates' dev environments:\n")) + ls.terminal.Vprintf(ls.terminal.Green("See teammates' instances:\n")) ls.terminal.Vprintf(ls.terminal.Yellow("\tbrev ls --all\n")) } else { - ls.terminal.Vprintf(ls.terminal.Green("Start a new dev environment:\n")) + ls.terminal.Vprintf(ls.terminal.Green("Start a new instance:\n")) ls.terminal.Vprintf(ls.terminal.Yellow("\tbrev start https://github.com/brevdev/hello-react\n")) } if len(otherOrgs) > 1 { @@ -317,7 +317,7 @@ func (ls Ls) displayWorkspacesAndHelp(org *entity.Organization, otherOrgs []enti ls.terminal.Vprintf(ls.terminal.Yellow(fmt.Sprintf("\tbrev set %s\n", getOtherOrg(otherOrgs, *org).Name))) } } else { - ls.terminal.Vprintf("You have %d dev environments in Org "+ls.terminal.Yellow(org.Name)+"\n", len(userWorkspaces)) + ls.terminal.Vprintf("You have %d instances in Org "+ls.terminal.Yellow(org.Name)+"\n", len(userWorkspaces)) displayWorkspacesTable(ls.terminal, userWorkspaces) fmt.Print("\n") @@ -341,10 +341,10 @@ func displayLsConnectBreadCrumb(t *terminal.Terminal, workspaces []entity.Worksp for _, w := range workspaces { if w.Status == entity.Running { foundRunning = true - t.Vprintf(t.Green("Connect to running dev environment:\n")) - t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev open %s\t# brev open -> open dev environment in preferred editor\n", w.Name))) - t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev shell %s\t# brev shell -> ssh into dev environment (shortcut)\n", w.Name))) - t.Vprintf(t.Yellow(fmt.Sprintf("\tssh %s\t# ssh -> ssh directly to dev environment\n", w.GetLocalIdentifier()))) + t.Vprintf(t.Green("Connect to running instance:\n")) + t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev open %s\t# brev open -> open instance in preferred editor\n", w.Name))) + t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev shell %s\t# brev shell -> ssh into instance (shortcut)\n", w.Name))) + t.Vprintf(t.Yellow(fmt.Sprintf("\tssh %s\t# ssh -> ssh directly to instance\n", w.GetLocalIdentifier()))) if enableSSHCol { t.Vprintf(t.Yellow("\tssh ex: ssh %s\n", w.GetLocalIdentifier())) } @@ -352,8 +352,8 @@ func displayLsConnectBreadCrumb(t *terminal.Terminal, workspaces []entity.Worksp } } if !foundRunning && len(workspaces) > 0 { - t.Vprintf(t.Green("Start a stopped dev environment:\n")) - t.Vprintf(t.Yellow("\tbrev start %s # brev start -> start stopped dev environment\n", workspaces[0].Name)) + t.Vprintf(t.Green("Start a stopped instance:\n")) + t.Vprintf(t.Yellow("\tbrev start %s # brev start -> start stopped instance\n", workspaces[0].Name)) } } @@ -362,7 +362,7 @@ func displayLsResetBreadCrumb(t *terminal.Terminal, workspaces []entity.Workspac for _, w := range workspaces { if w.Status == entity.Failure || getWorkspaceDisplayStatus(w) == entity.Unhealthy { if !foundAResettableWorkspace { - t.Vprintf(t.Red("Reset unhealthy or failed dev environment:\n")) + t.Vprintf(t.Red("Reset unhealthy or failed instance:\n")) } t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev reset %s\n", w.Name))) foundAResettableWorkspace = true diff --git a/pkg/cmd/open/open.go b/pkg/cmd/open/open.go index 34353a47..80d5acf7 100644 --- a/pkg/cmd/open/open.go +++ b/pkg/cmd/open/open.go @@ -81,7 +81,7 @@ func NewCmdOpen(t *terminal.Terminal, store OpenStore, noLoginStartStore OpenSto // Fetch workspace info, then open code editor func runOpenCommand(t *terminal.Terminal, tstore OpenStore, wsIDOrName string, setupDoneString string, directory string) error { // todo check if workspace is stopped and start if it if it is stopped - fmt.Println("finding your dev environment...") + fmt.Println("finding your instance...") res := refresh.RunRefreshAsync(tstore) workspace, err := util.GetUserWorkspaceByNameOrIDErr(tstore, wsIDOrName) if err != nil { @@ -163,7 +163,7 @@ func pushOpenAnalytics(tstore OpenStore, workspace *entity.Workspace) error { EventName: "Brev Open", UserID: userID, Properties: map[string]string{ - "environmentId": workspace.ID, + "instanceId": workspace.ID, }, } err = analytics.TrackEvent(data) @@ -196,7 +196,7 @@ func startWorkspaceIfStopped(t *terminal.Terminal, tstore OpenStore, wsIDOrName if err != nil { return breverrors.WrapAndTrace(err) } - t.Vprintf(t.Yellow("Dev environment %s is starting. \n\n", startedWorkspace.Name)) + t.Vprintf(t.Yellow("Instance %s is starting. \n\n", startedWorkspace.Name)) workspace, err = util.GetUserWorkspaceByNameOrIDErr(tstore, wsIDOrName) if err != nil { return breverrors.WrapAndTrace(err) @@ -221,7 +221,7 @@ func openVsCodeWithSSH( } s := t.NewSpinner() s.Start() - s.Suffix = " checking if your environment is ready..." + s.Suffix = " checking if your instance is ready..." err = waitForSSHToBeAvailable(t, s, sshAlias) if err != nil { return breverrors.WrapAndTrace(err) @@ -241,7 +241,7 @@ func openVsCodeWithSSH( return breverrors.WrapAndTrace(err) } } else { - s.Suffix = " Environment is ready. Opening VS Code 🤙" + s.Suffix = " Instance is ready. Opening VS Code 🤙" time.Sleep(1 * time.Second) err = openVsCode(sshAlias, path, tstore) @@ -256,7 +256,7 @@ func openVsCodeWithSSH( func(value bool) (bool, error) { if value { // todo log original error to sentry - return true, errors.New("you are in a remote brev environment; brev open is not supported. Please run brev open locally instead") + return true, errors.New("you are in a remote brev instance; brev open is not supported. Please run brev open locally instead") } return false, breverrors.WrapAndTrace(err) }, @@ -264,7 +264,7 @@ func openVsCodeWithSSH( return false, multierror.Append(err, err2) }, ).Error() - if strings.Contains(err.Error(), "you are in a remote brev environment;") { + if strings.Contains(err.Error(), "you are in a remote brev instance;") { return breverrors.WrapAndTrace(err) } return breverrors.WrapAndTrace(fmt.Errorf(t.Red("couldn't open VSCode, try adding it to PATH (you can do this in VSCode by running CMD-SHIFT-P and typing 'install code in path')\n"))) diff --git a/pkg/cmd/profile/profile.go b/pkg/cmd/profile/profile.go index 46da1b60..030dc76d 100644 --- a/pkg/cmd/profile/profile.go +++ b/pkg/cmd/profile/profile.go @@ -109,6 +109,6 @@ func profile(personalSettingsRepo string, t *terminal.Terminal, profileStore Pro return breverrors.WrapAndTrace(err) } - t.Vprintf("Your personal config has been updated. All new dev environments will run this script.\n") + t.Vprintf("Your personal config has been updated. All new instances will run this script.\n") return nil } diff --git a/pkg/cmd/proxy/proxy.go b/pkg/cmd/proxy/proxy.go index 1a4c008b..784a5bde 100644 --- a/pkg/cmd/proxy/proxy.go +++ b/pkg/cmd/proxy/proxy.go @@ -77,12 +77,12 @@ func makeProxyURL(w *entity.Workspace) string { func CheckWorkspaceCanSSH(workspace *entity.Workspace) error { if !featureflag.DisableSSHProxyVersionCheck() { - fmt.Println("checking dev environment version") + fmt.Println("checking instance version") err := checkWorkspaceInfraVersionOrErr(workspace) if err != nil { return breverrors.WrapAndTrace(err) } - fmt.Println("checking dev environment image version") + fmt.Println("checking instance image version") err = checkWorkspaceImageVersionOrErr(workspace) if err != nil { return breverrors.WrapAndTrace(err) @@ -97,7 +97,7 @@ func CheckWorkspaceCanSSH(workspace *entity.Workspace) error { func checkWorkspaceStatusOrErr(workspace *entity.Workspace) error { if workspace.Status != entity.Running { - return breverrors.NewValidationError(fmt.Sprintf("dev environment is not in RUNNING state, status: %s", workspace.Status)) + return breverrors.NewValidationError(fmt.Sprintf("instance is not in RUNNING state, status: %s", workspace.Status)) } return nil } @@ -122,14 +122,14 @@ func checkWorkspaceImageVersionOrErr(workspace *entity.Workspace) error { } if !imageContraints.Check(wiv) && !strings.HasSuffix(imageSplit[0], allowedWorkspaceImage) { - return breverrors.NewValidationError(fmt.Sprintf("dev environment image version %s is not supported with this cli version\n upgrade your dev environment or downgrade your cli", workspace.WorkspaceTemplate.Image)) + return breverrors.NewValidationError(fmt.Sprintf("instance image version %s is not supported with this cli version\n upgrade your instance or downgrade your cli", workspace.WorkspaceTemplate.Image)) } } return nil } func checkWorkspaceInfraVersionOrErr(workspace *entity.Workspace) error { - fmt.Printf("dev environment version: %s\n", workspace.Version) + fmt.Printf("instance version: %s\n", workspace.Version) if workspace.Version != "" { wv, err := version.NewVersion(workspace.Version) if err != nil { @@ -140,10 +140,10 @@ func checkWorkspaceInfraVersionOrErr(workspace *entity.Workspace) error { return breverrors.WrapAndTrace(err) } if !workspaceInfraConstraints.Check(wv) { - return breverrors.NewValidationError(fmt.Sprintf("dev environment of version %s is not supported with this cli version\n upgrade your dev environment or downgrade your cli. Supported %s", workspace.Version, allowedWorkspaceInfraVersion)) + return breverrors.NewValidationError(fmt.Sprintf("instance of version %s is not supported with this cli version\n upgrade your instance or downgrade your cli. Supported %s", workspace.Version, allowedWorkspaceInfraVersion)) } } else { - fmt.Println("dev environment version blank assuming dev, not checking constraint") + fmt.Println("instance version blank assuming dev, not checking constraint") } return nil } diff --git a/pkg/cmd/recreate/recreate.go b/pkg/cmd/recreate/recreate.go index 0ccba11b..37d15f8e 100644 --- a/pkg/cmd/recreate/recreate.go +++ b/pkg/cmd/recreate/recreate.go @@ -74,7 +74,7 @@ func hardResetProcess(workspaceName string, t *terminal.Terminal, recreateStore return breverrors.WrapAndTrace(err) } - t.Vprint(t.Yellow("Deleting dev environment - %s.", deletedWorkspace.Name)) + t.Vprint(t.Yellow("Deleting instance - %s.", deletedWorkspace.Name)) time.Sleep(10 * time.Second) if len(deletedWorkspace.GitRepo) != 0 { @@ -93,7 +93,7 @@ func hardResetProcess(workspaceName string, t *terminal.Terminal, recreateStore // hardResetCreateWorkspaceFromRepo clone a GIT repository, triggeres from the --hardreset flag func hardResetCreateWorkspaceFromRepo(t *terminal.Terminal, recreateStore recreateStore, workspace *entity.Workspace) error { - t.Vprint(t.Green("Dev environment is starting. ") + t.Yellow("This can take up to 2 minutes the first time.")) + t.Vprint(t.Green("Instance is starting. ") + t.Yellow("This can take up to 2 minutes the first time.")) var orgID string activeorg, err := recreateStore.GetActiveOrganizationOrDefault() if err != nil { @@ -128,14 +128,14 @@ func hardResetCreateWorkspaceFromRepo(t *terminal.Terminal, recreateStore recrea return breverrors.WrapAndTrace(err) } - t.Vprint(t.Green("\nYour dev environment is ready!")) + t.Vprint(t.Green("\nYour instance is ready!")) t.Vprintf(t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier())) return nil } // hardResetCreateEmptyWorkspace creates a new empty worksapce, triggered from the --hardreset flag func hardResetCreateEmptyWorkspace(t *terminal.Terminal, recreateStore recreateStore, workspace *entity.Workspace) error { - t.Vprint(t.Green("Dev environment is starting. ") + t.Yellow("This can take up to 2 minutes the first time.\n")) + t.Vprint(t.Green("Instance is starting. ") + t.Yellow("This can take up to 2 minutes the first time.\n")) // ensure name if len(workspace.Name) == 0 { @@ -177,7 +177,7 @@ func hardResetCreateEmptyWorkspace(t *terminal.Terminal, recreateStore recreateS return breverrors.WrapAndTrace(err) } - t.Vprint(t.Green("\nYour dev environment is ready!")) + t.Vprint(t.Green("\nYour instance is ready!")) t.Vprintf(t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier())) return nil diff --git a/pkg/cmd/reset/reset.go b/pkg/cmd/reset/reset.go index 4e6ed901..5484f416 100644 --- a/pkg/cmd/reset/reset.go +++ b/pkg/cmd/reset/reset.go @@ -42,7 +42,7 @@ func NewCmdReset(t *terminal.Terminal, loginResetStore ResetStore, noLoginResetS Annotations: map[string]string{"workspace": ""}, Use: "reset", DisableFlagsInUseLine: true, - Short: "Reset a dev environment if it's in a weird state.", + Short: "Reset an instance if it's in a weird state.", Long: stripmd.Strip(long), Example: startExample, ValidArgsFunction: completions.GetAllWorkspaceNameCompletionHandler(noLoginResetStore, t), @@ -81,7 +81,7 @@ func hardResetProcess(workspaceName string, t *terminal.Terminal, resetStore Res return breverrors.WrapAndTrace(err) } - t.Vprint(t.Yellow("Deleting dev environment - %s.", deletedWorkspace.Name)) + t.Vprint(t.Yellow("Deleting instance - %s.", deletedWorkspace.Name)) time.Sleep(10 * time.Second) if len(deletedWorkspace.GitRepo) != 0 { @@ -102,7 +102,7 @@ func hardResetProcess(workspaceName string, t *terminal.Terminal, resetStore Res // hardResetCreateWorkspaceFromRepo clone a GIT repository, triggeres from the --hardreset flag func hardResetCreateWorkspaceFromRepo(t *terminal.Terminal, resetStore ResetStore, workspace *entity.Workspace) error { - t.Vprint(t.Green("Dev environment is starting. ") + t.Yellow("This can take up to 2 minutes the first time.")) + t.Vprint(t.Green("Instance is starting. ") + t.Yellow("This can take up to 2 minutes the first time.")) var orgID string activeorg, err := resetStore.GetActiveOrganizationOrDefault() if err != nil { @@ -137,18 +137,18 @@ func hardResetCreateWorkspaceFromRepo(t *terminal.Terminal, resetStore ResetStor return breverrors.WrapAndTrace(err) } - t.Vprint(t.Green("\nYour dev environment is ready!")) + t.Vprint(t.Green("\nYour instance is ready!")) t.Vprintf(t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier())) return nil } // hardResetCreateEmptyWorkspace creates a new empty worksapce, triggered from the --hardreset flag func hardResetCreateEmptyWorkspace(t *terminal.Terminal, resetStore ResetStore, workspace *entity.Workspace) error { - t.Vprint(t.Green("Dev environment is starting. ") + t.Yellow("This can take up to 2 minutes the first time.\n")) + t.Vprint(t.Green("Instance is starting. ") + t.Yellow("This can take up to 2 minutes the first time.\n")) // ensure name if len(workspace.Name) == 0 { - return breverrors.NewValidationError("name field is required for empty dev environments") + return breverrors.NewValidationError("name field is required for empty instances") } // ensure org @@ -186,7 +186,7 @@ func hardResetCreateEmptyWorkspace(t *terminal.Terminal, resetStore ResetStore, return breverrors.WrapAndTrace(err) } - t.Vprint(t.Green("\nYour dev environment is ready!")) + t.Vprint(t.Green("\nYour instance is ready!")) t.Vprintf(t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier())) return nil @@ -245,7 +245,7 @@ func resetWorkspace(workspaceName string, t *terminal.Terminal, resetStore Reset return breverrors.WrapAndTrace(err) } - t.Vprintf(t.Yellow("Dev environment %s is resetting.\n", startedWorkspace.Name)) + t.Vprintf(t.Yellow("Instance %s is resetting.\n", startedWorkspace.Name)) t.Vprintf("Note: this can take a few seconds. Run 'brev ls' to check status\n") return nil diff --git a/pkg/cmd/runtasks/runtasks.go b/pkg/cmd/runtasks/runtasks.go index 19a1ef57..90e79cad 100644 --- a/pkg/cmd/runtasks/runtasks.go +++ b/pkg/cmd/runtasks/runtasks.go @@ -39,7 +39,7 @@ func NewCmdRunTasks(t *terminal.Terminal, store RunTasksStore) *cobra.Command { } cmd.Flags().BoolVarP(&detached, "detached", "d", false, "run the command in the background instead of blocking the shell") - cmd.Flags().BoolVarP(&runRemoteCMD, "run-remote-cmd", "r", true, "run the command on the environment to cd into ws default dir") + cmd.Flags().BoolVarP(&runRemoteCMD, "run-remote-cmd", "r", true, "run the command on the instance to cd into ws default dir") return cmd } diff --git a/pkg/cmd/scale/scale.go b/pkg/cmd/scale/scale.go index bd248227..6e14c4fe 100644 --- a/pkg/cmd/scale/scale.go +++ b/pkg/cmd/scale/scale.go @@ -13,10 +13,10 @@ import ( ) var ( - long = "Scale your Brev environment to get a more powerful machine or save costs" + long = "Scale your Brev instance to get a more powerful machine or save costs" example = ` - brev scale MyDevEnvironment --gpu p3.2xlarge - brev scale MyDevEnvironment --cpu 2x8 + brev scale MyInstance --gpu p3.2xlarge + brev scale MyInstance --cpu 2x8 ` // TODO: we might wanna use the below for validation ¯\_(ツ)_/¯ // instanceTypes = []string{"p4d.24xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "g5.xlarge", "g5.2xlarge", "g5.4xlarge", "g5.8xlarge", "g5.16xlarge", "g5.12xlarge", "g5.24xlarge", "g5.48xlarge", "g5g.xlarge", "g5g.2xlarge", "g5g.4xlarge", "g5g.8xlarge", "g5g.16xlarge", "g5g.metal", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.16xlarge", "g4dn.12xlarge", "g4dn.metal", "g4ad.xlarge", "g4ad.2xlarge", "g4ad.4xlarge", "g4ad.8xlarge", "g4ad.16xlarge", "g3s.xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge"} @@ -35,7 +35,7 @@ func NewCmdScale(t *terminal.Terminal, sstore ScaleStore) *cobra.Command { cmd := &cobra.Command{ Use: "scale", DisableFlagsInUseLine: true, - Short: "Scale your Brev environment", + Short: "Scale your Brev instance", Long: long, Example: example, RunE: func(cmd *cobra.Command, args []string) error { @@ -91,11 +91,11 @@ func Runscale(t *terminal.Terminal, args []string, gpu string, cpu string, sstor // fmt.Printf("workspace group %s\n", result.WorkspaceGroupID) if gpu != "" { - t.Vprintf("\n\nEnvironment %s scaled to %s 🤙\n", t.Green(ws.Name), t.Green(ws.InstanceType)) + t.Vprintf("\n\nInstance %s scaled to %s 🤙\n", t.Green(ws.Name), t.Green(ws.InstanceType)) } else if cpu != "" { - t.Vprintf("\n\nEnvironment %s scaled to %s 🤙\n", t.Green(ws.Name), t.Green(ws.WorkspaceClassID)) + t.Vprintf("\n\nInstance %s scaled to %s 🤙\n", t.Green(ws.Name), t.Green(ws.WorkspaceClassID)) } - t.Vprintf("\n%s", t.Yellow("Your environment might still be rebooting. Check the status with `brev ls`\n")) + t.Vprintf("\n%s", t.Yellow("Your instance might still be rebooting. Check the status with `brev ls`\n")) return nil } diff --git a/pkg/cmd/secret/secret.go b/pkg/cmd/secret/secret.go index 88aeddff..11357242 100644 --- a/pkg/cmd/secret/secret.go +++ b/pkg/cmd/secret/secret.go @@ -31,7 +31,7 @@ func NewCmdSecret(secretStore SecretStore, t *terminal.Terminal) *cobra.Command Annotations: map[string]string{"housekeeping": ""}, Use: "secret", Short: "Add a secret/environment variable", - Long: "Add a secret/environment variable to your dev environment, all dev environment in an org, or all of your dev environment", + Long: "Add a secret/environment variable to your instance, all instances in an org, or all of your instances", Example: ` brev secret --name my_value --value my_value --type [file, variable] --file-path --scope [org, user] brev secret --name SERVER_URL --value https://brev.sh --type variable --scope [org, user] diff --git a/pkg/cmd/set/set.go b/pkg/cmd/set/set.go index d539226c..73bd02b6 100644 --- a/pkg/cmd/set/set.go +++ b/pkg/cmd/set/set.go @@ -28,7 +28,7 @@ func NewCmdSet(t *terminal.Terminal, loginSetStore SetStore, noLoginSetStore Set Annotations: map[string]string{"context": ""}, Use: "set", Short: "Set active org (helps with completion)", - Long: "Set your organization to view, open, create dev environments etc", + Long: "Set your organization to view, open, create instances etc", Example: `brev set `, Args: cmderrors.TransformToValidationError(cobra.MinimumNArgs(1)), ValidArgsFunction: completions.GetOrgsNameCompletionHandler(noLoginSetStore, t), diff --git a/pkg/cmd/setupworkspace/setupworkspace.go b/pkg/cmd/setupworkspace/setupworkspace.go index 6bd189d3..cc7dc9de 100644 --- a/pkg/cmd/setupworkspace/setupworkspace.go +++ b/pkg/cmd/setupworkspace/setupworkspace.go @@ -33,7 +33,7 @@ func NewCmdSetupWorkspace(store SetupWorkspaceStore) *cobra.Command { if err != nil { return breverrors.WrapAndTrace(err) } - fmt.Println("setting up dev environment") + fmt.Println("setting up instance") params, err := store.GetSetupParams() if err != nil { @@ -59,7 +59,7 @@ func NewCmdSetupWorkspace(store SetupWorkspaceStore) *cobra.Command { if err != nil { return breverrors.WrapAndTrace(err) } - fmt.Println("done setting up dev environment") + fmt.Println("done setting up instance") return nil }, } diff --git a/pkg/cmd/shell/shell.go b/pkg/cmd/shell/shell.go index a81b974e..09c691c8 100644 --- a/pkg/cmd/shell/shell.go +++ b/pkg/cmd/shell/shell.go @@ -47,7 +47,7 @@ func NewCmdShell(t *terminal.Terminal, store ShellStore, noLoginStartStore Shell Annotations: map[string]string{"ssh": ""}, Use: "shell", DisableFlagsInUseLine: true, - Short: "[beta] open a shell in your dev environment", + Short: "[beta] open a shell in your instance", Long: openLong, Example: openExample, Args: cmderrors.TransformToValidationError(cmderrors.TransformToValidationError(cobra.ExactArgs(1))), @@ -122,7 +122,7 @@ func runShellCommand(t *terminal.Terminal, sstore ShellStore, workspaceNameOrID, EventName: "Brev Open", UserID: userID, Properties: map[string]string{ - "environmentId": workspace.ID, + "instanceId": workspace.ID, }, } _ = analytics.TrackEvent(data) @@ -189,7 +189,7 @@ func startWorkspaceIfStopped(t *terminal.Terminal, s *spinner.Spinner, tstore Sh if err != nil { return breverrors.WrapAndTrace(err) } - t.Vprintf(t.Yellow("Dev environment %s is starting. \n\n", startedWorkspace.Name)) + t.Vprintf(t.Yellow("Instance %s is starting. \n\n", startedWorkspace.Name)) err = pollUntil(s, workspace.ID, entity.Running, tstore, " hang tight 🤙") if err != nil { return breverrors.WrapAndTrace(err) diff --git a/pkg/cmd/sshall/sshall.go b/pkg/cmd/sshall/sshall.go index b203cde0..9f61d5a2 100644 --- a/pkg/cmd/sshall/sshall.go +++ b/pkg/cmd/sshall/sshall.go @@ -135,7 +135,7 @@ func (s SSHAll) Run() error { }() if len(s.workspaces) == 0 { - fmt.Println("No dev environments in org") + fmt.Println("No instances in org") return nil } diff --git a/pkg/cmd/sshkeys/sshkeys.go b/pkg/cmd/sshkeys/sshkeys.go index 0cfcdf78..de79d8eb 100644 --- a/pkg/cmd/sshkeys/sshkeys.go +++ b/pkg/cmd/sshkeys/sshkeys.go @@ -49,6 +49,6 @@ func DisplaySSHKeys(t *terminal.Terminal, publicKey string) { t.Eprintf(t.Yellow("Copy 👆 and add it to your git provider:\n")) t.Eprintf(t.Yellow("\tGithub: https://github.com/settings/keys\n")) t.Eprintf(t.Yellow("\tGitlab: https://gitlab.com/-/profile/keys\n")) - t.Eprintf(t.Yellow("Check authentication by starting a new dev environment\n")) + t.Eprintf(t.Yellow("Check authentication by starting a new instance\n")) t.Eprintf(t.Yellow("\tbrev start --empty --name test-ssh && brev delete test-ssh\n")) } diff --git a/pkg/cmd/start/start.go b/pkg/cmd/start/start.go index 4436f774..c108b001 100644 --- a/pkg/cmd/start/start.go +++ b/pkg/cmd/start/start.go @@ -69,7 +69,7 @@ func NewCmdStart(t *terminal.Terminal, startStore StartStore, noLoginStartStore Annotations: map[string]string{"workspace": ""}, Use: "start", DisableFlagsInUseLine: true, - Short: "Start a dev environment if it's stopped, or create one from url", + Short: "Start an instance if it's stopped, or create one from url", Long: startLong, Example: startExample, ValidArgsFunction: completions.GetAllWorkspaceNameCompletionHandler(noLoginStartStore, t), @@ -99,7 +99,7 @@ func NewCmdStart(t *terminal.Terminal, startStore StartStore, noLoginStartStore InstanceType: gpu, }, startStore) if err != nil { - if strings.Contains(err.Error(), "duplicate environment with name") { + if strings.Contains(err.Error(), "duplicate instance with name") { t.Vprint(t.Yellow("try running:")) t.Vprint(t.Yellow("\tbrev start --name [different name] [repo] # or")) t.Vprint(t.Yellow("\tbrev delete [name]")) @@ -207,14 +207,14 @@ func maybeStartStoppedOrJoin(t *terminal.Terminal, user *entity.User, options St if len(userWorkspaces) > 1 { userWorkspaces = store.FilterNonFailedWorkspaces(userWorkspaces) if len(userWorkspaces) > 1 { - breverrors.NewValidationError(fmt.Sprintf("multiple dev environments found with id/name %s", options.RepoOrPathOrNameOrID)) + breverrors.NewValidationError(fmt.Sprintf("multiple instances found with id/name %s", options.RepoOrPathOrNameOrID)) } if len(userWorkspaces) == 0 { breverrors.NewValidationError(fmt.Sprintf("workspace with id/name %s is a failed workspace", options.RepoOrPathOrNameOrID)) } } if allutil.DoesPathExist(options.RepoOrPathOrNameOrID) { - t.Print(t.Yellow(fmt.Sprintf("Warning: local path found and dev environment name/id found %s. Using dev environment name/id. If you meant to specify a local path change directory and try again.", options.RepoOrPathOrNameOrID))) + t.Print(t.Yellow(fmt.Sprintf("Warning: local path found and instance name/id found %s. Using instance name/id. If you meant to specify a local path change directory and try again.", options.RepoOrPathOrNameOrID))) } err := startStopppedWorkspace(&userWorkspaces[0], startStore, t, options) if err != nil { @@ -363,7 +363,7 @@ func createEmptyWorkspace(user *entity.User, t *terminal.Terminal, options Start cwOptions.WithInstanceType(options.InstanceType) } - t.Vprintf("Creating environment %s in org %s\n", t.Green(cwOptions.Name), t.Green(orgID)) + t.Vprintf("Creating instance %s in org %s\n", t.Green(cwOptions.Name), t.Green(orgID)) t.Vprintf("\tname %s\n", t.Green(cwOptions.Name)) if options.InstanceType != "" { t.Vprintf("\tGPU instance %s\n", t.Green(options.InstanceType)) @@ -390,7 +390,7 @@ func createEmptyWorkspace(user *entity.User, t *terminal.Terminal, options Start } fmt.Print("\n") - t.Vprint(t.Green("Your dev environment is ready!\n")) + t.Vprint(t.Green("Your instance is ready!\n")) displayConnectBreadCrumb(t, w) return nil @@ -417,14 +417,14 @@ func resolveWorkspaceUserOptions(options *store.CreateWorkspacesOptions, user *e func startStopppedWorkspace(workspace *entity.Workspace, startStore StartStore, t *terminal.Terminal, startOptions StartOptions) error { if workspace.Status != entity.Stopped { - return breverrors.NewValidationError(fmt.Sprintf("Dev environment is not stopped status=%s", workspace.Status)) + return breverrors.NewValidationError(fmt.Sprintf("Instance is not stopped status=%s", workspace.Status)) } if startOptions.WorkspaceClass != "" { - return breverrors.NewValidationError("Dev environment already exists. Can not pass dev environment class flag to start stopped dev environment") + return breverrors.NewValidationError("Instance already exists. Can not pass instance class flag to start stopped instance") } if startOptions.Name != "" { - t.Vprint("Existing dev environment found. Name flag ignored.") + t.Vprint("Existing instance found. Name flag ignored.") } startedWorkspace, err := startStore.StartWorkspace(workspace.ID) @@ -432,7 +432,7 @@ func startStopppedWorkspace(workspace *entity.Workspace, startStore StartStore, return breverrors.WrapAndTrace(err) } - t.Vprintf(t.Yellow("Dev environment %s is starting. \nNote: this can take about a minute. Run 'brev ls' to check status\n\n", startedWorkspace.Name)) + t.Vprintf(t.Yellow("Instance %s is starting. \nNote: this can take about a minute. Run 'brev ls' to check status\n\n", startedWorkspace.Name)) // Don't poll and block the shell if detached flag is set if startOptions.Detached { @@ -445,7 +445,7 @@ func startStopppedWorkspace(workspace *entity.Workspace, startStore StartStore, } fmt.Print("\n") - t.Vprint(t.Green("Your dev environment is ready!\n")) + t.Vprint(t.Green("Your instance is ready!\n")) displayConnectBreadCrumb(t, startedWorkspace) return nil @@ -469,7 +469,7 @@ func joinProjectWithNewWorkspace(t *terminal.Terminal, templateWorkspace entity. cwOptions = resolveWorkspaceUserOptions(cwOptions, user) - t.Vprintf("Creating environment %s in org %s\n", t.Green(cwOptions.Name), t.Green(orgID)) + t.Vprintf("Creating instance %s in org %s\n", t.Green(cwOptions.Name), t.Green(orgID)) t.Vprintf("\tname %s\n", cwOptions.Name) if cwOptions.InstanceType != "" { t.Vprintf("\tGPU instance %s\n", cwOptions.InstanceType) @@ -636,7 +636,7 @@ func createWorkspace(user *entity.User, t *terminal.Terminal, workspace NewWorks options.WithInstanceType(startOptions.InstanceType) } - t.Vprintf("Creating environment %s in org %s\n", t.Green(workspace.Name), t.Green(orgID)) + t.Vprintf("Creating instance %s in org %s\n", t.Green(workspace.Name), t.Green(orgID)) t.Vprintf("\tname %s\n", workspace.Name) if options.InstanceType != "" { t.Vprintf("\tGPU instance %s\n", options.InstanceType) @@ -659,7 +659,7 @@ func createWorkspace(user *entity.User, t *terminal.Terminal, workspace NewWorks return breverrors.WrapAndTrace(err) } fmt.Print("\n") - t.Vprint(t.Green("Your dev environment is ready!\n")) + t.Vprint(t.Green("Your instance is ready!\n")) displayConnectBreadCrumb(t, w) @@ -667,10 +667,10 @@ func createWorkspace(user *entity.User, t *terminal.Terminal, workspace NewWorks } func displayConnectBreadCrumb(t *terminal.Terminal, workspace *entity.Workspace) { - t.Vprintf(t.Green("Connect to the dev environment:\n")) - t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev open %s\t# brev open -> open dev environment in VS Code\n", workspace.Name))) - t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev shell %s\t# brev shell -> ssh into dev environment (shortcut)\n", workspace.Name))) - // t.Vprintf(t.Yellow(fmt.Sprintf("\tssh %s\t# ssh -> ssh directly to dev environment\n", workspace.GetLocalIdentifier()))) + t.Vprintf(t.Green("Connect to the instance:\n")) + t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev open %s\t# brev open -> open instance in VS Code\n", workspace.Name))) + t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev shell %s\t# brev shell -> ssh into instance (shortcut)\n", workspace.Name))) + // t.Vprintf(t.Yellow(fmt.Sprintf("\tssh %s\t# ssh -> ssh directly to instance\n", workspace.GetLocalIdentifier()))) } func pollUntil(t *terminal.Terminal, wsid string, state string, startStore StartStore, canSafelyExit bool) error { @@ -687,9 +687,9 @@ func pollUntil(t *terminal.Terminal, wsid string, state string, startStore Start if err != nil { return breverrors.WrapAndTrace(err) } - s.Suffix = " environment is " + strings.ToLower(ws.Status) + s.Suffix = " instance is " + strings.ToLower(ws.Status) if ws.Status == state { - s.Suffix = "Environment is ready!" + s.Suffix = "Instance is ready!" s.Stop() isReady = true } diff --git a/pkg/cmd/status/status.go b/pkg/cmd/status/status.go index 2f95a2f6..a05a5986 100644 --- a/pkg/cmd/status/status.go +++ b/pkg/cmd/status/status.go @@ -55,7 +55,7 @@ func runShowStatus(t *terminal.Terminal, statusStore StatusStore) { return } - t.Vprintf("\nYou're on environment %s", t.Yellow(ws.Name)) + t.Vprintf("\nYou're on instance %s", t.Yellow(ws.Name)) t.Vprintf("\n\tID: %s", t.Yellow(ws.ID)) t.Vprintf("\n\tMachine: %s", t.Yellow(util.GetInstanceString(*ws))) } diff --git a/pkg/cmd/stop/stop.go b/pkg/cmd/stop/stop.go index 48f5f766..e08ce1a1 100644 --- a/pkg/cmd/stop/stop.go +++ b/pkg/cmd/stop/stop.go @@ -37,7 +37,7 @@ func NewCmdStop(t *terminal.Terminal, loginStopStore StopStore, noLoginStopStore Annotations: map[string]string{"workspace": ""}, Use: "stop", DisableFlagsInUseLine: true, - Short: "Stop a dev environment if it's running", + Short: "Stop an instance if it's running", Long: stopLong, Example: stopExample, // Args: cmderrors.TransformToValidationError(cobra.ExactArgs()), @@ -81,7 +81,7 @@ func stopAllWorkspaces(t *terminal.Terminal, stopStore StopStore) error { if err != nil { return breverrors.WrapAndTrace(err) } - t.Vprintf("Turning off all of your dev environments") + t.Vprintf("Turning off all of your instances") for _, v := range workspaces { if v.Status == entity.Running { _, err = stopStore.StopWorkspace(v.ID) @@ -117,7 +117,7 @@ func stopWorkspace(workspaceName string, t *terminal.Terminal, stopStore StopSto return breverrors.WrapAndTrace(err3) } else { if user.GlobalUserType == entity.Admin { - fmt.Println("admin trying to stop any dev environment") + fmt.Println("admin trying to stop any instance") workspace, err = util.GetAnyWorkspaceByIDOrNameInActiveOrgErr(stopStore, workspaceName) if err != nil { return breverrors.WrapAndTrace(err) @@ -135,10 +135,10 @@ func stopWorkspace(workspaceName string, t *terminal.Terminal, stopStore StopSto return breverrors.WrapAndTrace(err) } else { if workspaceName == "self" { - t.Vprintf(t.Green("Stopping this dev environment\n") + + t.Vprintf(t.Green("Stopping this instance\n") + "Note: this can take a few seconds. Run 'brev ls' to check status\n") } else { - t.Vprintf(t.Green("Stopping dev environment "+workspaceName+".\n") + + t.Vprintf(t.Green("Stopping instance "+workspaceName+".\n") + "Note: this can take a few seconds. Run 'brev ls' to check status\n") } } diff --git a/pkg/cmd/util/util.go b/pkg/cmd/util/util.go index 9aae5468..d235f620 100644 --- a/pkg/cmd/util/util.go +++ b/pkg/cmd/util/util.go @@ -31,15 +31,15 @@ func GetUserWorkspaceByNameOrIDErr(storeQ GetWorkspaceByNameOrIDErrStore, worksp workspaces = store.FilterForUserWorkspaces(workspaces, user.ID) if len(workspaces) == 0 { - return nil, breverrors.NewValidationError(fmt.Sprintf("dev environment with id/name %s not found", workspaceNameOrID)) + return nil, breverrors.NewValidationError(fmt.Sprintf("instance with id/name %s not found", workspaceNameOrID)) } if len(workspaces) > 1 { workspaces = store.FilterNonFailedWorkspaces(workspaces) if len(workspaces) == 0 { - return nil, breverrors.NewValidationError(fmt.Sprintf("dev environment with id/name %s is a failed workspace", workspaceNameOrID)) + return nil, breverrors.NewValidationError(fmt.Sprintf("instance with id/name %s is a failed workspace", workspaceNameOrID)) } if len(workspaces) > 1 { - return nil, breverrors.NewValidationError(fmt.Sprintf("multiple dev environments found with id/name %s", workspaceNameOrID)) + return nil, breverrors.NewValidationError(fmt.Sprintf("multiple instances found with id/name %s", workspaceNameOrID)) } } return &workspaces[0], nil @@ -56,15 +56,15 @@ func GetAnyWorkspaceByIDOrNameInActiveOrgErr(storeQ GetWorkspaceByNameOrIDErrSto } if len(workspaces) == 0 { - return nil, breverrors.NewValidationError(fmt.Sprintf("dev environment with id/name %s not found", workspaceNameOrID)) + return nil, breverrors.NewValidationError(fmt.Sprintf("instance with id/name %s not found", workspaceNameOrID)) } if len(workspaces) > 1 { workspaces = store.FilterNonFailedWorkspaces(workspaces) if len(workspaces) == 0 { - return nil, breverrors.NewValidationError(fmt.Sprintf("dev environment with id/name %s is a failed workspace", workspaceNameOrID)) + return nil, breverrors.NewValidationError(fmt.Sprintf("instance with id/name %s is a failed workspace", workspaceNameOrID)) } if len(workspaces) > 1 { - return nil, breverrors.NewValidationError(fmt.Sprintf("multiple dev environments found with id/name %s", workspaceNameOrID)) + return nil, breverrors.NewValidationError(fmt.Sprintf("multiple instances found with id/name %s", workspaceNameOrID)) } } return &workspaces[0], nil