CLI
PDF CLI toolsets for agents and scripts
Use the okra CLI to resolve PDFs, inspect structure, extract JSON, host documents, and open web review surfaces from a terminal or coding agent.
Read the CLI docs
A PDF CLI for agent workflows
Classic PDF CLI tools merge, split, compress, or rasterize files. okraPDF adds the agent layer: resolve a source, read structure, ask cited questions, extract schema-shaped JSON, publish a hosted PDF, and open the right web portal when a human needs to review the result.
Core commands
npm install -g okrapdf
okra context resolve report.pdf --json
okra context get src_123 --section tables --json
okra extract src_123 --schema schema.json --citations
okra documents publish src_123 --unlisted
okra documents view --web src_123
What makes it a toolset
- Context commands for agent-readable source resolution and structure lookup.
- Extraction commands for schema-shaped JSON with citations.
- Document commands for hosting, publishing, permissions, and review portals.
- Automation-friendly JSON output in non-interactive shells.
- The same verbs map to MCP and REST API surfaces.
When to use okra instead of classic PDF tools
Use pdftk, qpdf, or Poppler when you need local deterministic file transforms. Use okraPDF when the CLI is part of an AI or data workflow that needs structured document understanding, citations, hosted views, or human review handoffs.
Frequently asked questions
Is okraPDF a replacement for pdftk or qpdf?
No. Those are great local file-transform tools. okraPDF is for structured PDF context, extraction, citations, hosting, MCP, and agent handoffs.
Can coding agents use the okra CLI?
Yes. The CLI is designed to emit JSON in non-interactive shells and to expose next actions, so coding agents can call it predictably.
Does the CLI require cloud access?
Programmatic production commands use an okra API key today. The roadmap includes a self-host/offline runtime so deterministic operations can run against local plugins.