Command reference
deployments brain-grant
Human, service, and agent Brain grants
| Command | Summary |
|---|---|
deployments brain-grant list | List Brain grants |
deployments brain-grant create | Create a Brain grant |
deployments brain-grant revoke | Revoke a Brain grant |
deployments brain-grant list
List Brain grants.
deployments brain-grant list <brain>- Calls
GET /v1/brains/{brainId}/grants(SDKlistBrainGrants). - Needs an organization:
--orgor the saved context. - Paginated.
--page-sizesets the page size; pass the returned cursor as--cursorfor the next page.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--cursor | string (cursor) | Pagination cursor | ||
--page-size | string (number) | Page size | ||
<brain> | positional | yes | Brain ID |
Also accepts the global flags.
deployments brain-grant create
Create a Brain grant.
deployments brain-grant create <brain> --permission <permission> --target <json>- Calls
POST /v1/brains/{brainId}/grants(SDKcreateBrainGrant). - Needs an organization:
--orgor the saved context. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<brain> | positional | yes | Brain ID | |
--permission | string | yes | Brain permission | |
--target | string (json) | yes | Grant target identity |
Also accepts the global flags.
deployments brain-grant revoke
Revoke a Brain grant.
deployments brain-grant revoke <brain> <grant> --expected-version <number>- Calls
DELETE /v1/brains/{brainId}/grants/{grantId}(SDKrevokeBrainGrant). - Needs an organization:
--orgor the saved context. - Destructive. Live runs ask for confirmation; pass
--yesin scripts or with--json. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<brain> | positional | yes | Brain ID | |
<grant> | positional | yes | Brain grant ID | |
--expected-version | string (number) | yes | Current grant version |
Also accepts the global flags.