# prb obligation command reference

Manage obligations. This page documents **7 commands** under `prb obligation`.

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 obligation`](#prb-obligation)                 | Manage obligations.                                    | `prb obligation <command>`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/obligation/obligation.go#L35)      |
| [`prb obligation create`](#prb-obligation-create)   | Create a new obligation.                               | `prb obligation create`      | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/obligation/create/create.go#L78)   |
| [`prb obligation delete`](#prb-obligation-delete)   | Delete an obligation.                                  | `prb obligation delete <id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/obligation/delete/delete.go#L43)   |
| [`prb obligation list`](#prb-obligation-list)       | List obligations in an organization.                   | `prb obligation list`        | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/obligation/list/list.go#L77)       |
| [`prb obligation publish`](#prb-obligation-publish) | Publish the obligation register as a document version. | `prb obligation publish`     | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/obligation/publish/publish.go#L83) |
| [`prb obligation update`](#prb-obligation-update)   | Update an obligation.                                  | `prb obligation update <id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/obligation/update/update.go#L72)   |
| [`prb obligation view`](#prb-obligation-view)       | View an obligation.                                    | `prb obligation view <id>`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/obligation/view/view.go#L76)       |

## prb obligation

Manage obligations.

### Usage

```text
prb obligation <command>
```

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

## prb obligation create

Create a new obligation.

### Usage

```text
prb obligation create
```

### Flags

| Flag                          | Type   | Default | Required | Description                                                                 |
| ----------------------------- | ------ | ------- | -------- | --------------------------------------------------------------------------- |
| `--actions-to-be-implemented` | string | `""`    | —        | Actions to be implemented                                                   |
| `--area`                      | string | `""`    | —        | Obligation area (required)                                                  |
| `--due-date`                  | string | `""`    | —        | Due date (ISO 8601)                                                         |
| `--last-review-date`          | string | `""`    | —        | Last review date (ISO 8601)                                                 |
| `--org`                       | string | `""`    | —        | Organization ID                                                             |
| `--owner`                     | string | `""`    | —        | Owner profile ID (required)                                                 |
| `--regulator`                 | string | `""`    | —        | Regulator                                                                   |
| `--requirement`               | string | `""`    | —        | Obligation requirement                                                      |
| `--source`                    | string | `""`    | —        | Obligation source (required)                                                |
| `--status`                    | string | `""`    | —        | Obligation status: NON_COMPLIANT, PARTIALLY_COMPLIANT, COMPLIANT (required) |
| `--type`                      | string | `""`    | —        | Obligation type: LEGAL, CONTRACTUAL (required)                              |

### Examples

```bash
# Create an obligation interactively
prb obligation create

# Create an obligation non-interactively
prb obligation create --area "Data Protection" --source "GDPR Article 5" --status NON_COMPLIANT --type LEGAL --owner <profile-id>
```

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

## prb obligation delete

Delete an obligation.

### Usage

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

## prb obligation list

List obligations in an organization.

### Usage

```text
prb obligation list
```

Accepts no positional arguments.

### Flags

| Flag                | Type    | Default  | Required | Description                                                     |
| ------------------- | ------- | -------- | -------- | --------------------------------------------------------------- |
| `--after`           | string  | `""`     | —        | Cursor from the previous page (the Next cursor line)            |
| `--json`            | boolean | `false`  | —        | Output JSON (same as --output json)                             |
| `--limit`, `-L`     | integer | `30`     | —        | Maximum number of obligations to list                           |
| `--order-by`        | string  | `""`     | —        | Order by field (CREATED_AT, LAST_REVIEW_DATE, DUE_DATE, STATUS) |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                                      |
| `--org`             | string  | `""`     | —        | Organization ID                                                 |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                            |

### Examples

```bash
# List obligations in the default organization
prb obligation list

# List obligations sorted by due date
prb obligation ls --order-by DUE_DATE --output json
```

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

## prb obligation publish

Publish the obligation register as a document version.

### Usage

```text
prb obligation publish
```

### Flags

| Flag         | Type         | Default | Required | Description                                                 |
| ------------ | ------------ | ------- | -------- | ----------------------------------------------------------- |
| `--approver` | string array | `[]`    | —        | Approver profile ID (can be repeated; ignored with --minor) |
| `--minor`    | boolean      | `false` | —        | Publish as a minor version (no approval flow)               |
| `--org`      | string       | `""`    | —        | Organization ID                                             |

### Examples

```bash
# Publish the obligation register
prb obligation publish --org ORG_ID

# Publish with approvers
prb obligation publish --org ORG_ID --approver PROFILE_ID1 --approver PROFILE_ID2
```

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

## prb obligation update

Update an obligation.

### Usage

```text
prb obligation update <id>
```

Requires 1 positional argument.

### Flags

| Flag                          | Type   | Default | Required | Description                                                      |
| ----------------------------- | ------ | ------- | -------- | ---------------------------------------------------------------- |
| `--actions-to-be-implemented` | string | `""`    | —        | Actions to be implemented                                        |
| `--area`                      | string | `""`    | —        | Obligation area                                                  |
| `--due-date`                  | string | `""`    | —        | Due date (ISO 8601)                                              |
| `--last-review-date`          | string | `""`    | —        | Last review date (ISO 8601)                                      |
| `--owner`                     | string | `""`    | —        | Owner profile ID                                                 |
| `--regulator`                 | string | `""`    | —        | Regulator                                                        |
| `--requirement`               | string | `""`    | —        | Obligation requirement                                           |
| `--source`                    | string | `""`    | —        | Obligation source                                                |
| `--status`                    | string | `""`    | —        | Obligation status: NON_COMPLIANT, PARTIALLY_COMPLIANT, COMPLIANT |
| `--type`                      | string | `""`    | —        | Obligation type: LEGAL, CONTRACTUAL                              |

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

## prb obligation view

View an obligation.

### Usage

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