Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit a42c757

Browse files
committed
Rename envs sub-command to ws
Aliases are `envs` and `workspaces`.
1 parent 4161a09 commit a42c757

27 files changed

+110
-90
lines changed

ci/integration/integration_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ func TestCoderCLI(t *testing.T) {
5353

5454
headlessLogin(ctx, t, c)
5555

56-
c.Run(ctx, "coder envs").Assert(t,
56+
c.Run(ctx, "coder ws").Assert(t,
5757
tcli.Success(),
5858
)
5959

60-
c.Run(ctx, "coder envs ls").Assert(t,
60+
c.Run(ctx, "coder ws ls").Assert(t,
6161
tcli.Success(),
6262
)
6363

64-
c.Run(ctx, "coder envs ls -o json").Assert(t,
64+
c.Run(ctx, "coder ws ls -o json").Assert(t,
6565
tcli.Success(),
6666
)
6767

@@ -93,7 +93,7 @@ func TestCoderCLI(t *testing.T) {
9393
tcli.Success(),
9494
)
9595

96-
c.Run(ctx, "coder envs ls").Assert(t,
96+
c.Run(ctx, "coder ws ls").Assert(t,
9797
tcli.Error(),
9898
)
9999

ci/integration/ssh_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestSSH(t *testing.T) {
1515

1616
// TODO remove this once we can create a workspace if there aren't any
1717
var workspaces []coder.Workspace
18-
c.Run(ctx, "coder envs ls --output json").Assert(t,
18+
c.Run(ctx, "coder ws ls --output json").Assert(t,
1919
tcli.Success(),
2020
tcli.StdoutJSONUnmarshal(&workspaces),
2121
)

ci/integration/statictokens_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ func TestStaticAuth(t *testing.T) {
3535

3636
// make requests with token environment variable authentication
3737
cmd := exec.CommandContext(ctx, "sh", "-c",
38-
fmt.Sprintf("export CODER_URL=%s && export CODER_TOKEN=$(cat) && coder envs ls", os.Getenv("CODER_URL")),
38+
fmt.Sprintf("export CODER_URL=%s && export CODER_TOKEN=$(cat) && coder ws ls", os.Getenv("CODER_URL")),
3939
)
4040
cmd.Stdin = strings.NewReader(string(result.Stdout))
4141
c.RunCmd(cmd).Assert(t,
4242
tcli.Success(),
4343
)
4444

4545
// should error when the environment variables aren't set
46-
c.Run(ctx, "coder envs ls").Assert(t,
46+
c.Run(ctx, "coder ws ls").Assert(t,
4747
tcli.Error(),
4848
)
4949
})

docs/coder.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ coder provides a CLI for working with an existing Coder installation
1313

1414
* [coder completion](coder_completion.md) - Generate completion script
1515
* [coder config-ssh](coder_config-ssh.md) - Configure SSH to access Coder workspaces
16-
* [coder envs](coder_envs.md) - Interact with Coder workspaces
1716
* [coder images](coder_images.md) - Manage Coder images
1817
* [coder login](coder_login.md) - Authenticate this client for future operations
1918
* [coder logout](coder_logout.md) - Remove local authentication credentials if any exist
@@ -22,3 +21,5 @@ coder provides a CLI for working with an existing Coder installation
2221
* [coder tokens](coder_tokens.md) - manage Coder API tokens for the active user
2322
* [coder urls](coder_urls.md) - Interact with workspace DevURLs
2423
* [coder users](coder_users.md) - Interact with Coder user accounts
24+
* [coder ws](coder_ws.md) - Interact with Coder workspaces
25+

docs/coder_completion.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ MacOS:
6767
### SEE ALSO
6868

6969
* [coder](coder.md) - coder provides a CLI for working with an existing Coder installation
70+

docs/coder_config-ssh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ coder config-ssh [flags]
2828
### SEE ALSO
2929

3030
* [coder](coder.md) - coder provides a CLI for working with an existing Coder installation
31+

docs/coder_envs.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## coder envs
1+
## coder ws
22

33
Interact with Coder workspaces
44

@@ -9,7 +9,7 @@ Perform operations on the Coder workspaces owned by the active user.
99
### Options
1010

1111
```
12-
-h, --help help for workspaces
12+
-h, --help help for ws
1313
```
1414

1515
### Options inherited from parent commands
@@ -21,11 +21,12 @@ Perform operations on the Coder workspaces owned by the active user.
2121
### SEE ALSO
2222

2323
* [coder](coder.md) - coder provides a CLI for working with an existing Coder installation
24-
* [coder envs create](coder_envs_create.md) - create a new workspace.
25-
* [coder envs create-from-config](coder_envs_create-from-config.md) - create a new workspace from a template
26-
* [coder envs edit](coder_envs_edit.md) - edit an existing workspace and initiate a rebuild.
27-
* [coder envs ls](coder_envs_ls.md) - list all workspaces owned by the active user
28-
* [coder envs rebuild](coder_envs_rebuild.md) - rebuild a Coder workspace
29-
* [coder envs rm](coder_envs_rm.md) - remove Coder workspaces by name
30-
* [coder envs stop](coder_envs_stop.md) - stop Coder workspaces by name
31-
* [coder envs watch-build](coder_envs_watch-build.md) - trail the build log of a Coder workspace
24+
* [coder ws create](coder_ws_create.md) - create a new workspace.
25+
* [coder ws create-from-config](coder_ws_create-from-config.md) - create a new workspace from a template
26+
* [coder ws edit](coder_ws_edit.md) - edit an existing workspace and initiate a rebuild.
27+
* [coder ws ls](coder_ws_ls.md) - list all workspaces owned by the active user
28+
* [coder ws rebuild](coder_ws_rebuild.md) - rebuild a Coder workspace
29+
* [coder ws rm](coder_ws_rm.md) - remove Coder workspaces by name
30+
* [coder ws stop](coder_ws_stop.md) - stop Coder workspaces by name
31+
* [coder ws watch-build](coder_ws_watch-build.md) - trail the build log of a Coder workspace
32+

docs/coder_envs_create-from-config.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## coder envs create-from-config
1+
## coder ws create-from-config
22

33
create a new workspace from a template
44

@@ -7,15 +7,15 @@ create a new workspace from a template
77
Create a new Coder workspace using a Workspaces As Code template.
88

99
```
10-
coder envs create-from-config [flags]
10+
coder ws create-from-config [flags]
1111
```
1212

1313
### Examples
1414

1515
```
1616
# create a new workspace from git repository
17-
coder envs create-from-config --name="dev-workspace" --repo-url https://github.com/cdr/m --ref my-branch
18-
coder envs create-from-config --name="dev-workspace" -f coder.yaml
17+
coder ws create-from-config --name="dev-workspace" --repo-url https://github.com/cdr/m --ref my-branch
18+
coder ws create-from-config --name="dev-workspace" -f coder.yaml
1919
```
2020

2121
### Options
@@ -39,4 +39,5 @@ coder envs create-from-config --name="dev-workspace" -f coder.yaml
3939

4040
### SEE ALSO
4141

42-
* [coder envs](coder_envs.md) - Interact with Coder workspaces
42+
* [coder ws](coder_ws.md) - Interact with Coder workspaces
43+

docs/coder_envs_create.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## coder envs create
1+
## coder ws create
22

33
create a new workspace.
44

@@ -7,15 +7,15 @@ create a new workspace.
77
Create a new Coder workspace.
88

99
```
10-
coder envs create [workspace_name] [flags]
10+
coder ws create [workspace_name] [flags]
1111
```
1212

1313
### Examples
1414

1515
```
1616
# create a new workspace using default resource amounts
17-
coder envs create my-new-workspace --image ubuntu
18-
coder envs create my-new-powerful-workspace --cpu 12 --disk 100 --memory 16 --image ubuntu
17+
coder ws create my-new-workspace --image ubuntu
18+
coder ws create my-new-powerful-workspace --cpu 12 --disk 100 --memory 16 --image ubuntu
1919
```
2020

2121
### Options
@@ -43,4 +43,5 @@ coder envs create my-new-powerful-workspace --cpu 12 --disk 100 --memory 16 --im
4343

4444
### SEE ALSO
4545

46-
* [coder envs](coder_envs.md) - Interact with Coder workspaces
46+
* [coder ws](coder_ws.md) - Interact with Coder workspaces
47+

docs/coder_envs_edit.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## coder envs edit
1+
## coder ws edit
22

33
edit an existing workspace and initiate a rebuild.
44

@@ -7,15 +7,15 @@ edit an existing workspace and initiate a rebuild.
77
Edit an existing workspace and initate a rebuild.
88

99
```
10-
coder envs edit [flags]
10+
coder ws edit [flags]
1111
```
1212

1313
### Examples
1414

1515
```
16-
coder envs edit back-end-workspace --cpu 4
16+
coder ws edit back-end-workspace --cpu 4
1717
18-
coder envs edit back-end-workspace --disk 20
18+
coder ws edit back-end-workspace --disk 20
1919
```
2020

2121
### Options
@@ -42,4 +42,5 @@ coder envs edit back-end-workspace --disk 20
4242

4343
### SEE ALSO
4444

45-
* [coder envs](coder_envs.md) - Interact with Coder workspaces
45+
* [coder ws](coder_ws.md) - Interact with Coder workspaces
46+

0 commit comments

Comments
 (0)