# prb user command reference

Manage users. This page documents **5 commands** under `prb user`.

Flags and examples below come from the command definitions. A **Required** flag is explicitly marked required by Cobra; an unmarked flag can still be needed by runtime validation or a non-interactive workflow. Empty strings and empty lists are registered defaults, not sample values.

Every command also inherits the [global flags](/docs/developers/cli/commands#global-flags). Run `prb <command> --help` to check your installed version. Replace placeholder IDs and names in source examples before running them. Return to the [complete CLI command reference](/docs/developers/cli/commands) to browse another command.

## Commands

| Command                                       | Description                    | Usage                      | Source                                                                                                       |
| --------------------------------------------- | ------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [`prb user`](#prb-user)                       | Manage users.                  | `prb user <command>`       | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/user.go#L33)                  |
| [`prb user deactivate`](#prb-user-deactivate) | Deactivate a user.             | `prb user deactivate <id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/deactivate/deactivate.go#L46) |
| [`prb user list`](#prb-user-list)             | List users in an organization. | `prb user list`            | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/list/list.go#L82)             |
| [`prb user remove`](#prb-user-remove)         | Remove a user.                 | `prb user remove <id>`     | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/remove/remove.go#L46)         |
| [`prb user view`](#prb-user-view)             | View a user.                   | `prb user view <id>`       | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/view/view.go#L78)             |

## prb user

Manage users.

### Usage

```text
prb user <command>
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/user.go#L33).

## prb user deactivate

Deactivate a user.

### Usage

```text
prb user deactivate <id>
```

Requires 1 positional argument.

### Flags

| Flag          | Type    | Default | Required | Description              |
| ------------- | ------- | ------- | -------- | ------------------------ |
| `--org`       | string  | `""`    | —        | Organization ID          |
| `--yes`, `-y` | boolean | `false` | —        | Skip confirmation prompt |

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/deactivate/deactivate.go#L46).

## prb user list

List users in an organization.

### Usage

```text
prb user list
```

Accepts no positional arguments.

### Flags

| Flag                | Type        | Default  | Required | Description                                                                                                                      |
| ------------------- | ----------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `--after`           | string      | `""`     | —        | Cursor from the previous page (the Next cursor line)                                                                             |
| `--contract-ended`  | string      | `""`     | —        | Filter by contract status (true or false)                                                                                        |
| `--filter`, `-q`    | string      | `""`     | —        | Filter users by name or email search query                                                                                       |
| `--json`            | boolean     | `false`  | —        | Output JSON (same as --output json)                                                                                              |
| `--kind`            | string      | `""`     | —        | Filter by profile kind (EMPLOYEE, CONTRACTOR, SERVICE_ACCOUNT)                                                                   |
| `--limit`, `-L`     | integer     | `30`     | —        | Maximum number of users to list                                                                                                  |
| `--order-by`        | string      | `""`     | —        | Order by field (FULL_NAME, CREATED_AT, KIND)                                                                                     |
| `--order-direction` | string      | `"DESC"` | —        | Sort direction (ASC, DESC)                                                                                                       |
| `--org`             | string      | `""`     | —        | Organization ID                                                                                                                  |
| `--output`, `-o`    | string      | `""`     | —        | Output format: json, table (default)                                                                                             |
| `--role`            | string      | `""`     | —        | Filter by membership role (OWNER, ADMIN, VIEWER, AUDITOR, EMPLOYEE, COMPLIANCE_PORTAL_MANAGER, COMPLIANCE_PORTAL_ACCESS_MANAGER) |
| `--state`           | string list | `[]`     | —        | Filter by profile state; repeat or comma-separate for multiple (PENDING, ACTIVE, DEACTIVATED)                                    |

### Examples

```bash
# List users in the default organization
prb user list

# List only active users
prb user ls --state ACTIVE

# Search users by name or email
prb user ls --filter alice

# List only admins
prb user ls --role ADMIN

# Filter by type
prb user ls --kind EMPLOYEE

# List users whose contract has ended
prb user ls --contract-ended true
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/list/list.go#L82).

## prb user remove

Remove a user.

### Usage

```text
prb user remove <id>
```

Requires 1 positional argument.

### Flags

| Flag          | Type    | Default | Required | Description              |
| ------------- | ------- | ------- | -------- | ------------------------ |
| `--org`       | string  | `""`    | —        | Organization ID          |
| `--yes`, `-y` | boolean | `false` | —        | Skip confirmation prompt |

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/remove/remove.go#L46).

## prb user view

View a user.

### Usage

```text
prb user view <id>
```

Requires 1 positional argument.

### Flags

| Flag             | Type    | Default | Required | Description                          |
| ---------------- | ------- | ------- | -------- | ------------------------------------ |
| `--json`         | boolean | `false` | —        | Output JSON (same as --output json)  |
| `--output`, `-o` | string  | `""`    | —        | Output format: json, table (default) |

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/user/view/view.go#L78).
