schappim/macOCR

Get any text on your screen into your clipboard.

What it solves

macOCR is a command-line tool that allows users to extract text, QR codes, and barcodes from any part of their screen, images, or PDFs. It solves the problem of copying text from non-selectable sources such as screenshots, video stills, error dialogs, or locked PDFs.

How it works

The tool leverages Apple's Vision framework to perform all processing locally on the Mac, ensuring it works offline without requiring API keys or account uploads. Users can trigger the tool via the command line, drag a selection box over the desired area, and the automatically recognized text or code payload is copied directly to the system clipboard.

Who it’s for

It is designed for macOS users who frequently need to capture text from images or non-selectable screen areas and want a fast, private, and scriptable interface for OCR (Optical Character Recognition).

Highlights

  • Local Processing: Uses Apple's Vision framework for offline, private recognition.
  • Multimodal Capture: Recognizes both text and QR/barcodes in a single pass.
  • Flexible Input: Supports screen selection, clipboard images, PDF files (with page and DPI control), and standard input.
  • Scriptable: Provides JSON output for structured data and a --rect flag for automated, fixed-region captures.
  • Multilingual: Supports a wide range of languages depending on the macOS version.

Related

  • Project
  • Project
  • Project
  • Project
  • Project