Skip to content

Commit 2cab86b

Browse files
Replace 'workspace' and 'my-app' with 'instance' in CLI help strings and user messages (#240)
- Updated command short descriptions to use 'instance' instead of 'workspace' - Updated command long descriptions and examples to use 'instance' terminology - Replaced 'my-app' examples with 'instance' in shell and open commands - Updated user-facing status messages, error messages, and spinner text - Maintained consistent 'instance' terminology across all CLI help output Files modified: - pkg/cmd/delete/delete.go: Updated error message - pkg/cmd/open/open.go: Updated command description, examples, and status messages - pkg/cmd/recreate/recreate.go: Updated spinner status messages - pkg/cmd/reset/reset.go: Updated spinner status messages - pkg/cmd/shell/shell.go: Updated command description, examples, and error message - pkg/cmd/stop/stop.go: Updated command description, flag description, and error message Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Alec Fong <[email protected]>
1 parent 53896a9 commit 2cab86b

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

pkg/cmd/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func handleAdminUser(err error, deleteStore DeleteStore) error {
8989
if user.GlobalUserType != "Admin" {
9090
return breverrors.WrapAndTrace(err)
9191
}
92-
fmt.Println("attempting to delete a workspace you don't own as admin")
92+
fmt.Println("attempting to delete an instance you don't own as admin")
9393
return nil
9494
}
9595

pkg/cmd/open/open.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const (
3535
)
3636

3737
var (
38-
openLong = "[command in beta] This will open VS Code or Cursor SSH-ed in to your workspace. You must have the editor installed in your path."
39-
openExample = "brev open workspace_id_or_name\nbrev open my-app\nbrev open my-app code\nbrev open my-app cursor\nbrev open --set-default cursor"
38+
openLong = "[command in beta] This will open VS Code or Cursor SSH-ed in to your instance. You must have the editor installed in your path."
39+
openExample = "brev open instance_id_or_name\nbrev open instance\nbrev open instance code\nbrev open instance cursor\nbrev open --set-default cursor"
4040
)
4141

4242
type OpenStore interface {
@@ -62,7 +62,7 @@ func NewCmdOpen(t *terminal.Terminal, store OpenStore, noLoginStartStore OpenSto
6262
Annotations: map[string]string{"ssh": ""},
6363
Use: "open",
6464
DisableFlagsInUseLine: true,
65-
Short: "[beta] open VSCode or Cursor to your workspace",
65+
Short: "[beta] open VSCode or Cursor to your instance",
6666
Long: openLong,
6767
Example: openExample,
6868
Args: cmderrors.TransformToValidationError(func(cmd *cobra.Command, args []string) error {
@@ -267,9 +267,9 @@ func pollUntil(t *terminal.Terminal, wsid string, state string, openStore OpenSt
267267
if err != nil {
268268
return breverrors.WrapAndTrace(err)
269269
}
270-
s.Suffix = " workspace is currently " + strings.ToLower(ws.Status)
270+
s.Suffix = " instance is currently " + strings.ToLower(ws.Status)
271271
if ws.Status == state {
272-
s.Suffix = "Workspace is ready!"
272+
s.Suffix = "Instance is ready!"
273273
s.Stop()
274274
isReady = true
275275
}

pkg/cmd/recreate/recreate.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func hardResetCreateEmptyWorkspace(t *terminal.Terminal, recreateStore recreateS
139139

140140
// ensure name
141141
if len(workspace.Name) == 0 {
142-
return breverrors.NewValidationError("name field is required for empty workspaces")
142+
return breverrors.NewValidationError("name field is required for empty instances")
143143
}
144144

145145
// ensure org
@@ -197,9 +197,9 @@ func pollUntil(t *terminal.Terminal, wsid string, state string, recreateStore re
197197
if err != nil {
198198
return breverrors.WrapAndTrace(err)
199199
}
200-
s.Suffix = " workspace is " + strings.ToLower(ws.Status)
200+
s.Suffix = " instance is " + strings.ToLower(ws.Status)
201201
if ws.Status == state {
202-
s.Suffix = "Workspace is ready!"
202+
s.Suffix = "Instance is ready!"
203203
s.Stop()
204204
isReady = true
205205
}

pkg/cmd/reset/reset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ func pollUntil(t *terminal.Terminal, wsid string, state string, resetStore Reset
206206
if err != nil {
207207
return breverrors.WrapAndTrace(err)
208208
}
209-
s.Suffix = " workspace is " + strings.ToLower(ws.Status)
209+
s.Suffix = " instance is " + strings.ToLower(ws.Status)
210210
if ws.Status == state {
211-
s.Suffix = "Workspace is ready!"
211+
s.Suffix = "Instance is ready!"
212212
s.Stop()
213213
isReady = true
214214
}

pkg/cmd/shell/shell.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import (
2525
)
2626

2727
var (
28-
openLong = "[command in beta] This will shell in to your workspace"
29-
openExample = "brev shell workspace_id_or_name\nbrev shell my-app\nbrev open h9fp5vxwe"
28+
openLong = "[command in beta] This will shell in to your instance"
29+
openExample = "brev shell instance_id_or_name\nbrev shell instance\nbrev open h9fp5vxwe"
3030
)
3131

3232
type ShellStore interface {
@@ -92,7 +92,7 @@ func runShellCommand(t *terminal.Terminal, sstore ShellStore, workspaceNameOrID,
9292
return breverrors.WrapAndTrace(err)
9393
}
9494
if workspace.Status != "RUNNING" {
95-
return breverrors.New("Workspace is not running")
95+
return breverrors.New("Instance is not running")
9696
}
9797

9898
localIdentifier := workspace.GetLocalIdentifier()

pkg/cmd/stop/stop.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func NewCmdStop(t *terminal.Terminal, loginStopStore StopStore, noLoginStopStore
4747
return stopAllWorkspaces(t, loginStopStore)
4848
} else {
4949
if len(args) == 0 {
50-
return breverrors.NewValidationError("please provide a workspace to stop")
50+
return breverrors.NewValidationError("please provide an instance to stop")
5151
}
5252
var allErr error
5353
for _, arg := range args {
@@ -63,7 +63,7 @@ func NewCmdStop(t *terminal.Terminal, loginStopStore StopStore, noLoginStopStore
6363
return nil
6464
},
6565
}
66-
cmd.Flags().BoolVarP(&all, "all", "a", false, "stop all workspaces")
66+
cmd.Flags().BoolVarP(&all, "all", "a", false, "stop all instances")
6767

6868
return cmd
6969
}

0 commit comments

Comments
 (0)