> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nscale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Groups

> Manage groups within an organization.

Groups allow you to organize users and control access to resources within an organization.

Commands that act on one group take its ID or name either as a positional argument or with `--id`. If you omit it, the CLI opens an interactive picker, so always pass it in scripts.

## Subcommands

* [list](#list) — List groups
* [get](#get) — Get group details
* [create](#create) — Create a new group
* [update](#update) — Update an existing group
* [delete](#delete) — Delete a group

***

## list

List groups in an organization.

**Aliases:** `list`, `ls`

```bash theme={null}
nscale groups list --org <org-id> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`--org string`</td><td>Organization ID or name</td></tr>

    <tr>
      <td>
        `--json`
      </td>

      <td>Emit the full JSON payload (mutually exclusive with `-q`)</td>
    </tr>

    <tr>
      <td>
        `-q, --query stringArray`
      </td>

      <td>jq filter for value extraction (see [Query output with `-q`](https://docs.nscale.com/docs/cli/query-output))</td>
    </tr>

    <tr>
      <td>
        `--limit int`
      </td>

      <td>Show at most N results (client-side; every result is still fetched). Cuts before `-q`. `0` for all</td>
    </tr>
  </tbody>
</table>

***

## get

Get details for a specific group.

```bash theme={null}
nscale groups get <group-id> --org <org-id>
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`--id string`</td><td>Group ID or name</td></tr>
    <tr><td>`--org string`</td><td>Organization ID or name</td></tr>

    <tr>
      <td>
        `--json`
      </td>

      <td>Emit the full JSON payload (mutually exclusive with `-q`)</td>
    </tr>

    <tr>
      <td>
        `-q, --query stringArray`
      </td>

      <td>jq filter for value extraction (see [Query output with `-q`](https://docs.nscale.com/docs/cli/query-output))</td>
    </tr>
  </tbody>
</table>

***

## create

Create a new group in the specified organization. Supports interactive mode or JSON input.

```bash theme={null}
nscale groups create --org <org-id> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`--org string`</td><td>Organization ID or name</td></tr>
    <tr><td>`-f, --file string`</td><td>Path to a JSON file</td></tr>
    <tr><td>`--stdin`</td><td>Read JSON from standard input</td></tr>
    <tr><td>`--dry-run`</td><td>Preview actions and payload without persisting</td></tr>
    <tr><td>`-y, --yes`</td><td>Automatically confirm creation</td></tr>

    <tr>
      <td>
        `--json`
      </td>

      <td>Emit the full JSON payload (mutually exclusive with `-q`)</td>
    </tr>

    <tr>
      <td>
        `-q, --query stringArray`
      </td>

      <td>jq filter for value extraction (see [Query output with `-q`](https://docs.nscale.com/docs/cli/query-output))</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale groups create --org <org-id> --file group.json
nscale groups create --org <org-id> --stdin < group.json
cat group.json | nscale groups create --org <org-id> --stdin
# Create unattended and print only the new ID
nscale groups create --file group.json --yes -q '.metadata.id'
# Interactive mode
nscale groups create
```

***

## update

Update an existing group.

```bash theme={null}
nscale groups update <group-id> --org <org-id> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td>`--id string`</td><td>Group ID or name</td></tr>
    <tr><td>`--org string`</td><td>Organization ID or name</td></tr>
    <tr><td>`-f, --file string`</td><td>Path to a JSON file</td></tr>
    <tr><td>`--stdin`</td><td>Read JSON from standard input</td></tr>
    <tr><td>`--dry-run`</td><td>Preview actions and payload without persisting</td></tr>
    <tr><td>`-y, --yes`</td><td>Automatically confirm update</td></tr>

    <tr>
      <td>
        `--json`
      </td>

      <td>Emit the full JSON payload (mutually exclusive with `-q`)</td>
    </tr>

    <tr>
      <td>
        `-q, --query stringArray`
      </td>

      <td>jq filter for value extraction (see [Query output with `-q`](https://docs.nscale.com/docs/cli/query-output))</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale groups update <group-id> --org <org-id> --file group.json
nscale groups update <group-id> --org <org-id> --stdin < group.json
cat group.json | nscale groups update <group-id> --org <org-id> --stdin
# Interactive mode
nscale groups update
```

***

## delete

Delete an existing group.

**Aliases:** `delete`, `rm`, `remove`

```bash theme={null}
nscale groups delete <group-id> --org <org-id> [flags]
```

### Flags

| Flag | Description |
| - | - |
| `--id string` | Group ID or name |
| `--org string` | Organization ID or name |
| `--dry-run` | Preview actions and payload without persisting |
| `-y, --yes` | Automatically confirm deletion |

### Examples

```bash theme={null}
nscale groups delete <group-id> --org <org-id> --yes
nscale groups delete <group-id> --dry-run
```
