npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

open-ocr-cli

v4.1.0

Published

Agent-first OCR CLI and MCP server. Extract images, PDFs, and URLs with Gemini, Kimi, Muse, OpenRouter, or compatible APIs.

Readme

Open OCR CLI + MCP

Agent-first OCR for images, PDFs, and public URLs. Extract Markdown, validated JSON, or structured fields with Gemini, Kimi, Meta Muse, OpenRouter, or an OpenAI-compatible endpoint. Includes a stdio MCP server and a portable agent skill.

Install

Requires Node.js 20.19+, 22.13+, or 24+.

npm install --global open-ocr-cli
# Set GEMINI_API_KEY in your environment.
open-ocr-cli extract invoice.pdf

For another provider, pass --provider kimi|muse|openrouter|openai-compatible. Credential defaults are MOONSHOT_API_KEY, META_API_KEY, OPENROUTER_API_KEY, and OPEN_OCR_API_KEY. Compatible endpoints need --model; --base-url defaults to http://localhost:11434/v1, where no API key is required. Use init for guided setup; API keys never belong in flags or JSON config.

Agent workflow

open-ocr-cli capabilities --json
open-ocr-cli schema request
open-ocr-cli run --request job.json --response-format jsonl

Example job.json:

{
  "protocolVersion": 2,
  "operation": "extract",
  "noConfig": true,
  "inputs": [{ "type": "path", "path": "invoice.pdf" }],
  "extraction": { "mode": "template", "preset": "invoice", "contentFormat": "json" },
  "delivery": { "mode": "reference", "outputDirectory": "./results", "resume": true },
  "dryRun": true
}

Remove dryRun to perform OCR. Dry runs require no credential or provider call and write no files. Prefer reference delivery, bound batches with execution limits, and inspect every document status plus warnings. Without an output directory, reference jobs use .open-ocr-results/<runId>.

MCP

Launch open-ocr-cli mcp from your client. It exposes ocr_capabilities, ocr_extract, ocr_run_agentic, ocr_web, and ocr_read_artifact.

The client must support MCP 2026-07-28. Follow the Codex / Claude Code setup for launch commands, credentials, timeouts, and revision requirements. The npm package also includes skills/open-ocr/ and protocol schemas in schemas/.

Examples

open-ocr-cli extract ./documents --output ./results --resume
open-ocr-cli extract invoice.pdf --schema invoice.schema.json --format json
open-ocr-cli extract scan.pdf --mode agentic --format json
open-ocr-cli web https://example.com
open-ocr-cli extract ./documents --dry-run
open-ocr-cli status ./results --json
open-ocr-cli models --provider gemini
open-ocr-cli doctor --json

simple transcribes; template extracts preset fields; agentic iterates and re-OCRs regions. Custom schemas require simple mode and JSON output. Find a working invoice schema and save it as invoice.schema.json before running the schema example.

Results and JSONL events use stdout; diagnostics use stderr. Exit codes: 0 success/validation/resume, 1 failed/partial/cost-limited, 2 invalid command/configuration, 130 SIGINT, 143 SIGTERM.

Full CLI reference · Source and issues · License