Skip to content

Commit 5e64155

Browse files
committed
Parse environment variables
1 parent e04d191 commit 5e64155

Some content is hidden

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

69 files changed

+553
-356
lines changed

cli/state.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ func state() *cobra.Command {
2727
func statePull() *cobra.Command {
2828
var buildNumber int
2929
cmd := &cobra.Command{
30-
Use: "pull <workspace> [file]",
31-
Args: cobra.MinimumNArgs(1),
30+
Use: "pull <workspace> [file]",
31+
Short: "Pull a Terraform state file from a workspace.",
32+
Args: cobra.MinimumNArgs(1),
3233
RunE: func(cmd *cobra.Command, args []string) error {
3334
client, err := CreateClient(cmd)
3435
if err != nil {
@@ -68,8 +69,9 @@ func statePull() *cobra.Command {
6869
func statePush() *cobra.Command {
6970
var buildNumber int
7071
cmd := &cobra.Command{
71-
Use: "push <workspace> <file>",
72-
Args: cobra.ExactArgs(2),
72+
Use: "push <workspace> <file>",
73+
Args: cobra.ExactArgs(2),
74+
Short: "Push a Terraform state file to a workspace.",
7375
RunE: func(cmd *cobra.Command, args []string) error {
7476
client, err := CreateClient(cmd)
7577
if err != nil {

docs/cli.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# coder
33

44

5+
Coder v0.0.0-devel — A tool for provisioning self-hosted development environments with Terraform.
6+
7+
58
## Usage
69
```console
710
coder [flags]
@@ -11,11 +14,11 @@ coder [flags]
1114
```console
1215
- Start a Coder server:
1316

14-
[48;2;43;42;42m [0m[38;2;237;86;121;48;2;43;42;42m$ coder server[0m[48;2;43;42;42m [0m
17+
$ coder server
1518

1619
- Get started by creating a template from an example:
1720

18-
[48;2;43;42;42m [0m[38;2;237;86;121;48;2;43;42;42m$ coder templates init[0m[48;2;43;42;42m [0m
21+
$ coder templates init
1922
```
2023

2124
## Subcommands

docs/cli/coder_agent.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# coder agent
33

44

5+
6+
57
## Usage
68
```console
79
coder agent [flags]

docs/cli/coder_config-ssh.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder config-ssh
33

4+
45
Add an SSH Host entry for your workspaces "ssh coder.workspace"
6+
57
## Usage
68
```console
79
coder config-ssh [flags]
@@ -21,11 +23,10 @@ coder config-ssh [flags]
2123

2224

2325
## Local Flags
24-
| Name | Default | Usage |
25-
| ---- | ------- | ----- |
26-
| --dry-run, -n | false | <code>Perform a trial run with no changes made, showing a diff at the end.</code>|
27-
| --skip-proxy-command | false | <code>Specifies whether the ProxyCommand option should be skipped. Useful for testing.</code>|
28-
| --ssh-config-file | ~/.ssh/config | <code>Specifies the path to an SSH config.<br/>Consumes $CODER_SSH_CONFIG_FILE</code>|
29-
| --ssh-option, -o | [] | <code>Specifies additional SSH options to embed in each host stanza.</code>|
30-
| --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>|
31-
| --yes, -y | false | <code>Bypass prompts</code>|
26+
| Name | Default | Usage | Environment |
27+
| ---- | ------- | ----- | -------- |
28+
| --dry-run, -n |false |<code>Perform a trial run with no changes made, showing a diff at the end.</code> | |
29+
| --ssh-config-file |~/.ssh/config |<code>Specifies the path to an SSH config.</code> | <code>$CODER_SSH_CONFIG_FILE</code> |
30+
| --ssh-option, -o |[] |<code>Specifies additional SSH options to embed in each host stanza.</code> | |
31+
| --use-previous-options |false |<code>Specifies whether or not to keep options from previous run of config-ssh.</code> | <code>$CODER_SSH_USE_PREVIOUS_OPTIONS</code> |
32+
| --yes, -y |false |<code>Bypass prompts</code> | |

docs/cli/coder_create.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder create
33

4+
45
Create a workspace
6+
57
## Usage
68
```console
79
coder create [name] [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --parameter-file | | <code>Specify a file path with parameter values.<br/>Consumes $CODER_PARAMETER_FILE</code>|
15-
| --rich-parameter-file | | <code>Specify a file path with values for rich parameters defined in the template.<br/>Consumes $CODER_RICH_PARAMETER_FILE</code>|
16-
| --start-at | | <code>Specify the workspace autostart schedule. Check `coder schedule start --help` for the syntax.<br/>Consumes $CODER_WORKSPACE_START_AT</code>|
17-
| --stop-after | 8h0m0s | <code>Specify a duration after which the workspace should shut down (e.g. 8h).<br/>Consumes $CODER_WORKSPACE_STOP_AFTER</code>|
18-
| --template, -t | | <code>Specify a template name.<br/>Consumes $CODER_TEMPLATE_NAME</code>|
19-
| --yes, -y | false | <code>Bypass prompts</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --parameter-file | |<code>Specify a file path with parameter values.</code> | <code>$CODER_PARAMETER_FILE</code> |
17+
| --rich-parameter-file | |<code>Specify a file path with values for rich parameters defined in the template.</code> | <code>$CODER_RICH_PARAMETER_FILE</code> |
18+
| --start-at | |<code>Specify the workspace autostart schedule. Check `coder schedule start --help` for the syntax.</code> | <code>$CODER_WORKSPACE_START_AT</code> |
19+
| --stop-after |8h0m0s |<code>Specify a duration after which the workspace should shut down (e.g. 8h).</code> | <code>$CODER_WORKSPACE_STOP_AFTER</code> |
20+
| --template, -t | |<code>Specify a template name.</code> | <code>$CODER_TEMPLATE_NAME</code> |
21+
| --yes, -y |false |<code>Bypass prompts</code> | |

docs/cli/coder_delete.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder delete
33

4+
45
Delete a workspace
6+
57
## Usage
68
```console
79
coder delete <workspace> [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --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>|
15-
| --yes, -y | false | <code>Bypass prompts</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --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> | |
17+
| --yes, -y |false |<code>Bypass prompts</code> | |

docs/cli/coder_dotfiles.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder dotfiles
33

4+
45
Checkout and install a dotfiles repository from a Git URL
6+
57
## Usage
68
```console
79
coder dotfiles [git_repo_url] [flags]
@@ -16,7 +18,7 @@ coder dotfiles [git_repo_url] [flags]
1618

1719

1820
## Local Flags
19-
| Name | Default | Usage |
20-
| ---- | ------- | ----- |
21-
| --symlink-dir | | <code>Specifies the directory for the dotfiles symlink destinations. If empty will use $HOME.<br/>Consumes $CODER_SYMLINK_DIR</code>|
22-
| --yes, -y | false | <code>Bypass prompts</code>|
21+
| Name | Default | Usage | Environment |
22+
| ---- | ------- | ----- | -------- |
23+
| --symlink-dir | |<code>Specifies the directory for the dotfiles symlink destinations. If empty will use $HOME.</code> | <code>$CODER_SYMLINK_DIR</code> |
24+
| --yes, -y |false |<code>Bypass prompts</code> | |

docs/cli/coder_gitssh.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder gitssh
33

4+
45
Wraps the "ssh" command and uses the coder gitssh key for authentication
6+
57
## Usage
68
```console
79
coder gitssh [flags]

docs/cli/coder_list.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder list
33

4+
45
List workspaces
6+
57
## Usage
68
```console
79
coder list [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --all, -a | false | <code>Specifies whether all workspaces will be listed or not.</code>|
15-
| --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>|
16-
| --output, -o | table | <code>Output format. Available formats: table, json</code>|
17-
| --search | owner:me | <code>Search for a workspace with a query.</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --all, -a |false |<code>Specifies whether all workspaces will be listed or not.</code> | |
17+
| --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> | |
18+
| --output, -o |table |<code>Output format. Available formats: table, json</code> | |
19+
| --search |owner:me |<code>Search for a workspace with a query.</code> | |

docs/cli/coder_login.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder login
33

4+
45
Authenticate with Coder deployment
6+
57
## Usage
68
```console
79
coder login <url> [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --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>|
15-
| --first-user-password | | <code>Specifies a password to use if creating the first user for the deployment.<br/>Consumes $CODER_FIRST_USER_PASSWORD</code>|
16-
| --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>|
17-
| --first-user-username | | <code>Specifies a username to use if creating the first user for the deployment.<br/>Consumes $CODER_FIRST_USER_USERNAME</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --first-user-email | |<code>Specifies an email address to use if creating the first user for the deployment.</code> | <code>$CODER_FIRST_USER_EMAIL</code> |
17+
| --first-user-password | |<code>Specifies a password to use if creating the first user for the deployment.</code> | <code>$CODER_FIRST_USER_PASSWORD</code> |
18+
| --first-user-trial |false |<code>Specifies whether a trial license should be provisioned for the Coder deployment or not.</code> | <code>$CODER_FIRST_USER_TRIAL</code> |
19+
| --first-user-username | |<code>Specifies a username to use if creating the first user for the deployment.</code> | <code>$CODER_FIRST_USER_USERNAME</code> |

docs/cli/coder_logout.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder logout
33

4+
45
Unauthenticate your local session
6+
57
## Usage
68
```console
79
coder logout [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --yes, -y | false | <code>Bypass prompts</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --yes, -y |false |<code>Bypass prompts</code> | |

docs/cli/coder_parameters.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder parameters
33

4+
45
List parameters for a given scope
6+
57
## Usage
68
```console
79
coder parameters [flags]

docs/cli/coder_parameters_list.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# coder parameters list
33

44

5+
6+
57
## Usage
68
```console
79
coder parameters list [flags]

docs/cli/coder_ping.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder ping
33

4+
45
Ping a workspace
6+
57
## Usage
68
```console
79
coder ping <workspace> [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --num, -n | 10 | <code>Specifies the number of pings to perform.</code>|
15-
| --timeout, -t | 5s | <code>Specifies how long to wait for a ping to complete.</code>|
16-
| --verbose, -v | false | <code>Enables verbose logging.</code>|
17-
| --wait | 1s | <code>Specifies how long to wait between pings.</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --num, -n |10 |<code>Specifies the number of pings to perform.</code> | |
17+
| --timeout, -t |5s |<code>Specifies how long to wait for a ping to complete.</code> | |
18+
| --verbose, -v |false |<code>Enables verbose logging.</code> | |
19+
| --wait |1s |<code>Specifies how long to wait between pings.</code> | |

docs/cli/coder_port-forward.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder port-forward
33

4+
45
Forward ports from machine to a workspace
6+
57
## Usage
68
```console
79
coder port-forward <workspace> [flags]
@@ -30,7 +32,7 @@ coder port-forward <workspace> [flags]
3032

3133

3234
## Local Flags
33-
| Name | Default | Usage |
34-
| ---- | ------- | ----- |
35-
| --tcp, -p | [] | <code>Forward TCP port(s) from the workspace to the local machine.<br/>Consumes $CODER_PORT_FORWARD_TCP</code>|
36-
| --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>|
35+
| Name | Default | Usage | Environment |
36+
| ---- | ------- | ----- | -------- |
37+
| --tcp, -p |[] |<code>Forward TCP port(s) from the workspace to the local machine.</code> | <code>$CODER_PORT_FORWARD_TCP</code> |
38+
| --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.</code> | <code>$CODER_PORT_FORWARD_UDP</code> |

docs/cli/coder_publickey.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder publickey
33

4+
45
Output your Coder public key used for Git operations
6+
57
## Usage
68
```console
79
coder publickey [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --reset | false | <code>Regenerate your public key. This will require updating the key on any services it's registered with.</code>|
15-
| --yes, -y | false | <code>Bypass prompts</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --reset |false |<code>Regenerate your public key. This will require updating the key on any services it's registered with.</code> | |
17+
| --yes, -y |false |<code>Bypass prompts</code> | |

docs/cli/coder_rename.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder rename
33

4+
45
Rename a workspace
6+
57
## Usage
68
```console
79
coder rename <workspace> <new name> [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --yes, -y | false | <code>Bypass prompts</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --yes, -y |false |<code>Bypass prompts</code> | |

docs/cli/coder_reset-password.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<!-- DO NOT EDIT | GENERATED CONTENT -->
22
# coder reset-password
33

4+
45
Directly connect to the database to reset a user's password
6+
57
## Usage
68
```console
79
coder reset-password <username> [flags]
810
```
911

1012

1113
## Local Flags
12-
| Name | Default | Usage |
13-
| ---- | ------- | ----- |
14-
| --postgres-url | | <code>URL of a PostgreSQL database to connect to.<br/>Consumes $CODER_PG_CONNECTION_URL</code>|
14+
| Name | Default | Usage | Environment |
15+
| ---- | ------- | ----- | -------- |
16+
| --postgres-url | |<code>URL of a PostgreSQL database to connect to.</code> | <code>$CODER_PG_CONNECTION_URL</code> |

0 commit comments

Comments
 (0)