feat: add organizations list command to coder cli (#21960)

follows on from #21940.

The API endpoints existed for this already, so this PR just adds CLI functionality which uses those API endpoints.

Generated with the help of Mux
This commit is contained in:
Rowan Smith
2026-02-06 14:09:39 +11:00
committed by GitHub
parent a4296cbbc4
commit 683a7c0957
8 changed files with 165 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@ coder organizations [flags] [subcommand]
| Name | Purpose |
|------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [<code>show</code>](./organizations_show.md) | Show the organization. Using "selected" will show the selected organization from the "--org" flag. Using "me" will show all organizations you are a member of. |
| [<code>list</code>](./organizations_list.md) | List all organizations |
| [<code>create</code>](./organizations_create.md) | Create a new organization. |
| [<code>delete</code>](./organizations_delete.md) | Delete an organization |
| [<code>members</code>](./organizations_members.md) | Manage organization members |
+40
View File
@@ -0,0 +1,40 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# organizations list
List all organizations
Aliases:
* ls
## Usage
```console
coder organizations list [flags]
```
## Description
```console
List all organizations. Requires a role which grants ResourceOrganization: read.
```
## Options
### -c, --column
| | |
|---------|-------------------------------------------------------------------------------------------|
| Type | <code>[id\|name\|display name\|icon\|description\|created at\|updated at\|default]</code> |
| Default | <code>name,display name,id,default</code> |
Columns to display in table output.
### -o, --output
| | |
|---------|--------------------------|
| Type | <code>table\|json</code> |
| Default | <code>table</code> |
Output format.