feat(cli): add shell completions (#14341)

This commit is contained in:
Ethan
2024-08-20 14:47:46 +10:00
committed by GitHub
parent 6f9b3c1592
commit 0b2ba96065
80 changed files with 510 additions and 418 deletions
+1
View File
@@ -25,6 +25,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr
| Name | Purpose |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [<code>completion</code>](./completion.md) | Install or update shell completion scripts for the detected or chosen shell. |
| [<code>dotfiles</code>](./dotfiles.md) | Personalize your workspace by applying a canonical dotfiles repository |
| [<code>external-auth</code>](./external-auth.md) | Manage external authentication |
| [<code>login</code>](./login.md) | Authenticate with Coder deployment |
+29
View File
@@ -0,0 +1,29 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# completion
Install or update shell completion scripts for the detected or chosen shell.
## Usage
```console
coder completion [flags]
```
## Options
### -s, --shell
| | |
| ---- | ---------------------------------------- |
| Type | <code>bash\|fish\|zsh\|powershell</code> |
The shell to install completion for.
### -p, --print
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Print the completion script instead of installing it.
+1 -1
View File
@@ -84,7 +84,7 @@ Override the default host prefix.
| | |
| ----------- | ---------------------------------- |
| Type | <code>enum[yes\|no\|auto]</code> |
| Type | <code>yes\|no\|auto</code> |
| Environment | <code>$CODER_CONFIGSSH_WAIT</code> |
| Default | <code>auto</code> |
+10 -10
View File
@@ -16,18 +16,18 @@ coder features list [flags]
### -c, --column
| | |
| ------- | -------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>Name,Entitlement,Enabled,Limit,Actual</code> |
| | |
| ------- | -------------------------------------------------------- |
| Type | <code>[name\|entitlement\|enabled\|limit\|actual]</code> |
| Default | <code>name,entitlement,enabled,limit,actual</code> |
Specify a column to filter in the table. Available columns are: Name, Entitlement, Enabled, Limit, Actual.
Specify columns to filter in the table.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats are: table, json.
Output format.
+10 -10
View File
@@ -14,21 +14,21 @@ coder groups list [flags]
### -c, --column
| | |
| ------- | ----------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>name,display name,organization id,members,avatar url</code> |
| | |
| ------- | ----------------------------------------------------------------------- |
| Type | <code>[name\|display name\|organization id\|members\|avatar url]</code> |
| Default | <code>name,display name,organization id,members,avatar url</code> |
Columns to display in table output. Available columns: name, display name, organization id, members, avatar url.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
### -O, --org
+10 -10
View File
@@ -18,18 +18,18 @@ coder licenses list [flags]
### -c, --column
| | |
| ------- | ---------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>ID,UUID,Expires At,Uploaded At,Features</code> |
| | |
| ------- | ----------------------------------------------------------------- |
| Type | <code>[id\|uuid\|uploaded at\|features\|expires at\|trial]</code> |
| Default | <code>ID,UUID,Expires At,Uploaded At,Features</code> |
Columns to display in table output. Available columns: id, uuid, uploaded at, features, expires at, trial.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+10 -10
View File
@@ -35,18 +35,18 @@ Search for a workspace with a query.
### -c, --column
| | |
| ------- | -------------------------------------------------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>workspace,template,status,healthy,last built,current version,outdated,starts at,stops after</code> |
| | |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Type | <code>[favorite\|workspace\|organization id\|organization name\|template\|status\|healthy\|last built\|current version\|outdated\|starts at\|starts next\|stops after\|stops next\|daily cost]</code> |
| Default | <code>workspace,template,status,healthy,last built,current version,outdated,starts at,stops after</code> |
Columns to display in table output. Available columns: favorite, workspace, organization id, organization name, template, status, healthy, last built, current version, outdated, starts at, starts next, stops after, stops next, daily cost.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+10 -10
View File
@@ -42,18 +42,18 @@ Search for a workspace with a query.
### -c, --column
| | |
| ------- | ------------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>workspace,starts at,starts next,stops after,stops next</code> |
| | |
| ------- | ------------------------------------------------------------------------- |
| Type | <code>[workspace\|starts at\|starts next\|stops after\|stops next]</code> |
| Default | <code>workspace,starts at,starts next,stops after,stops next</code> |
Columns to display in table output. Available columns: workspace, starts at, starts next, stops after, stops next.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+6 -6
View File
@@ -930,12 +930,12 @@ URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded f
### --postgres-auth
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Environment | <code>$CODER_PG_AUTH</code> |
| YAML | <code>pgAuth</code> |
| Default | <code>password</code> |
| | |
| ----------- | -------------------------------- |
| Type | <code>password\|awsiamrds</code> |
| Environment | <code>$CODER_PG_AUTH</code> |
| YAML | <code>pgAuth</code> |
| Default | <code>password</code> |
Type of auth to use when connecting to postgres.
+1 -1
View File
@@ -25,7 +25,7 @@ URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Type | <code>password\|awsiamrds</code> |
| Environment | <code>$CODER_PG_CONNECTION_AUTH</code> |
| Default | <code>password</code> |
+1 -1
View File
@@ -25,7 +25,7 @@ The connection URL for the Postgres database.
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Type | <code>password\|awsiamrds</code> |
| Environment | <code>$CODER_PG_CONNECTION_AUTH</code> |
| Default | <code>password</code> |
+1 -1
View File
@@ -29,7 +29,7 @@ The connection URL for the Postgres database.
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Type | <code>password\|awsiamrds</code> |
| Environment | <code>$CODER_PG_CONNECTION_AUTH</code> |
| Default | <code>password</code> |
+1 -1
View File
@@ -25,7 +25,7 @@ The connection URL for the Postgres database.
| | |
| ----------- | -------------------------------------- |
| Type | <code>enum[password\|awsiamrds]</code> |
| Type | <code>password\|awsiamrds</code> |
| Environment | <code>$CODER_PG_CONNECTION_AUTH</code> |
| Default | <code>password</code> |
+14 -14
View File
@@ -22,10 +22,10 @@ Specifies whether to wait for a direct connection before testing speed.
### --direction
| | |
| ------- | --------------------------- |
| Type | <code>enum[up\|down]</code> |
| Default | <code>down</code> |
| | |
| ------- | --------------------- |
| Type | <code>up\|down</code> |
| Default | <code>down</code> |
Specifies whether to run in reverse mode where the client receives and the server sends.
@@ -48,18 +48,18 @@ Specifies a file to write a network capture to.
### -c, --column
| | |
| ------- | -------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>Interval,Throughput</code> |
| | |
| ------- | ----------------------------------- |
| Type | <code>[Interval\|Throughput]</code> |
| Default | <code>Interval,Throughput</code> |
Columns to display in table output. Available columns: Interval, Throughput.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+5 -5
View File
@@ -60,11 +60,11 @@ Specifies how often to poll for workspace automated shutdown.
### --wait
| | |
| ----------- | -------------------------------- |
| Type | <code>enum[yes\|no\|auto]</code> |
| Environment | <code>$CODER_SSH_WAIT</code> |
| Default | <code>auto</code> |
| | |
| ----------- | ---------------------------- |
| Type | <code>yes\|no\|auto</code> |
| Environment | <code>$CODER_SSH_WAIT</code> |
| Default | <code>auto</code> |
Specifies whether or not to wait for the startup script to finish executing. Auto means that the agent startup script behavior configured in the workspace template is used.
+10 -10
View File
@@ -22,18 +22,18 @@ coder stat [flags]
### -c, --column
| | |
| ------- | -------------------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>host_cpu,host_memory,home_disk,container_cpu,container_memory</code> |
| | |
| ------- | -------------------------------------------------------------------------------- |
| Type | <code>[host cpu\|host memory\|home disk\|container cpu\|container memory]</code> |
| Default | <code>host cpu,host memory,home disk,container cpu,container memory</code> |
Columns to display in table output. Available columns: host cpu, host memory, home disk, container cpu, container memory.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+5 -5
View File
@@ -22,9 +22,9 @@ Force host CPU measurement.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
| | |
| ------- | ----------------------- |
| Type | <code>text\|json</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
Output format.
+9 -9
View File
@@ -23,18 +23,18 @@ Path for which to check disk usage.
### --prefix
| | |
| ------- | --------------------------------- |
| Type | <code>enum[Ki\|Mi\|Gi\|Ti]</code> |
| Default | <code>Gi</code> |
| | |
| ------- | --------------------------- |
| Type | <code>Ki\|Mi\|Gi\|Ti</code> |
| Default | <code>Gi</code> |
SI Prefix for disk measurement.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
| | |
| ------- | ----------------------- |
| Type | <code>text\|json</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
Output format.
+9 -9
View File
@@ -22,18 +22,18 @@ Force host memory measurement.
### --prefix
| | |
| ------- | --------------------------------- |
| Type | <code>enum[Ki\|Mi\|Gi\|Ti]</code> |
| Default | <code>Gi</code> |
| | |
| ------- | --------------------------- |
| Type | <code>Ki\|Mi\|Gi\|Ti</code> |
| Default | <code>Gi</code> |
SI Prefix for memory measurement.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
| | |
| ------- | ----------------------- |
| Type | <code>text\|json</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
Output format.
+6 -6
View File
@@ -70,17 +70,17 @@ Edit the template activity bump - workspaces created from this template will hav
### --autostart-requirement-weekdays
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
| | |
| ---- | ---------------------------------------------------------------------------------- |
| Type | <code>[monday\|tuesday\|wednesday\|thursday\|friday\|saturday\|sunday\|all]</code> |
Edit the template autostart requirement weekdays - workspaces created from this template can only autostart on the given weekdays. To unset this value for the template (and allow autostart on all days), pass 'all'.
### --autostop-requirement-weekdays
| | |
| ---- | ------------------------- |
| Type | <code>string-array</code> |
| | |
| ---- | ----------------------------------------------------------------------------------- |
| Type | <code>[monday\|tuesday\|wednesday\|thursday\|friday\|saturday\|sunday\|none]</code> |
Edit the template autostop requirement weekdays - workspaces created from this template must be restarted on the given weekdays. To unset this value for the template (and disable the autostop requirement for the template), pass 'none'.
+3 -3
View File
@@ -14,8 +14,8 @@ coder templates init [flags] [directory]
### --id
| | |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Type | <code>enum[aws-devcontainer\|aws-linux\|aws-windows\|azure-linux\|do-linux\|docker\|gcp-devcontainer\|gcp-linux\|gcp-vm-container\|gcp-windows\|kubernetes\|nomad-docker\|scratch]</code> |
| | |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Type | <code>aws-devcontainer\|aws-linux\|aws-windows\|azure-linux\|do-linux\|docker\|gcp-devcontainer\|gcp-linux\|gcp-vm-container\|gcp-windows\|kubernetes\|nomad-docker\|scratch</code> |
Specify a given example template by ID.
+10 -10
View File
@@ -18,18 +18,18 @@ coder templates list [flags]
### -c, --column
| | |
| ------- | -------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>name,organization name,last updated,used by</code> |
| | |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Type | <code>[name\|created at\|last updated\|organization id\|organization name\|provisioner\|active version id\|used by\|default ttl]</code> |
| Default | <code>name,organization name,last updated,used by</code> |
Columns to display in table output. Available columns: name, created at, last updated, organization id, organization name, provisioner, active version id, used by, default ttl.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+10 -10
View File
@@ -31,18 +31,18 @@ Select which organization (uuid or name) to use.
### -c, --column
| | |
| ------- | ----------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>Name,Created At,Created By,Status,Active</code> |
| | |
| ------- | --------------------------------------------------------------------- |
| Type | <code>[name\|created at\|created by\|status\|active\|archived]</code> |
| Default | <code>name,created at,created by,status,active</code> |
Columns to display in table output. Available columns: name, created at, created by, status, active, archived.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+10 -10
View File
@@ -26,18 +26,18 @@ Specifies whether all users' tokens will be listed or not (must have Owner role
### -c, --column
| | |
| ------- | ---------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>id,name,last used,expires at,created at</code> |
| | |
| ------- | ----------------------------------------------------------------- |
| Type | <code>[id\|name\|last used\|expires at\|created at\|owner]</code> |
| Default | <code>id,name,last used,expires at,created at</code> |
Columns to display in table output. Available columns: id, name, last used, expires at, created at, owner.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+4 -4
View File
@@ -24,9 +24,9 @@ coder users activate [flags] <username|user_id>
### -c, --column
| | |
| ------- | --------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>username,email,created_at,status</code> |
| | |
| ------- | -------------------------------------------------- |
| Type | <code>[username\|email\|created at\|status]</code> |
| Default | <code>username,email,created at,status</code> |
Specify a column to filter in the table.
+10 -10
View File
@@ -16,18 +16,18 @@ coder users list [flags]
### -c, --column
| | |
| ------- | --------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>username,email,created_at,status</code> |
| | |
| ------- | ------------------------------------------------------------------ |
| Type | <code>[id\|username\|email\|created at\|updated at\|status]</code> |
| Default | <code>username,email,created at,status</code> |
Columns to display in table output. Available columns: id, username, email, created at, updated at, status.
Columns to display in table output.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+5 -5
View File
@@ -20,9 +20,9 @@ coder users show [flags] <username|user_id|'me'>
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
| | |
| ------- | ------------------------ |
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
Output format.
+4 -4
View File
@@ -20,9 +20,9 @@ coder users suspend [flags] <username|user_id>
### -c, --column
| | |
| ------- | --------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>username,email,created_at,status</code> |
| | |
| ------- | -------------------------------------------------- |
| Type | <code>[username\|email\|created at\|status]</code> |
| Default | <code>username,email,created at,status</code> |
Specify a column to filter in the table.
+5 -5
View File
@@ -14,9 +14,9 @@ coder version [flags]
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
| | |
| ------- | ----------------------- |
| Type | <code>text\|json</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
Output format.