OCR from the terminal on macOS
Run Apple Vision from the command line with ocrogram-helper, and how that compares to Tesseract.
Most Mac OCR tools are GUIs. If you already live in a terminal, you want a command that takes a path and prints text. ocrogram ships that command as ocrogram-helper.
Install the helper
Homebrew puts both binaries on your PATH: ocrogram (the daemon) and ocrogram-helper (the Vision wrapper).
brew install joelpeckham/ocrogram/ocrogram
ocrogram startYou can skip ocrogram start if you only want the CLI. The helper does not need the LaunchAgent.
The contract
ocrogram-helper /path/to/image.png- Prints recognized text to stdout.
- Copies that text to the clipboard.
- Exit 0 if it found text.
- Exit 1 if the image had no text.
- Exit 2 on usage or IO errors.
Formats: PNG, JPEG, HEIC, TIFF. The helper uses VNRecognizeTextRequest at the accurate level, with language correction and automatic language detection. Same engine as Live Text. Nothing leaves the machine.
Pipe it
ocrogram-helper ~/Desktop/Screenshot\ 2026-08-25.png > notes.txt
ocrogram-helper ./error.png && pbpaste | pbcopyThe second line is a no-op that still proves the clipboard path works. In a script, check $? before you assume there is text.
Compared to Tesseract
brew install tesseract then tesseract image.png stdout is the usual answer. It works on any OS, takes language packs, and is easy to pin in CI. On a Mac that already has Vision, you pay for that portability with extra setup and, on screenshots of UI chrome, worse accuracy.
Use Tesseract when you need the same binary on Linux. Use ocrogram-helperwhen you want Apple's engine from a shell, or when you also want the screenshot watcher sitting behind it.