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

local-ocr-cli

v0.1.10

Published

Fully-local OCR CLI for text-only LLMs: PaddleOCR-VL first-tier engine with tesseract fallback, dsh plugin included

Downloads

1,255

Readme

LocalOCR 给纯文本模型(DeepSeek、GLM 等)装上真正的 OCR 视觉,完全在你自己的机器上运行。它用第一梯队模型 PaddleOCR-VL-1.6(版面分析 + VLM:文本、表格、公式、图表——OmniDocBench 评测 SOTA)读取本地图片,并可在需要轻量方案时回退到 tesseract。

  • 本地优先设计。 无需 API key、无云端、无网络。图片永不离开你的机器。
  • 第一梯队引擎。 PaddleOCR-VL-1.6 量化后经 llama.cpp 运行——6GB 显存即可舒适运行。
  • 证据而非猜测。 完整转录 + 阅读顺序版面区域 + 逐块坐标 + 置信度,同时保存为 Markdown 和结构化 JSON。
  • dsh 即插即用。 一行插件配置即可注册 ocr 工具,纯文本 DeepSeek Harness 模型可直接调用。

安装(DeepSeek Harness)

dsh plugin --profile web add local-ocr-cli

重启 dsh 后,ocr 工具出现在每次请求中。

安装(其他环境)

INSTALL.md——Node CLI 加 Python 引擎(PaddleOCR-VL venv + llama.cpp GGUF 服务,tesseract 可选)。

发布(维护者)

npm 发布通过 Trusted Publishing(OIDC) 完全自动化——无需令牌、无需 2FA 提示、自动生成 provenance。推送 vX.Y.Z tag 触发 .github/workflows/release.yml,执行 typecheck + test + build 后 npm publish --provenance

npm version patch        # 升版本并打 vX.Y.Z tag
git push --tags          # GitHub Actions 自动发布到 npm

使用

local-ocr analyze shot.png --engine paddleocr --json
local-ocr analyze invoice.jpg --engine tesseract
local-ocr doctor

输出:JSON,含 text(Markdown 转录)、saved_to(md 文件)、json_to(结构化 JSON:带 bbox/order 的文本块、带置信度的版面框)。详见输出契约

引擎

| 引擎 | 说明 | 依赖 | | :-- | :-- | :-- | | paddleocr(默认) | PaddleOCR-VL-1.6:版面 + VLM,SOTA | Python venv + llama.cpp GGUF 服务 | | tesseract | 经典 OCR,轻量 | tesseract 二进制 |

两者均本地运行。local-ocr doctor 检查可用性。

示例

| demo | 展示内容 | | :-- | :-- | | 日本投降书 | 1945 年密集历史文档:印刷条款 + 手写签名 + 多国签署区;33 个结构化文本块、39 个版面框 | | 金刚经书法 | 宋代竖排繁体书法,正确按列读序识别 |

文档

| 文档 | 何时阅读 | | :-- | :-- | | CLI 手册 | 全部参数与子命令 | | 配置 | 搭建引擎 | | 排障 | 运行失败时 | | 能力边界 | 引擎能读什么、不能读什么 | | 输出契约 | 消费 JSON | | 安全 | LocalOCR 永远不会做什么 |

许可证

MIT