prb document command reference
Reference for 19 commands under prb document, including usage, flag types and defaults, required flags, source examples, and implementation links
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. 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 to browse another command.
Commands
Section titled “Commands”| Command | Description | Usage | Source |
|---|---|---|---|
prb document | Manage documents. | prb document <command> | View implementation |
prb document archive | Archive a document. | prb document archive <id> | View implementation |
prb document create | Create a new document. | prb document create | View implementation |
prb document delete | Delete a document. | prb document delete <id> | View implementation |
prb document delete-draft | Delete the draft version of a document. | prb document delete-draft <document-id> | View implementation |
prb document list | List documents in an organization. | prb document list | View implementation |
prb document list-approval-decisions | List approval decisions for a quorum. | prb document list-approval-decisions <quorum-id> | View implementation |
prb document list-approval-quorums | List approval quorums for a document version. | prb document list-approval-quorums <document-version-id> | View implementation |
prb document list-history | List revisions for a document. | prb document list-history <document-id> | View implementation |
prb document list-versions | List versions of a document. | prb document list-versions <document-id> | View implementation |
prb document publish | Publish a document. | prb document publish <document-id> | View implementation |
prb document restore-history | Restore a draft document to a collaboration history point. | prb document restore-history <document-id> | View implementation |
prb document unarchive | Unarchive a document. | prb document unarchive <id> | View implementation |
prb document update | Update a document. | prb document update <id> | View implementation |
prb document view | View a document. | prb document view <id> | View implementation |
prb document view-approval-decision | View an approval decision. | prb document view-approval-decision <id> | View implementation |
prb document view-approval-quorum | View an approval quorum. | prb document view-approval-quorum <id> | View implementation |
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 |
prb document view-version | View a document version. | prb document view-version <id> | View implementation |
prb document
Section titled “prb document”Manage documents.
prb document <command>prb document archive
Section titled “prb document archive”Archive a document.
prb document archive <id>Requires 1 positional argument.
prb document create
Section titled “prb document create”Create a new document.
prb document createAccepts no positional arguments.
| 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
Section titled “Examples”# Create a policy documentprb document create --title "Information Security Policy" --document-type POLICY --classification INTERNAL
# Create a document interactivelyprb document createprb document delete
Section titled “prb document delete”Delete a document.
prb document delete <id>Requires 1 positional argument.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--yes, -y | boolean | false | — | Skip confirmation prompt |
prb document delete-draft
Section titled “prb document delete-draft”Delete the draft version of a document.
prb document delete-draft <document-id>Requires 1 positional argument.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--yes, -y | boolean | false | — | Skip confirmation prompt |
prb document list
Section titled “prb document list”List documents in an organization.
prb document listAccepts no positional arguments.
| 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) |
prb document list-approval-decisions
Section titled “prb document list-approval-decisions”List approval decisions for a quorum.
prb document list-approval-decisions <quorum-id>Requires 1 positional argument.
| 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
Section titled “Examples”# List approval decisions for a quorumprb document list-approval-decisions <quorum-id>prb document list-approval-quorums
Section titled “prb document list-approval-quorums”List approval quorums for a document version.
prb document list-approval-quorums <document-version-id>Requires 1 positional argument.
| 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
Section titled “Examples”# List approval quorums for a document versionprb document list-approval-quorums <document-version-id>prb document list-history
Section titled “prb document list-history”List revisions for a document.
prb document list-history <document-id>Requires 1 positional argument.
| 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
Section titled “Examples”# List revisionsprb document list-history <document-id>prb document list-versions
Section titled “prb document list-versions”List versions of a document.
prb document list-versions <document-id>Requires 1 positional argument.
| 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
Section titled “Examples”# List all versions of a documentprb document list-versions <document-id>
# List only published versionsprb document list-versions <document-id> --status PUBLISHEDprb document publish
Section titled “prb document publish”Publish a document.
prb document publish <document-id>Requires 1 positional argument.
Additional help
Section titled “Additional help”Publish the latest draft of a document.
By default, the draft is published as a new major version. Pass --minor topublish as a minor version.When --approver is set (one or more profile IDs), an approval is requestedinstead of publishing immediately. Approvers are ignored with --minor.| 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) |
prb document restore-history
Section titled “prb document restore-history”Restore a draft document to a collaboration history point.
prb document restore-history <document-id>Requires 1 positional argument.
| 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
Section titled “Examples”# Restore to a session's headsprb document restore-history <document-id> --heads <hex>[,<hex>...]prb document unarchive
Section titled “prb document unarchive”Unarchive a document.
prb document unarchive <id>Requires 1 positional argument.
prb document update
Section titled “prb document update”Update a document.
prb document update <id>Requires 1 positional argument.
| 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 |
prb document view
Section titled “prb document view”View a document.
prb document view <id>Requires 1 positional argument.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--json | boolean | false | — | Output JSON (same as —output json) |
--output, -o | string | "" | — | Output format: json, table (default) |
prb document view-approval-decision
Section titled “prb document view-approval-decision”View an approval decision.
prb document view-approval-decision <id>Requires 1 positional argument.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--json | boolean | false | — | Output JSON (same as —output json) |
--output, -o | string | "" | — | Output format: json, table (default) |
prb document view-approval-quorum
Section titled “prb document view-approval-quorum”View an approval quorum.
prb document view-approval-quorum <id>Requires 1 positional argument.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--json | boolean | false | — | Output JSON (same as —output json) |
--output, -o | string | "" | — | Output format: json, table (default) |
prb document view-history-snapshot
Section titled “prb document view-history-snapshot”View the content and edit highlights of a revision.
prb document view-history-snapshot <document-id> <revision-id>Requires 2 positional arguments.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--json | boolean | false | — | Output JSON (same as —output json) |
--output, -o | string | "" | — | Output format: json, table (default) |
Examples
Section titled “Examples”# View the snapshot of one revisionprb document view-history-snapshot <document-id> <revision-id>prb document view-version
Section titled “prb document view-version”View a document version.
prb document view-version <id>Requires 1 positional argument.
| Flag | Type | Default | Required | Description |
|---|---|---|---|---|
--json | boolean | false | — | Output JSON (same as —output json) |
--output, -o | string | "" | — | Output format: json, table (default) |