# prb document command reference

Manage documents. This page documents **19 commands** under `prb document`.

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 document`](#prb-document)                                                 | Manage documents.                                          | `prb document <command>`                                         | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/document.go#L47)                                        |
| [`prb document archive`](#prb-document-archive)                                 | Archive a document.                                        | `prb document archive <id>`                                      | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/archive/archive.go#L53)                                 |
| [`prb document create`](#prb-document-create)                                   | Create a new document.                                     | `prb document create`                                            | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/create/create.go#L66)                                   |
| [`prb document delete`](#prb-document-delete)                                   | Delete a document.                                         | `prb document delete <id>`                                       | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/delete/delete.go#L43)                                   |
| [`prb document delete-draft`](#prb-document-delete-draft)                       | Delete the draft version of a document.                    | `prb document delete-draft <document-id>`                        | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/delete-draft/delete_draft.go#L45)                       |
| [`prb document list`](#prb-document-list)                                       | List documents in an organization.                         | `prb document list`                                              | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/list/list.go#L81)                                       |
| [`prb document list-approval-decisions`](#prb-document-list-approval-decisions) | List approval decisions for a quorum.                      | `prb document list-approval-decisions <quorum-id>`               | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/list-approval-decisions/list_approval_decisions.go#L78) |
| [`prb document list-approval-quorums`](#prb-document-list-approval-quorums)     | List approval quorums for a document version.              | `prb document list-approval-quorums <document-version-id>`       | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/list-approval-quorums/list_approval_quorums.go#L70)     |
| [`prb document list-history`](#prb-document-list-history)                       | List revisions for a document.                             | `prb document list-history <document-id>`                        | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/list-history/list_history.go#L77)                       |
| [`prb document list-versions`](#prb-document-list-versions)                     | List versions of a document.                               | `prb document list-versions <document-id>`                       | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/list-versions/list_versions.go#L83)                     |
| [`prb document publish`](#prb-document-publish)                                 | Publish a document.                                        | `prb document publish <document-id>`                             | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/publish/publish.go#L73)                                 |
| [`prb document restore-history`](#prb-document-restore-history)                 | Restore a draft document to a collaboration history point. | `prb document restore-history <document-id>`                     | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/restore-history/restore_history.go#L81)                 |
| [`prb document unarchive`](#prb-document-unarchive)                             | Unarchive a document.                                      | `prb document unarchive <id>`                                    | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/unarchive/unarchive.go#L53)                             |
| [`prb document update`](#prb-document-update)                                   | Update a document.                                         | `prb document update <id>`                                       | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/update/update.go#L76)                                   |
| [`prb document view`](#prb-document-view)                                       | View a document.                                           | `prb document view <id>`                                         | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/view/view.go#L94)                                       |
| [`prb document view-approval-decision`](#prb-document-view-approval-decision)   | View an approval decision.                                 | `prb document view-approval-decision <id>`                       | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/view-approval-decision/view_approval_decision.go#L78)   |
| [`prb document view-approval-quorum`](#prb-document-view-approval-quorum)       | View an approval quorum.                                   | `prb document view-approval-quorum <id>`                         | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/view-approval-quorum/view_approval_quorum.go#L66)       |
| [`prb document view-history-snapshot`](#prb-document-view-history-snapshot)     | View the content and edit highlights of a revision.        | `prb document view-history-snapshot <document-id> <revision-id>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/view-history-snapshot/view_history_snapshot.go#L77)     |
| [`prb document view-version`](#prb-document-view-version)                       | View a document version.                                   | `prb document view-version <id>`                                 | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/view-version/view_version.go#L80)                       |

## prb document

Manage documents.

### Usage

```text
prb document <command>
```

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

## prb document archive

Archive a document.

### Usage

```text
prb document archive <id>
```

Requires 1 positional argument.

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

## prb document create

Create a new document.

### Usage

```text
prb document create
```

Accepts no positional arguments.

### Flags

| Flag               | Type   | Default | Required | Description                                                                                         |
| ------------------ | ------ | ------- | -------- | --------------------------------------------------------------------------------------------------- |
| `--classification` | string | `""`    | —        | Classification: PUBLIC, INTERNAL, CONFIDENTIAL, SECRET                                              |
| `--content`        | string | `""`    | —        | Document content as markdown or ProseMirror JSON. Images and links to /api/files/v1/\{id\} are kept |
| `--document-type`  | string | `""`    | —        | Document type: OTHER, GOVERNANCE, POLICY, PROCEDURE, PLAN, REGISTER, RECORD, REPORT, TEMPLATE       |
| `--org`            | string | `""`    | —        | Organization ID                                                                                     |
| `--title`          | string | `""`    | —        | Document title                                                                                      |

### Examples

```bash
# Create a policy document
prb document create --title "Information Security Policy" --document-type POLICY --classification INTERNAL

# Create a document interactively
prb document create
```

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

## prb document delete

Delete a document.

### Usage

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

## prb document delete-draft

Delete the draft version of a document.

### Usage

```text
prb document delete-draft <document-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/document/delete-draft/delete_draft.go#L45).

## prb document list

List documents in an organization.

### Usage

```text
prb document list
```

Accepts no positional arguments.

### Flags

| Flag                | Type    | Default  | Required | Description                                                                                                                          |
| ------------------- | ------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `--after`           | string  | `""`     | —        | Cursor from the previous page (the Next cursor line)                                                                                 |
| `--classification`  | string  | `""`     | —        | Filter by classification (PUBLIC, INTERNAL, CONFIDENTIAL, SECRET)                                                                    |
| `--document-type`   | string  | `""`     | —        | Filter by document type (OTHER, GOVERNANCE, POLICY, PROCEDURE, PLAN, REGISTER, RECORD, REPORT, TEMPLATE, STATEMENT_OF_APPLICABILITY) |
| `--json`            | boolean | `false`  | —        | Output JSON (same as --output json)                                                                                                  |
| `--limit`, `-L`     | integer | `30`     | —        | Maximum number of documents to list                                                                                                  |
| `--order-by`        | string  | `""`     | —        | Order by field (TITLE, CREATED_AT, UPDATED_AT, DOCUMENT_TYPE)                                                                        |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                                                                                                           |
| `--org`             | string  | `""`     | —        | Organization ID                                                                                                                      |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                                                                                                 |
| `--published`       | boolean | `false`  | —        | Filter by whether a document has a published version                                                                                 |
| `--query`, `-q`     | string  | `""`     | —        | Search query                                                                                                                         |
| `--status`          | string  | `""`     | —        | Filter by status (ACTIVE, ARCHIVED)                                                                                                  |
| `--write-mode`      | string  | `""`     | —        | Filter by write mode (AUTHORED, GENERATED)                                                                                           |

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

## prb document list-approval-decisions

List approval decisions for a quorum.

### Usage

```text
prb document list-approval-decisions <quorum-id>
```

Requires 1 positional argument.

### 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 approval decisions to list         |
| `--order-by`        | string  | `""`     | —        | Order by field (CREATED_AT)                          |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                           |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                 |

### Examples

```bash
# List approval decisions for a quorum
prb document list-approval-decisions <quorum-id>
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/list-approval-decisions/list_approval_decisions.go#L78).

## prb document list-approval-quorums

List approval quorums for a document version.

### Usage

```text
prb document list-approval-quorums <document-version-id>
```

Requires 1 positional argument.

### 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 approval quorums to list           |
| `--order-by`        | string  | `""`     | —        | Order by field (CREATED_AT)                          |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                           |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                 |

### Examples

```bash
# List approval quorums for a document version
prb document list-approval-quorums <document-version-id>
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/list-approval-quorums/list_approval_quorums.go#L70).

## prb document list-history

List revisions for a document.

### Usage

```text
prb document list-history <document-id>
```

Requires 1 positional argument.

### 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 sessions to list                   |
| `--order-by`        | string  | `""`     | —        | Order by field (ENDED_AT)                            |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                           |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                 |

### Examples

```bash
# List revisions
prb document list-history <document-id>
```

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

## prb document list-versions

List versions of a document.

### Usage

```text
prb document list-versions <document-id>
```

Requires 1 positional argument.

### 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 versions to list                               |
| `--order-by`        | string  | `""`     | —        | Order by field (CREATED_AT)                                      |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)                                       |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)                             |
| `--status`          | string  | `""`     | —        | Filter by status (PENDING_APPROVAL, PUBLISHED, REJECTED, VOIDED) |

### Examples

```bash
# List all versions of a document
prb document list-versions <document-id>

# List only published versions
prb document list-versions <document-id> --status PUBLISHED
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/list-versions/list_versions.go#L83).

## prb document publish

Publish a document.

### Usage

```text
prb document publish <document-id>
```

Requires 1 positional argument.

### Additional help

```text
Publish the latest draft of a document.

By default, the draft is published as a new major version. Pass --minor to
publish as a minor version.
When --approver is set (one or more profile IDs), an approval is requested
instead of publishing immediately. Approvers are ignored with --minor.
```

### Flags

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

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

## prb document restore-history

Restore a draft document to a collaboration history point.

### Usage

```text
prb document restore-history <document-id>
```

Requires 1 positional argument.

### Flags

| Flag             | Type    | Default | Required | Description                                                |
| ---------------- | ------- | ------- | -------- | ---------------------------------------------------------- |
| `--heads`        | string  | `""`    | Required | Automerge heads to restore (comma-separated lowercase hex) |
| `--json`         | boolean | `false` | —        | Output JSON (same as --output json)                        |
| `--output`, `-o` | string  | `""`    | —        | Output format: json, table (default)                       |

### Examples

```bash
# Restore to a session's heads
prb document restore-history <document-id> --heads <hex>[,<hex>...]
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/restore-history/restore_history.go#L81).

## prb document unarchive

Unarchive a document.

### Usage

```text
prb document unarchive <id>
```

Requires 1 positional argument.

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

## prb document update

Update a document.

### Usage

```text
prb document update <id>
```

Requires 1 positional argument.

### Flags

| Flag               | Type   | Default | Required | Description                                                                                                               |
| ------------------ | ------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `--classification` | string | `""`    | —        | Classification: PUBLIC, INTERNAL, CONFIDENTIAL, SECRET                                                                    |
| `--content`        | string | `""`    | —        | Document content as markdown or ProseMirror JSON. Images and links to /api/files/v1/\{id\} are kept                       |
| `--document-type`  | string | `""`    | —        | Document type: OTHER, GOVERNANCE, POLICY, PROCEDURE, PLAN, REGISTER, RECORD, REPORT, TEMPLATE, STATEMENT_OF_APPLICABILITY |
| `--title`          | string | `""`    | —        | Document title                                                                                                            |

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

## prb document view

View a document.

### Usage

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

## prb document view-approval-decision

View an approval decision.

### Usage

```text
prb document view-approval-decision <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/document/view-approval-decision/view_approval_decision.go#L78).

## prb document view-approval-quorum

View an approval quorum.

### Usage

```text
prb document view-approval-quorum <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/document/view-approval-quorum/view_approval_quorum.go#L66).

## prb document view-history-snapshot

View the content and edit highlights of a revision.

### Usage

```text
prb document view-history-snapshot <document-id> <revision-id>
```

Requires 2 positional arguments.

### Flags

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

### Examples

```bash
# View the snapshot of one revision
prb document view-history-snapshot <document-id> <revision-id>
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/document/view-history-snapshot/view_history_snapshot.go#L77).

## prb document view-version

View a document version.

### Usage

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