# prb treatment-plan command reference

Manage treatment plans. This page documents **6 commands** under `prb treatment-plan`.

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 treatment-plan`](#prb-treatment-plan)               | Manage treatment plans.      | `prb treatment-plan <command>`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/treatment_plan.go#L34) |
| [`prb treatment-plan create`](#prb-treatment-plan-create) | Create a new treatment plan. | `prb treatment-plan create`      | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/create/create.go#L81)  |
| [`prb treatment-plan delete`](#prb-treatment-plan-delete) | Delete a treatment plan.     | `prb treatment-plan delete <id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/delete/delete.go#L43)  |
| [`prb treatment-plan list`](#prb-treatment-plan-list)     | List treatment plans.        | `prb treatment-plan list`        | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/list/list.go#L158)     |
| [`prb treatment-plan update`](#prb-treatment-plan-update) | Update a treatment plan.     | `prb treatment-plan update <id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/update/update.go#L68)  |
| [`prb treatment-plan view`](#prb-treatment-plan-view)     | View a treatment plan.       | `prb treatment-plan view <id>`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/view/view.go#L124)     |

## prb treatment-plan

Manage treatment plans.

### Usage

```text
prb treatment-plan <command>
```

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

## prb treatment-plan create

Create a new treatment plan.

### Usage

```text
prb treatment-plan create
```

### Flags

| Flag                    | Type    | Default | Required | Description                                                     |
| ----------------------- | ------- | ------- | -------- | --------------------------------------------------------------- |
| `--inherent-impact`     | integer | `0`     | Required | Inherent impact (required)                                      |
| `--inherent-likelihood` | integer | `0`     | Required | Inherent likelihood (required)                                  |
| `--owner`               | string  | `""`    | —        | Owner profile ID (required)                                     |
| `--residual-impact`     | integer | `0`     | —        | Residual impact                                                 |
| `--residual-likelihood` | integer | `0`     | —        | Residual likelihood                                             |
| `--risk`                | string  | `""`    | —        | Risk ID (required)                                              |
| `--risk-analysis`       | string  | `""`    | —        | Risk analysis ID (required)                                     |
| `--treatment`           | string  | `""`    | —        | Treatment: MITIGATED, ACCEPTED, AVOIDED, TRANSFERRED (required) |

### Examples

```bash
# Create a treatment plan interactively
prb treatment-plan create --inherent-likelihood 3 --inherent-impact 4

# Create a treatment plan non-interactively
prb treatment-plan create --risk <id> --risk-analysis <id> --treatment MITIGATED --owner <id> --inherent-likelihood 3 --inherent-impact 4
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/create/create.go#L81).

## prb treatment-plan delete

Delete a treatment plan.

### Usage

```text
prb treatment-plan 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/treatment-plan/delete/delete.go#L43).

## prb treatment-plan list

List treatment plans.

### Usage

```text
prb treatment-plan list
```

Accepts no positional arguments.

### Flags

| Flag                | Type    | Default  | Required | Description                                                                                   |
| ------------------- | ------- | -------- | -------- | --------------------------------------------------------------------------------------------- |
| `--after`           | string  | `""`     | —        | Cursor from the previous page (the Next cursor line)                                          |
| `--as-of`           | string  | `""`     | —        | Reconstruct plans as of this RFC3339 instant (requires --risk-analysis; omit for live tables) |
| `--impact`          | integer | `0`      | —        | Filter by impact (with --score-type and --likelihood)                                         |
| `--json`            | boolean | `false`  | —        | Output JSON (same as --output json)                                                           |
| `--likelihood`      | integer | `0`      | —        | Filter by likelihood (with --score-type and --impact)                                         |
| `--limit`, `-L`     | integer | `30`     | —        | Maximum number of treatment plans to list                                                     |
| `--order-by`        | string  | `""`     | —        | Order by field (CREATED_AT, TREATMENT, CATEGORY, INHERENT_RISK_SCORE, RESIDUAL_RISK_SCORE)    |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                                                                    |
| `--org`             | string  | `""`     | —        | Organization ID                                                                               |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                                                          |
| `--risk`            | string  | `""`     | —        | List plans for a risk ID                                                                      |
| `--risk-analysis`   | string  | `""`     | —        | List plans for a risk analysis ID                                                             |
| `--score-type`      | string  | `""`     | —        | Filter by matrix score type (INHERENT, NET, RESIDUAL)                                         |

### Examples

```bash
# List treatment plans in the default organization
prb treatment-plan list

# List treatment plans for a risk analysis
prb treatment-plan ls --risk-analysis <id>
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/list/list.go#L158).

## prb treatment-plan update

Update a treatment plan.

### Usage

```text
prb treatment-plan update <id>
```

Requires 1 positional argument.

### Flags

| Flag                    | Type    | Default | Required | Description                                          |
| ----------------------- | ------- | ------- | -------- | ---------------------------------------------------- |
| `--inherent-impact`     | integer | `0`     | —        | Inherent impact                                      |
| `--inherent-likelihood` | integer | `0`     | —        | Inherent likelihood                                  |
| `--owner`               | string  | `""`    | —        | Owner profile ID                                     |
| `--residual-impact`     | integer | `0`     | —        | Residual impact                                      |
| `--residual-likelihood` | integer | `0`     | —        | Residual likelihood                                  |
| `--treatment`           | string  | `""`    | —        | Treatment: MITIGATED, ACCEPTED, AVOIDED, TRANSFERRED |

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/treatment-plan/update/update.go#L68).

## prb treatment-plan view

View a treatment plan.

### Usage

```text
prb treatment-plan 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/treatment-plan/view/view.go#L124).
