@okrapdf/cli
v0.16.1
Published
okraPDF CLI — upload PDFs, grounded context (structure/get/ask with bbox citations), parse jobs, structured extraction, and collection queries. Thin bin over @okrapdf/sdk.
Maintainers
Readme
@okrapdf/cli
The okraPDF command line: upload PDFs, pull grounded context with bbox citations, run parse jobs, extract structured data, and query collections — built for agents first (JSON envelopes with next_actions whenever stdout is not a TTY).
npm install -g @okrapdf/cli
okra auth loginPrimary workflows
okra upload ./report.pdf # add --no-wait to queue; resume with okra jobs wait
okra documents read doc-abc123 --pages 1-3
okra chat "Summarize this document" --doc doc-abc123Grounded context (agent loop)
okra context structure doc-abc123
okra context get "termination clause" --source-id doc-abc123
okra context ask "What is the guaranteed fee?" --source-id doc-abc123
okra parse doc-abc123 --engine mineru # reparse, then: okra jobs wait doc-abc123Context responses are token-bounded and cited: every snippet carries page, a deterministic page-image citation_url, and the matched node's bbox (bbox_source: "node"). structure/resolve report pages_parsed / page_coverage so a partial parse is never silent.
More
okra extract ./report.pdf --schema ./schema.json
okra render ./report.py --out report.pdf
okra collections query earnings "What changed quarter over quarter?" -o earnings.csv
okra resources list # discover every API noun and verbRun okra --help for the full surface, including the self-host runtime (okra self-host --help).
Library
Importing okraPDF from code? Use @okrapdf/sdk — this package is just the okra binary over it. The legacy unscoped okrapdf package is deprecated.
Agent skill
Teach a coding agent the cited-context loop:
npx skills add okrapdf/okra-agent