# prb audit command reference

Manage audits. This page documents **8 commands** under `prb audit`.

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 audit`](#prb-audit)                                   | Manage audits.                    | `prb audit <command>`                   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/audit/audit.go#L36)                           |
| [`prb audit create`](#prb-audit-create)                     | Create a new audit.               | `prb audit create`                      | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/audit/create/create.go#L91)                   |
| [`prb audit delete`](#prb-audit-delete)                     | Delete an audit.                  | `prb audit delete <id>`                 | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/audit/delete/delete.go#L43)                   |
| [`prb audit link-framework`](#prb-audit-link-framework)     | Link a framework to an audit.     | `prb audit link-framework <audit-id>`   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/audit/linkframework/linkframework.go#L43)     |
| [`prb audit list`](#prb-audit-list)                         | List audits in an organization.   | `prb audit list`                        | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/audit/list/list.go#L89)                       |
| [`prb audit unlink-framework`](#prb-audit-unlink-framework) | Unlink a framework from an audit. | `prb audit unlink-framework <audit-id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/audit/unlinkframework/unlinkframework.go#L43) |
| [`prb audit update`](#prb-audit-update)                     | Update an audit.                  | `prb audit update <id>`                 | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/audit/update/update.go#L83)                   |
| [`prb audit view`](#prb-audit-view)                         | View an audit.                    | `prb audit view <id>`                   | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/audit/view/view.go#L106)                      |

## prb audit

Manage audits.

### Usage

```text
prb audit <command>
```

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

## prb audit create

Create a new audit.

### Usage

```text
prb audit create
```

### Flags

| Flag                 | Type         | Default | Required | Description                                                                                 |
| -------------------- | ------------ | ------- | -------- | ------------------------------------------------------------------------------------------- |
| `--audit-end-date`   | string       | `""`    | —        | Audit end date (e.g. 2026-03-15)                                                            |
| `--audit-start-date` | string       | `""`    | —        | Audit start date (e.g. 2026-03-01)                                                          |
| `--firm`             | string       | `""`    | —        | Audit firm                                                                                  |
| `--framework`        | string array | `[]`    | —        | Framework ID (repeat for each framework)                                                    |
| `--name`             | string       | `""`    | —        | Audit name (required)                                                                       |
| `--org`              | string       | `""`    | —        | Organization ID                                                                             |
| `--state`            | string       | `""`    | —        | Audit state: TO_BOOK, AUDIT_BOOKED, NOT_STARTED, IN_PROGRESS, COMPLETED, REJECTED, OUTDATED |
| `--valid-from`       | string       | `""`    | —        | Valid from date (e.g. 2026-01-01)                                                           |
| `--valid-until`      | string       | `""`    | —        | Valid until date (e.g. 2026-12-31)                                                          |

### Examples

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

# Create an audit non-interactively
prb audit create --name "SOC 2 Type II 2026" --state IN_PROGRESS --valid-from 2026-01-01 --valid-until 2026-12-31
```

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

## prb audit delete

Delete an audit.

### Usage

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

## prb audit link-framework

Link a framework to an audit.

### Usage

```text
prb audit link-framework <audit-id>
```

Requires 1 positional argument.

### Flags

| Flag          | Type   | Default | Required | Description  |
| ------------- | ------ | ------- | -------- | ------------ |
| `--framework` | string | `""`    | —        | Framework ID |

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

## prb audit list

List audits in an organization.

### Usage

```text
prb audit 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 audits to list                                                              |
| `--order-by`        | string  | `""`     | —        | Order by field (CREATED_AT, VALID_FROM, VALID_UNTIL, AUDIT_START_DATE, AUDIT_END_DATE, STATE) |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                                                                    |
| `--org`             | string  | `""`     | —        | Organization ID                                                                               |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                                                          |

### Examples

```bash
# List audits in the default organization
prb audit list

# List audits sorted by state
prb audit ls --order-by STATE --output json
```

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

## prb audit unlink-framework

Unlink a framework from an audit.

### Usage

```text
prb audit unlink-framework <audit-id>
```

Requires 1 positional argument.

### Flags

| Flag          | Type   | Default | Required | Description  |
| ------------- | ------ | ------- | -------- | ------------ |
| `--framework` | string | `""`    | —        | Framework ID |

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

## prb audit update

Update an audit.

### Usage

```text
prb audit update <id>
```

Requires 1 positional argument.

### Flags

| Flag                 | Type   | Default | Required | Description                                                                                 |
| -------------------- | ------ | ------- | -------- | ------------------------------------------------------------------------------------------- |
| `--audit-end-date`   | string | `""`    | —        | Audit end date (e.g. 2026-03-15)                                                            |
| `--audit-start-date` | string | `""`    | —        | Audit start date (e.g. 2026-03-01)                                                          |
| `--firm`             | string | `""`    | —        | Audit firm                                                                                  |
| `--name`             | string | `""`    | —        | Audit name                                                                                  |
| `--state`            | string | `""`    | —        | Audit state: TO_BOOK, AUDIT_BOOKED, NOT_STARTED, IN_PROGRESS, COMPLETED, REJECTED, OUTDATED |
| `--valid-from`       | string | `""`    | —        | Valid from date (e.g. 2026-01-01)                                                           |
| `--valid-until`      | string | `""`    | —        | Valid until date (e.g. 2026-12-31)                                                          |

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

## prb audit view

View an audit.

### Usage

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