PDF CLI
Run local tools from scripts and the terminal.
Runs on your computer. Files stay on your device; the agent or script can only use the folders you allow.
Run superPDF operations from scripts and the terminal. Files are processed on your computer, and outputs are always new files.
Install the command-line tool
The
superpdfcommand runs the tools on your computer. It needs Node.js 22 or later. Install it once with npm:Terminal npm install -g @superpdf/cli # Check it works superpdf helpRun a command
Terminal superpdf export report.pdf --output report.md superpdf info report.pdf superpdf merge a.pdf b.pdf --output combined.pdf superpdf extract report.pdf --pages 1,3-5 --output selected.pdf superpdf rotate report.pdf --pages 2 --angle 90 --output rotated.pdf superpdf pipeline report.pdf --steps steps.json --output result.pdfChain steps with a pipeline
steps.json [ { "action": "extract", "options": { "pages": "1-3" } }, { "action": "rotate", "options": { "angle": 90 } }, { "action": "labels", "options": { "text": "{page} / {total}" } } ]
Run it with npx, or install it
You need Node.js 22 or later. To try it without installing anything, put npx @superpdf/cli in front of a command: npx downloads the tool once and runs it.
npx @superpdf/cli help
npx @superpdf/cli export report.pdf --output report.mdIf you use it often, install the superpdf command once; then it runs from any folder without the download step.
npm install -g @superpdf/cli
superpdf helpTo update it later, run npm install -g @superpdf/cli@latest; to remove it, npm uninstall -g @superpdf/cli.
With Homebrew on macOS or Linux, which installs Node.js for you:
brew install arjunprabhulal/superpdf/superpdf
superpdf helpUpdate with brew upgrade superpdf. From Python, pip install superpdf or uvx superpdf gives the same command; see superPDF AI for Python.
Markdown, HTML and JSON
superpdf export uses the same reader as PDF to text in the browser, so it writes the same Markdown, HTML and JSON. Scanned pages (pages with no text layer) are read with superPDF OCR on the way, in the page’s language (English and the 14 others of OCR PDF), as in the browser; the recognition data comes with the tool, so nothing is downloaded. Add --no-ocr to skip it. Markdown writes tables as Markdown tables; --tables html writes them as HTML tables instead, as the HTML export does, so merged header cells are kept.
superpdf export report.pdf --output report.md
superpdf export report.pdf --tables html --output report.md
superpdf export scan.pdf --no-ocr --output scan.mdFrom Python
The same tools are in the Python package: pip install superpdf, or uvx superpdf to run the command without installing it. See superPDF AI for Python.
Source and releases
superPDF AI’s command-line tool, MCP server, local API and Python package are open source (Apache-2.0).
- Source code: github.com/arjunprabhulal/superpdf
- npm: @superpdf/cli
- PyPI: superpdf
- Changelog: CLI and Python
- Report a problem: GitHub issues