# okra CLI reference (GENERATED)

<!-- GENERATED by packages/okrapdf/scripts/generate-cli-reference.mjs from
     src/cli/resource-catalog.generated.json (the /v1/resources catalog).
     Do not edit by hand. Regenerate: pnpm --filter @okrapdf/sdk docs:cli:reference -->

The agent surface of the `okra` CLI, derived from the API resource catalog
(`/v1/resources`). `core` = the agent-first loop; `advanced` = available but
outside the default loop. `internal` primitives are intentionally omitted.

## Resource nouns

### `agents` — advanced (aliases: agent)

Registered agent definitions, runtime profiles, and agent-scoped threads.

- `okra agents list` — list
- _(API/SDK only)_ — create
- `okra agents get` — get
- _(API/SDK only)_ — update
- _(API/SDK only)_ — delete
- `okra agents profiles` — profiles

### `collections` — core (aliases: collection, col)

Named document sets for fan-out query, extraction, and export workflows.

- `okra collections list` — list
- `okra collections create` — create
- `okra collections show <nameOrId>` — get
- `okra collections query` — query
- `okra collections export` — export

### `context` — core (aliases: ctx, contexts, source-context)

Context-first navigation over an owned document: structure, bounded cited snippets, grounded Q&A, and original-source links.

- `okra context resolve` — resolve
- `okra context structure` — structure
- `okra context get` — get
- `okra context ask` — ask
- `okra context open` — open

### `documents` — core (aliases: document, docs, doc)

Processed PDFs with markdown, page assets, extraction, chat, and document-scoped agents.

- `okra documents list` — list
- `okra upload <source>` — create
- `okra documents get` — get
- `okra documents reparse` — reparse
- `okra documents verify` — verify
- `okra documents read` — read
- `okra chat <question> --doc <docId>` — chat_completion
- `okra documents delete` — delete
- _(API/SDK only)_ — run_agent

### `files` — core (aliases: file)

Passive file assets that can be reused by parse, render, and workflow APIs.

- `okra files list` — list
- `okra files upload` — upload
- `okra files get` — get
- `okra files url <fileId>` — download
- `okra files delete` — delete

### `jobs` — core (aliases: job, runs, run)

Long-running parse, render, layerization, workflow, and extraction work.

- `okra jobs list` — list
- `okra jobs create` — create
- `okra jobs get` — get
- `okra jobs events` — events
- `okra jobs cancel` — cancel
- `okra jobs retry` — retry
- `okra jobs resume` — resume

### `tables` — advanced (aliases: table)

Structured tabular outputs and ingested rows created by workflows and agents.

- `okra tables list` — list
- `okra tables ingest` — ingest
- `okra tables update` — update
- `okra tables delete` — delete

### `workflows` — advanced (aliases: workflow)

Reusable hosted workflows and dataset-backed workflow runs.

- `okra workflows catalog` — catalog
- `okra workflows create_run` — create_run
- `okra workflows get_run` — get_run

## Action verbs

Verb-first commands that create work (often a job).

- `okra audit <documentId> --standard wcag` — core · Run an accessibility/compliance audit (PDF/UA, WCAG 2.2 AA, Section 508) against a document. Runs on the self-host runtime; the hosted cloud API returns not_supported_on_cloud — use `okra serve`/self-host, or the okra-a11y MCP for hosted audits.
- `okra extract` — core · Generate structured answers or schema-constrained extraction from processed documents. Pass cite (CLI: okra extract --cite) for opt-in per-field source citations — each extracted value grounded to its source page + bbox.
- `okra parse` — core · Stateless or file-backed parse into markdown, nodes, text, HTML, JSON, or schema output.
- `okra redact` — core · Create redacted page/image surfaces for a document.
- `okra render <source>` — core · Render a PDF from ReportLab, executable code, or a designed spec.
- `okra upload` — core · Upload a PDF into the document lifecycle.
