Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ollama-starter-document-ocr

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ollama-starter-document-ocr

OCR documents using Ollama

latest
npmnpm
Version
0.0.1
Version published
Weekly downloads
6
-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

Ollama Starter Document OCR

Simple CLI for extracting text from images and PDFs using Ollama.

Prerequisites

  • Install and run Ollama

Usage

# Process explicit files
npx ollama-starter-document-ocr ./receipts/scan1.png ./receipts/scan2.jpg

# Process all images in a folder (non-recursive)
npx ollama-starter-document-ocr ./receipts

# Process a PDF (one .txt per page)
npx ollama-starter-document-ocr ./receipts/statement.pdf

# Override output directory
npx ollama-starter-document-ocr ./receipts --out-dir ./output

# Use a different model 
npx ollama-starter-document-ocr ./receipts --model deepseek-ocr

Output

  • Each image has a corresponding .txt file with the extracted text.
  • For PDFs: each page is rendered to an image and then processed
  • A JSON file is written to the output directory with the full results of every image/page
  • Some models will detect text bounding boxes and annotate the images with them

Environment

Use OLLAMA_HOST if your Ollama server is not on the default http://localhost:11434.

OLLAMA_HOST=http://localhost:11444 npx ollama-starter-document-ocr ./receipts

FAQs

Package last updated on 03 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts