Skip to content

feat: rework CLI docs #6312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Correctly exclude hidden commands
  • Loading branch information
ammario committed Feb 23, 2023
commit 2db196363faa33ada4dc2099858dad4403b95ad7
4 changes: 0 additions & 4 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ coder [flags]
## Subcommands
| Name | Purpose |
| ---- | ----- |
| <code>agent</code> | |
| <code>config-ssh</code> | Add an SSH Host entry for your workspaces "ssh coder.workspace" |
| <code>create</code> | Create a workspace |
| <code>delete</code> | Delete a workspace |
| <code>dotfiles</code> | Checkout and install a dotfiles repository from a Git URL |
| <code>gitssh</code> | Wraps the "ssh" command and uses the coder gitssh key for authentication |
| <code>list</code> | List workspaces |
| <code>login</code> | Authenticate with Coder deployment |
| <code>logout</code> | Unauthenticate your local session |
| <code>parameters</code> | List parameters for a given scope |
| <code>ping</code> | Ping a workspace |
| <code>port-forward</code> | Forward ports from machine to a workspace |
| <code>publickey</code> | Output your Coder public key used for Git operations |
Expand All @@ -54,4 +51,3 @@ coder [flags]
| <code>update</code> | Update a workspace |
| <code>users</code> | Manage users |
| <code>version</code> | Show coder version |
| <code>vscodessh</code> | |
19 changes: 0 additions & 19 deletions docs/cli/coder_agent.md

This file was deleted.

55 changes: 47 additions & 8 deletions docs/cli/coder_config-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,50 @@ coder config-ssh [flags]
```


## Local Flags
| Name | Default | Usage | Environment |
| ---- | ------- | ----- | -------- |
| --dry-run, -n |false |<code>Perform a trial run with no changes made, showing a diff at the end.</code> | |
| --ssh-config-file |~/.ssh/config |<code>Specifies the path to an SSH config.</code> | <code>$CODER_SSH_CONFIG_FILE</code> |
| --ssh-option, -o |[] |<code>Specifies additional SSH options to embed in each host stanza.</code> | |
| --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> |
| --yes, -y |false |<code>Bypass prompts</code> | |
## Flags
### --dry-run, -n
Perform a trial run with no changes made, showing a diff at the end.
<br/>
| | |
| --- | --- |
| Default | <code>false</code> |



### --ssh-config-file
Specifies the path to an SSH config.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_SSH_CONFIG_FILE</code> |
| Default | <code>~/.ssh/config</code> |



### --ssh-option, -o
Specifies additional SSH options to embed in each host stanza.
<br/>
| | |
| --- | --- |
| Default | <code>[]</code> |



### --use-previous-options
Specifies whether or not to keep options from previous run of config-ssh.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_SSH_USE_PREVIOUS_OPTIONS</code> |
| Default | <code>false</code> |



### --yes, -y
Bypass prompts
<br/>
| | |
| --- | --- |
| Default | <code>false</code> |


56 changes: 47 additions & 9 deletions docs/cli/coder_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,50 @@ coder create [name] [flags]
```


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

### --rich-parameter-file
Specify a file path with values for rich parameters defined in the template.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_RICH_PARAMETER_FILE</code> |

### --start-at
Specify the workspace autostart schedule. Check `coder schedule start --help` for the syntax.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_WORKSPACE_START_AT</code> |

### --stop-after
Specify a duration after which the workspace should shut down (e.g. 8h).
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_WORKSPACE_STOP_AFTER</code> |
| Default | <code>8h0m0s</code> |



### --template, -t
Specify a template name.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_TEMPLATE_NAME</code> |

### --yes, -y
Bypass prompts
<br/>
| | |
| --- | --- |
| Default | <code>false</code> |


23 changes: 18 additions & 5 deletions docs/cli/coder_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,21 @@ coder delete <workspace> [flags]
```


## Local Flags
| Name | Default | Usage | Environment |
| ---- | ------- | ----- | -------- |
| --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> | |
| --yes, -y |false |<code>Bypass prompts</code> | |
## Flags
### --orphan
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.
<br/>
| | |
| --- | --- |
| Default | <code>false</code> |



### --yes, -y
Bypass prompts
<br/>
| | |
| --- | --- |
| Default | <code>false</code> |


21 changes: 16 additions & 5 deletions docs/cli/coder_dotfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,19 @@ coder dotfiles [git_repo_url] [flags]
```


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

### --yes, -y
Bypass prompts
<br/>
| | |
| --- | --- |
| Default | <code>false</code> |


11 changes: 0 additions & 11 deletions docs/cli/coder_gitssh.md

This file was deleted.

43 changes: 36 additions & 7 deletions docs/cli/coder_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,39 @@ coder list [flags]
```


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



### --column, -c
Columns to display in table output. Available columns: workspace, template, status, last built, outdated, starts at, stops after
<br/>
| | |
| --- | --- |
| Default | <code>[workspace,template,status,last built,outdated,starts at,stops after]</code> |



### --output, -o
Output format. Available formats: table, json
<br/>
| | |
| --- | --- |
| Default | <code>table</code> |



### --search
Search for a workspace with a query.
<br/>
| | |
| --- | --- |
| Default | <code>owner:me</code> |


38 changes: 31 additions & 7 deletions docs/cli/coder_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,34 @@ coder login <url> [flags]
```


## Local Flags
| Name | Default | Usage | Environment |
| ---- | ------- | ----- | -------- |
| --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> |
| --first-user-password | |<code>Specifies a password to use if creating the first user for the deployment.</code> | <code>$CODER_FIRST_USER_PASSWORD</code> |
| --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> |
| --first-user-username | |<code>Specifies a username to use if creating the first user for the deployment.</code> | <code>$CODER_FIRST_USER_USERNAME</code> |
## Flags
### --first-user-email
Specifies an email address to use if creating the first user for the deployment.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_FIRST_USER_EMAIL</code> |

### --first-user-password
Specifies a password to use if creating the first user for the deployment.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_FIRST_USER_PASSWORD</code> |

### --first-user-trial
Specifies whether a trial license should be provisioned for the Coder deployment or not.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_FIRST_USER_TRIAL</code> |
| Default | <code>false</code> |



### --first-user-username
Specifies a username to use if creating the first user for the deployment.
<br/>
| | |
| --- | --- |
| Consumes | <code>$CODER_FIRST_USER_USERNAME</code> |
13 changes: 9 additions & 4 deletions docs/cli/coder_logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ coder logout [flags]
```


## Local Flags
| Name | Default | Usage | Environment |
| ---- | ------- | ----- | -------- |
| --yes, -y |false |<code>Bypass prompts</code> | |
## Flags
### --yes, -y
Bypass prompts
<br/>
| | |
| --- | --- |
| Default | <code>false</code> |


20 changes: 0 additions & 20 deletions docs/cli/coder_parameters.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/cli/coder_parameters_list.md

This file was deleted.

Loading