feat: add JSON output format to many CLI commands (#6082)

This commit is contained in:
Dean Sheather
2023-02-08 17:09:38 +00:00
committed by GitHub
parent 5655ec6862
commit d60ec3e4bf
36 changed files with 851 additions and 285 deletions
+5 -4
View File
@@ -9,10 +9,11 @@ coder list [flags]
### Options
```
-a, --all Specifies whether all workspaces will be listed or not.
-c, --column stringArray Specify a column to filter in the table. Available columns are: workspace, template, status, last_built, outdated, starts_at, stops_after
-h, --help help for list
--search string Search for a workspace with a query. (default "owner:me")
-a, --all Specifies whether all workspaces will be listed or not.
-c, --column strings Columns to display in table output. Available columns: workspace, template, status, last built, outdated, starts at, stops after (default [workspace,template,status,last built,outdated,starts at,stops after])
-h, --help help for list
-o, --output string Output format. Available formats: table, json (default "table")
--search string Search for a workspace with a query. (default "owner:me")
```
### Options inherited from parent commands
+3 -2
View File
@@ -9,8 +9,9 @@ coder templates list [flags]
### Options
```
-c, --column stringArray Specify a column to filter in the table. (default [name,last_updated,used_by])
-h, --help help for list
-c, --column strings Columns to display in table output. Available columns: name, created at, last updated, organization id, provisioner, active version id, used by, default ttl (default [name,last updated,used by])
-h, --help help for list
-o, --output string Output format. Available formats: table, json (default "table")
```
### Options inherited from parent commands
+3 -1
View File
@@ -9,7 +9,9 @@ coder templates versions list <template> [flags]
### Options
```
-h, --help help for list
-c, --column strings Columns to display in table output. Available columns: name, created at, created by, status, active (default [name,created at,created by,status,active])
-h, --help help for list
-o, --output string Output format. Available formats: table, json (default "table")
```
### Options inherited from parent commands
+3 -1
View File
@@ -9,7 +9,9 @@ coder tokens list [flags]
### Options
```
-h, --help help for list
-c, --column strings Columns to display in table output. Available columns: id, last used, expires at, created at (default [id,last used,expires at,created at])
-h, --help help for list
-o, --output string Output format. Available formats: table, json (default "table")
```
### Options inherited from parent commands
+3 -3
View File
@@ -7,9 +7,9 @@ coder users list [flags]
### Options
```
-c, --column stringArray Specify a column to filter in the table. Available columns are: id, username, email, created_at, status. (default [username,email,created_at,status])
-h, --help help for list
-o, --output string Output format. Available formats are: table, json. (default "table")
-c, --column strings Columns to display in table output. Available columns: id, username, email, created at, status (default [username,email,created_at,status])
-h, --help help for list
-o, --output string Output format. Available formats: table, json (default "table")
```
### Options inherited from parent commands
+1 -1
View File
@@ -16,7 +16,7 @@ coder users show <username|user_id|'me'> [flags]
```
-h, --help help for show
-o, --output string Output format. Available formats are: table, json. (default "table")
-o, --output string Output format. Available formats: table, json (default "table")
```
### Options inherited from parent commands