Skip to content

Commit d4dedd9

Browse files
committed
Support flags
1 parent 895b109 commit d4dedd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+694
-143
lines changed

docs/cli.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
# coder
22

3-
## Usage
43

4+
## Usage
55
```console
66
coder
7-
```
7+
```
8+
9+
## Examples
10+
```console
11+
- Start a Coder server:
12+
13+
 $ coder server 
14+
15+
- Get started by creating a template from an example:
16+
17+
 $ coder templates init 
18+
```

docs/cli/coder_agent.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# coder agent
22

3-
## Usage
43

4+
## Usage
55
```console
66
coder agent [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --auth | token | <code>Specify the authentication type to use for the agent.<br/>Consumes $CODER_AGENT_AUTH</code>|
13+
| --log-dir | /tmp | <code>Specify the location for the agent log files.<br/>Consumes $CODER_AGENT_LOG_DIR</code>|
14+
| --no-reap | false | <code>Do not start a process reaper.</code>|
15+
| --pprof-address | 127.0.0.1:6060 | <code>The address to serve pprof.<br/>Consumes $CODER_AGENT_PPROF_ADDRESS</code>|

docs/cli/coder_config-ssh.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
# coder config-ssh
22

3+
Add an SSH Host entry for your workspaces "ssh coder.workspace"
34
## Usage
4-
55
```console
66
coder config-ssh [flags]
7-
```
7+
```
8+
9+
## Examples
10+
```console
11+
- You can use -o (or --ssh-option) so set SSH options to be used for all your
12+
workspaces:
13+
14+
$ coder config-ssh -o ForwardAgent=yes
15+
16+
- You can use --dry-run (or -n) to see the changes that would be made:
17+
18+
$ coder config-ssh --dry-run
19+
```
20+
21+
## Local Flags
22+
| Name | Default | Usage |
23+
| ---- | ------- | ----- |
24+
| --dry-run, -n | false | <code>Perform a trial run with no changes made, showing a diff at the end.</code>|
25+
| --skip-proxy-command | false | <code>Specifies whether the ProxyCommand option should be skipped. Useful for testing.</code>|
26+
| --ssh-config-file | ~/.ssh/config | <code>Specifies the path to an SSH config.<br/>Consumes $CODER_SSH_CONFIG_FILE</code>|
27+
| --ssh-option, -o | [] | <code>Specifies additional SSH options to embed in each host stanza.</code>|
28+
| --use-previous-options | false | <code>Specifies whether or not to keep options from previous run of config-ssh.<br/>Consumes $CODER_SSH_USE_PREVIOUS_OPTIONS</code>|
29+
| --yes, -y | false | <code>Bypass prompts</code>|

docs/cli/coder_create.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# coder create
22

3+
Create a workspace
34
## Usage
4-
55
```console
66
coder create [name] [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --parameter-file | | <code>Specify a file path with parameter values.<br/>Consumes $CODER_PARAMETER_FILE</code>|
13+
| --rich-parameter-file | | <code>Specify a file path with values for rich parameters defined in the template.<br/>Consumes $CODER_RICH_PARAMETER_FILE</code>|
14+
| --start-at | | <code>Specify the workspace autostart schedule. Check `coder schedule start --help` for the syntax.<br/>Consumes $CODER_WORKSPACE_START_AT</code>|
15+
| --stop-after | 8h0m0s | <code>Specify a duration after which the workspace should shut down (e.g. 8h).<br/>Consumes $CODER_WORKSPACE_STOP_AFTER</code>|
16+
| --template, -t | | <code>Specify a template name.<br/>Consumes $CODER_TEMPLATE_NAME</code>|
17+
| --yes, -y | false | <code>Bypass prompts</code>|

docs/cli/coder_delete.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# coder delete
22

3+
Delete a workspace
34
## Usage
4-
55
```console
66
coder delete <workspace> [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --orphan | false | <code>Delete a workspace without deleting its resources. This can delete a<br/>workspace in a broken state, but may also lead to unaccounted cloud resources.</code>|
13+
| --yes, -y | false | <code>Bypass prompts</code>|

docs/cli/coder_dotfiles.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
# coder dotfiles
22

3+
Checkout and install a dotfiles repository from a Git URL
34
## Usage
4-
55
```console
66
coder dotfiles [git_repo_url] [flags]
7-
```
7+
```
8+
9+
## Examples
10+
```console
11+
- Check out and install a dotfiles repository without prompts:
12+
13+
$ coder dotfiles --yes git@github.com:example/dotfiles.git
14+
```
15+
16+
## Local Flags
17+
| Name | Default | Usage |
18+
| ---- | ------- | ----- |
19+
| --symlink-dir | | <code>Specifies the directory for the dotfiles symlink destinations. If empty will use $HOME.<br/>Consumes $CODER_SYMLINK_DIR</code>|
20+
| --yes, -y | false | <code>Bypass prompts</code>|

docs/cli/coder_gitssh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# coder gitssh
22

3+
Wraps the "ssh" command and uses the coder gitssh key for authentication
34
## Usage
4-
55
```console
66
coder gitssh
7-
```
7+
```

docs/cli/coder_list.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# coder list
22

3+
List workspaces
34
## Usage
4-
55
```console
66
coder list [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --all, -a | false | <code>Specifies whether all workspaces will be listed or not.</code>|
13+
| --column, -c | [workspace,template,status,last built,outdated,starts at,stops after] | <code>Columns to display in table output. Available columns: workspace, template, status, last built, outdated, starts at, stops after</code>|
14+
| --output, -o | table | <code>Output format. Available formats: table, json</code>|
15+
| --search | owner:me | <code>Search for a workspace with a query.</code>|

docs/cli/coder_login.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# coder login
22

3+
Authenticate with Coder deployment
34
## Usage
4-
55
```console
66
coder login <url> [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --first-user-email | | <code>Specifies an email address to use if creating the first user for the deployment.<br/>Consumes $CODER_FIRST_USER_EMAIL</code>|
13+
| --first-user-password | | <code>Specifies a password to use if creating the first user for the deployment.<br/>Consumes $CODER_FIRST_USER_PASSWORD</code>|
14+
| --first-user-trial | false | <code>Specifies whether a trial license should be provisioned for the Coder deployment or not.<br/>Consumes $CODER_FIRST_USER_TRIAL</code>|
15+
| --first-user-username | | <code>Specifies a username to use if creating the first user for the deployment.<br/>Consumes $CODER_FIRST_USER_USERNAME</code>|

docs/cli/coder_logout.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# coder logout
22

3+
Unauthenticate your local session
34
## Usage
4-
55
```console
66
coder logout [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --yes, -y | false | <code>Bypass prompts</code>|

docs/cli/coder_parameters.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# coder parameters
22

3+
List parameters for a given scope
34
## Usage
4-
55
```console
66
coder parameters
7-
```
7+
```
8+
9+
## Examples
10+
```console
11+
$ coder parameters list workspace my-workspace
12+
```

docs/cli/coder_parameters_list.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# coder parameters list
22

3-
## Usage
43

4+
## Usage
55
```console
66
coder parameters list [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --column, -c | [name,scope,destination scheme] | <code>Columns to display in table output. Available columns: id, scope, scope id, name, source scheme, destination scheme, created at, updated at</code>|
13+
| --output, -o | table | <code>Output format. Available formats: table, json</code>|

docs/cli/coder_ping.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# coder ping
22

3+
Ping a workspace
34
## Usage
4-
55
```console
66
coder ping <workspace> [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --num, -n | 10 | <code>Specifies the number of pings to perform.</code>|
13+
| --timeout, -t | 5s | <code>Specifies how long to wait for a ping to complete.</code>|
14+
| --verbose, -v | false | <code>Enables verbose logging.</code>|
15+
| --wait | 1s | <code>Specifies how long to wait between pings.</code>|

docs/cli/coder_port-forward.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,34 @@
11
# coder port-forward
22

3+
Forward ports from machine to a workspace
34
## Usage
4-
55
```console
66
coder port-forward <workspace> [flags]
7-
```
7+
```
8+
9+
## Examples
10+
```console
11+
- Port forward a single TCP port from 1234 in the workspace to port 5678 on
12+
your local machine:
13+
14+
$ coder port-forward <workspace> --tcp 5678:1234
15+
16+
- Port forward a single UDP port from port 9000 to port 9000 on your local
17+
machine:
18+
19+
$ coder port-forward <workspace> --udp 9000
20+
21+
- Port forward multiple TCP ports and a UDP port:
22+
23+
$ coder port-forward <workspace> --tcp 8080:8080 --tcp 9000:3000 --udp 5353:53
24+
25+
- Port forward multiple ports (TCP or UDP) in condensed syntax:
26+
27+
$ coder port-forward <workspace> --tcp 8080,9000:3000,9090-9092,10000-10002:10010-10012
28+
```
29+
30+
## Local Flags
31+
| Name | Default | Usage |
32+
| ---- | ------- | ----- |
33+
| --tcp, -p | [] | <code>Forward TCP port(s) from the workspace to the local machine.<br/>Consumes $CODER_PORT_FORWARD_TCP</code>|
34+
| --udp | [] | <code>Forward UDP port(s) from the workspace to the local machine. The UDP connection has TCP-like semantics to support stateful UDP protocols.<br/>Consumes $CODER_PORT_FORWARD_UDP</code>|

docs/cli/coder_publickey.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# coder publickey
22

3+
Output your Coder public key used for Git operations
34
## Usage
4-
55
```console
66
coder publickey [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --reset | false | <code>Regenerate your public key. This will require updating the key on any services it's registered with.</code>|
13+
| --yes, -y | false | <code>Bypass prompts</code>|

docs/cli/coder_rename.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# coder rename
22

3+
Rename a workspace
34
## Usage
4-
55
```console
66
coder rename <workspace> <new name> [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --yes, -y | false | <code>Bypass prompts</code>|

docs/cli/coder_reset-password.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# coder reset-password
22

3+
Directly connect to the database to reset a user's password
34
## Usage
4-
55
```console
66
coder reset-password <username> [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --postgres-url | | <code>URL of a PostgreSQL database to connect to.<br/>Consumes $CODER_PG_CONNECTION_URL</code>|

docs/cli/coder_restart.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# coder restart
22

3+
Restart a workspace
34
## Usage
4-
55
```console
66
coder restart <workspace> [flags]
7-
```
7+
```
8+
9+
## Local Flags
10+
| Name | Default | Usage |
11+
| ---- | ------- | ----- |
12+
| --yes, -y | false | <code>Bypass prompts</code>|

docs/cli/coder_scaletest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# coder scaletest
22

3+
Run a scale test against the Coder API
34
## Usage
4-
55
```console
66
coder scaletest
7-
```
7+
```

0 commit comments

Comments
 (0)