# prb control command reference

Manage controls. This page documents **6 commands** under `prb control`.

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 control`](#prb-control)               | Manage controls.              | `prb control <command>`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/control/control.go#L34)       |
| [`prb control create`](#prb-control-create) | Create a new control.         | `prb control create`      | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/control/create/create.go#L86) |
| [`prb control delete`](#prb-control-delete) | Delete a control.             | `prb control delete <id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/control/delete/delete.go#L43) |
| [`prb control list`](#prb-control-list)     | List controls in a framework. | `prb control list`        | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/control/list/list.go#L80)     |
| [`prb control update`](#prb-control-update) | Update a control.             | `prb control update <id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/control/update/update.go#L81) |
| [`prb control view`](#prb-control-view)     | View a control.               | `prb control view <id>`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/control/view/view.go#L80)     |

## prb control

Manage controls.

### Usage

```text
prb control <command>
```

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

## prb control create

Create a new control.

### Usage

```text
prb control create
```

Accepts no positional arguments.

### Flags

| Flag                              | Type    | Default     | Required | Description                                                                               |
| --------------------------------- | ------- | ----------- | -------- | ----------------------------------------------------------------------------------------- |
| `--best-practice`                 | boolean | `false`     | —        | Mark as best practice                                                                     |
| `--description`                   | string  | `""`        | Required | Control description (required)                                                            |
| `--framework`                     | string  | `""`        | Required | Framework ID (required)                                                                   |
| `--maturity-level`                | string  | `"INITIAL"` | —        | CMMI maturity level (NONE, INITIAL, MANAGED, DEFINED, QUANTITATIVELY_MANAGED, OPTIMIZING) |
| `--name`                          | string  | `""`        | Required | Control name (required)                                                                   |
| `--not-implemented-justification` | string  | `""`        | —        | Justification when maturity level is NONE                                                 |
| `--section-title`                 | string  | `""`        | Required | Section title (required)                                                                  |

### Examples

```bash
# Create a control
prb control create --framework FW_ID --section-title "A.5" --name "Information security policies" --description "Policies are defined and reviewed" --maturity-level INITIAL
```

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

## prb control delete

Delete a control.

### Usage

```text
prb control delete <id>
```

Requires 1 positional argument.

### Flags

| Flag          | Type    | Default | Required | Description              |
| ------------- | ------- | ------- | -------- | ------------------------ |
| `--yes`, `-y` | boolean | `false` | —        | Skip confirmation prompt |

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

## prb control list

List controls in a framework.

### Usage

```text
prb control list
```

Accepts no positional arguments.

### Flags

| Flag                | Type    | Default  | Required | Description                                          |
| ------------------- | ------- | -------- | -------- | ---------------------------------------------------- |
| `--after`           | string  | `""`     | —        | Cursor from the previous page (the Next cursor line) |
| `--filter`, `-q`    | string  | `""`     | —        | Filter controls by search query                      |
| `--framework`       | string  | `""`     | Required | Framework ID (required)                              |
| `--json`            | boolean | `false`  | —        | Output JSON (same as --output json)                  |
| `--limit`, `-L`     | integer | `30`     | —        | Maximum number of controls to list                   |
| `--order-by`        | string  | `""`     | —        | Order by field (CREATED_AT, SECTION_TITLE)           |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                           |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                 |

### Examples

```bash
# List controls in a framework
prb control list --framework <framework-id>

# Filter and output as JSON
prb control ls --framework <framework-id> --filter "access" --output json
```

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

## prb control update

Update a control.

### Usage

```text
prb control update <id>
```

Requires 1 positional argument.

### Flags

| Flag                              | Type    | Default | Required | Description                                                                               |
| --------------------------------- | ------- | ------- | -------- | ----------------------------------------------------------------------------------------- |
| `--best-practice`                 | boolean | `false` | —        | Mark as best practice                                                                     |
| `--description`                   | string  | `""`    | —        | Control description                                                                       |
| `--maturity-level`                | string  | `""`    | —        | CMMI maturity level (NONE, INITIAL, MANAGED, DEFINED, QUANTITATIVELY_MANAGED, OPTIMIZING) |
| `--name`                          | string  | `""`    | —        | Control name                                                                              |
| `--not-implemented-justification` | string  | `""`    | —        | Justification when maturity level is NONE                                                 |
| `--section-title`                 | string  | `""`    | —        | Section title                                                                             |

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

## prb control view

View a control.

### Usage

```text
prb control 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/control/view/view.go#L80).
