Skip to content

Commit eba6605

Browse files
committed
feat(permission-groups): expose administration through API CLI and MCP
1 parent bc2f641 commit eba6605

51 files changed

Lines changed: 12607 additions & 6619 deletions

Some content is hidden

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

‎apps/docs/content/docs/api-reference/meta.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"(generated)/files",
1818
"(generated)/knowledge-bases",
1919
"(generated)/workspaces",
20+
"(generated)/permission-groups",
2021
"(generated)/workspace-sync",
2122
"(generated)/mcp-servers",
2223
"(generated)/skills",

‎apps/docs/content/docs/cli/commands.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ These apply to every command, and may be written before or after it.
4444
| [`sim logs`](/cli/logs) | Manage logs |
4545
| [`sim mcp-servers`](/cli/mcp-servers) | Manage mcp servers |
4646
| [`sim meta`](/cli/meta) | Manage meta |
47+
| [`sim permission-groups`](/cli/permission-groups) | Manage permission groups |
4748
| [`sim sandboxes`](/cli/sandboxes) | Manage sandboxes |
4849
| [`sim secrets`](/cli/secrets) | Manage secrets |
4950
| [`sim selectors`](/cli/selectors) | Manage selectors |

‎apps/docs/content/docs/cli/meta.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"logs",
2828
"mcp-servers",
2929
"meta",
30+
"permission-groups",
3031
"sandboxes",
3132
"secrets",
3233
"selectors",
Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
---
2+
title: Permission Groups
3+
description: Manage permission groups — every subcommand, argument, and flag
4+
---
5+
6+
import { CommandTable } from '@/components/ui/command-table'
7+
8+
`sim permission-groups` is also spelled `sim permission-group`.
9+
10+
Every command below also accepts the [global options](/cli/commands#global-options).
11+
12+
## Add permission group member
13+
14+
```bash
15+
sim permission-groups members add [options]
16+
```
17+
18+
Add Permission Group Member (OAuth login or personal API key required)
19+
20+
**Options**
21+
22+
<CommandTable>
23+
24+
| Option | Required | Description |
25+
| --- | --- | --- |
26+
| `--organization <value>` | Yes | Organization that owns the permission group. |
27+
| `--group <value>` | Yes | Permission group identifier. |
28+
| `--user-id <value>` | Yes | Existing organization member to add. |
29+
30+
</CommandTable>
31+
32+
## Bulk add permission group members
33+
34+
```bash
35+
sim permission-groups members batch-add [options]
36+
```
37+
38+
Bulk Add Permission Group Members (OAuth login or personal API key required)
39+
40+
**Options**
41+
42+
<CommandTable>
43+
44+
| Option | Required | Description |
45+
| --- | --- | --- |
46+
| `--organization <value>` | Yes | Organization that owns the permission group. |
47+
| `--group <value>` | Yes | Permission group identifier. |
48+
| `--user-ids <json\|@file>` | No | Organization member identifiers. Existing group members are skipped; users outside the organization are ignored. (JSON, or @path / @- to read a file or stdin). |
49+
| `--add-all-organization-members` | No | Add every current organization member, up to 1000. For larger organizations, use userIds in batches. Cannot be combined with userIds. |
50+
| `--no-add-all-organization-members` | No | Send --add-all-organization-members as false. |
51+
52+
</CommandTable>
53+
54+
## List permission group members
55+
56+
```bash
57+
sim permission-groups members list [options]
58+
```
59+
60+
List Permission Group Members (OAuth login or personal API key required)
61+
62+
**Options**
63+
64+
<CommandTable>
65+
66+
| Option | Required | Description |
67+
| --- | --- | --- |
68+
| `--organization <value>` | Yes | Organization that owns the permission group. |
69+
| `--group <value>` | Yes | Permission group identifier. |
70+
| `--sort-by <value>` | No | Field used to sort the result. Accepted values: `assignedAt`, `userId`. |
71+
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
72+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `0`. |
73+
74+
</CommandTable>
75+
76+
## Remove permission group member
77+
78+
```bash
79+
sim permission-groups members remove <memberId> [options]
80+
```
81+
82+
Remove Permission Group Member (OAuth login or personal API key required)
83+
84+
**Arguments**
85+
86+
<CommandTable>
87+
88+
| Argument | Required | Description |
89+
| --- | --- | --- |
90+
| `memberId` | Yes | Membership assignment identifier returned by List Permission Group Members. |
91+
92+
</CommandTable>
93+
94+
**Options**
95+
96+
<CommandTable>
97+
98+
| Option | Required | Description |
99+
| --- | --- | --- |
100+
| `--organization <value>` | Yes | Organization that owns the permission group. |
101+
| `--group <value>` | Yes | Permission group identifier. |
102+
| `-y, --yes` | Yes | Confirm this operation. |
103+
104+
</CommandTable>
105+
106+
## Create permission group
107+
108+
```bash
109+
sim permission-groups create [options]
110+
```
111+
112+
Create Permission Group (OAuth login or personal API key required)
113+
114+
**Options**
115+
116+
<CommandTable>
117+
118+
| Option | Required | Description |
119+
| --- | --- | --- |
120+
| `--organization <value>` | Yes | Organization that owns the permission group. |
121+
| `--name <value>` | Yes | Group name, unique within the organization. |
122+
| `--description <value>` | No | Optional group description. |
123+
| `--config <json\|@file>` | No | Patch of permission restrictions. Omitted keys remain unchanged; each supplied array replaces that entire list. (JSON, or @path / @- to read a file or stdin). |
124+
| `--is-default` | No | Whether the group is the organization default. Only one group can be the default. |
125+
| `--no-is-default` | No | Send --is-default as false. |
126+
| `--workspace-ids <json\|@file>` | No | Workspace identifiers for a non-default group. Required on creation; an empty update makes the group inactive. (JSON, or @path / @- to read a file or stdin). |
127+
128+
</CommandTable>
129+
130+
## Delete permission group
131+
132+
```bash
133+
sim permission-groups delete <groupId> [options]
134+
```
135+
136+
Delete Permission Group (OAuth login or personal API key required)
137+
138+
**Arguments**
139+
140+
<CommandTable>
141+
142+
| Argument | Required | Description |
143+
| --- | --- | --- |
144+
| `groupId` | Yes | Permission group identifier. |
145+
146+
</CommandTable>
147+
148+
**Options**
149+
150+
<CommandTable>
151+
152+
| Option | Required | Description |
153+
| --- | --- | --- |
154+
| `--organization <value>` | Yes | Organization that owns the permission group. |
155+
| `-y, --yes` | Yes | Confirm this operation. |
156+
157+
</CommandTable>
158+
159+
## Get permission group
160+
161+
```bash
162+
sim permission-groups get <groupId> [options]
163+
```
164+
165+
Get Permission Group (OAuth login or personal API key required)
166+
167+
**Arguments**
168+
169+
<CommandTable>
170+
171+
| Argument | Required | Description |
172+
| --- | --- | --- |
173+
| `groupId` | Yes | Permission group identifier. |
174+
175+
</CommandTable>
176+
177+
**Options**
178+
179+
<CommandTable>
180+
181+
| Option | Required | Description |
182+
| --- | --- | --- |
183+
| `--organization <value>` | Yes | Organization that owns the permission group. |
184+
185+
</CommandTable>
186+
187+
## List permission groups
188+
189+
```bash
190+
sim permission-groups list [options]
191+
```
192+
193+
List Permission Groups (OAuth login or personal API key required)
194+
195+
**Options**
196+
197+
<CommandTable>
198+
199+
| Option | Required | Description |
200+
| --- | --- | --- |
201+
| `--organization <value>` | Yes | Organization that owns the permission group. |
202+
| `--search <value>` | No | Case-insensitive substring match against the group name. |
203+
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
204+
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
205+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `0`. |
206+
207+
</CommandTable>
208+
209+
## List permission group workspaces
210+
211+
```bash
212+
sim permission-groups workspaces [options]
213+
```
214+
215+
List Permission Group Workspaces (OAuth login or personal API key required)
216+
217+
**Options**
218+
219+
<CommandTable>
220+
221+
| Option | Required | Description |
222+
| --- | --- | --- |
223+
| `--organization <value>` | Yes | Organization that owns the permission group. |
224+
| `--search <value>` | No | Case-insensitive substring match against the workspace name. |
225+
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `id`. |
226+
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
227+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `0`. |
228+
229+
</CommandTable>
230+
231+
## Update permission group
232+
233+
```bash
234+
sim permission-groups update <groupId> [options]
235+
```
236+
237+
Update Permission Group (OAuth login or personal API key required)
238+
239+
**Arguments**
240+
241+
<CommandTable>
242+
243+
| Argument | Required | Description |
244+
| --- | --- | --- |
245+
| `groupId` | Yes | Permission group identifier. |
246+
247+
</CommandTable>
248+
249+
**Options**
250+
251+
<CommandTable>
252+
253+
| Option | Required | Description |
254+
| --- | --- | --- |
255+
| `--organization <value>` | Yes | Organization that owns the permission group. |
256+
| `--name <value>` | No | Group name, unique within the organization. |
257+
| `--description <value>` | No | Group description. Null clears it; omission leaves it unchanged. (--description null sends the word, not JSON null). |
258+
| `--config <json\|@file>` | No | Patch of permission restrictions. Omitted keys remain unchanged; each supplied array replaces that entire list. (JSON, or @path / @- to read a file or stdin). |
259+
| `--is-default` | No | Whether the group is the organization default. Only one group can be the default. |
260+
| `--no-is-default` | No | Send --is-default as false. |
261+
| `--workspace-ids <json\|@file>` | No | Workspace identifiers for a non-default group. Required on creation; an empty update makes the group inactive. (JSON, or @path / @- to read a file or stdin). |
262+
263+
</CommandTable>

0 commit comments

Comments
 (0)