explaingit

arcships/light-ocr

Analysis updated 2026-05-18

386C++Audience · developerComplexity · 2/5LicenseSetup · easy

TLDR

An offline OCR tool for Node.js and C++ that reads text from images on your own device, with optional hardware acceleration for speed.

Mindmap

mindmap
  root((light-ocr))
    What it does
      Reads text from images
      Confidence scores
      Text coordinates
    Tech stack
      C++
      Node.js
      Core ML
      WebGPU
    Use cases
      Document scanning
      Receipt data extraction
      Offline OCR in apps
    Audience
      Developers
      AI agent builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Extract text and its location from scanned documents or photos without sending data to the cloud.

USE CASE 2

Pull text out of receipts or forms using region-of-interest recognition.

USE CASE 3

Add offline OCR to a Node.js app with a single npm install.

USE CASE 4

Run fast, hardware-accelerated OCR in a C++ application.

What is it built with?

C++Node.jsTypeScriptCore MLWebGPU

How does it compare?

arcships/light-ocrfacebookresearch/momentumd7ead/mkpivm
Stars386384390
LanguageC++C++C++
Last pushed2026-06-26
MaintenanceActive
Setup difficultyeasymoderatehard
Complexity2/54/55/5
Audiencedeveloperresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

npm install gives a working CLI and library immediately, C++ builds from source require more setup.

Apache License 2.0: free to use, modify, and distribute, including commercially, as long as you keep attribution and license notices.

In plain English

light-ocr is a tool that reads text out of images, running entirely on your own computer with no internet connection needed. You give it a JPEG, PNG, or raw image data, and it hands back each line of text it found, in reading order, along with a confidence score and the exact coordinates of where that text sits in the image. For Node.js developers, installing the npm package gives you everything needed in one step, including the OCR model itself and a prebuilt component for macOS, Linux, and Windows. There is also a command line tool that works right after installing, letting you recognize text, detect text regions only, or check engine info from a terminal. An Agent Skill is also included so AI agents that can run local commands can call light-ocr directly, with guidance on when to use OCR instead of a general-purpose AI model that also reads images. One of the main selling points is speed through hardware acceleration. On Apple Silicon Macs it automatically uses Apple's Core ML technology, and on Linux and Windows it uses WebGPU, falling back to the regular processor if neither is available. According to the project's own measurements, this hardware acceleration made recognition noticeably faster and used far less processing time compared to running on the CPU alone, though results vary by device and workload. For C++ projects, the library can be built from source and linked directly, with the same ability to process image pixel data. All processing and results stay local to your machine: nothing is uploaded anywhere. The project is available under the Apache License 2.0.

Copy-paste prompts

Prompt 1
Show me how to install and use light-ocr in a Node.js project to read text from an image.
Prompt 2
Explain how light-ocr's Auto mode picks between Core ML, WebGPU, and CPU.
Prompt 3
Use light-ocr's CLI to extract just the text from an image file.
Prompt 4
How do I use the light-ocr Agent Skill to decide between OCR and a multimodal model?
Prompt 5
Walk me through building light-ocr's C++ library from source.

Frequently asked questions

What is light-ocr?

An offline OCR tool for Node.js and C++ that reads text from images on your own device, with optional hardware acceleration for speed.

What language is light-ocr written in?

Mainly C++. The stack also includes C++, Node.js, TypeScript.

What license does light-ocr use?

Apache License 2.0: free to use, modify, and distribute, including commercially, as long as you keep attribution and license notices.

How hard is light-ocr to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is light-ocr for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.