explaingit

riddleling/dococr

Analysis updated 2026-05-18

26SwiftAudience · vibe coderComplexity · 2/5Setup · moderate

TLDR

A Mac command line tool that turns photos or scans of documents into clean Markdown text, entirely on your own computer.

Mindmap

mindmap
  root((docOCR))
    What it does
      Image to Markdown
      Batch or server mode
      Local only OCR
    Tech stack
      Swift
      Vapor
      Apple OCR API
    Use cases
      Scan documents
      Screenshot shortcuts
      API integration
    Audience
      Mac users
      Note takers
      Developers

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

Batch convert a folder of scanned document photos into Markdown notes.

USE CASE 2

Run a local web page to upload one image and copy out the extracted text.

USE CASE 3

Send images to a JSON API from another app or script to get OCR text back.

USE CASE 4

Set up a macOS Shortcut that screenshots something and pastes the text automatically.

What is it built with?

SwiftVaporSwiftPM

How does it compare?

riddleling/dococrbsnkhua/mole-widgetjomeswang/agnes-ai-skill
Stars262626
LanguageSwiftSwiftSwift
Setup difficultymoderateeasyeasy
Complexity2/52/52/5
Audiencevibe codergeneraldeveloper

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires macOS 26 or later and building from source with the Swift toolchain.

In plain English

docOCR is a Mac command-line tool that reads document images and converts them to Markdown text. You give it one or more image files, and it produces text output that preserves the document structure: paragraphs, lists, and tables are formatted as proper Markdown rather than plain unstructured text. All processing happens locally on your Mac, no images are sent to any external service. The tool relies on Apple's document recognition API, which is only available on macOS 26 or later. It uses Apple's built-in machine learning to identify the layout and content of a document from a photo or scan. There are two ways to use it. The command-line mode accepts a list of image files. By default it prints the recognized text to the terminal. With an optional flag it writes a Markdown file next to each source image using the same filename with a .md extension. The server mode starts a local web server on your machine. You can then open a browser, upload an image through a simple web page, and see the recognized text. The same server also exposes a JSON API so other programs can send an image and receive the OCR result as structured data. A practical example shown in the README is a macOS Shortcuts workflow. You capture a screen selection with a screenshot tool, the shortcut passes the image to docOCR, reads the Markdown text from the output, and copies it to your clipboard. You can then paste it into any text editor. Building the tool requires Xcode or the Swift command-line tools. The README includes steps for building a release binary and installing it to a directory on your system path. An optional companion skill for the Codex AI assistant is also available as a separate repository.

Copy-paste prompts

Prompt 1
Help me build a macOS Shortcut that runs docOCR on a screenshot and copies the result to my clipboard.
Prompt 2
Write a script that calls docOCR's /api/ocr endpoint with curl to upload an image and print the extracted text.
Prompt 3
Explain how to build and install the docOCR release binary using Swift Package Manager on macOS.
Prompt 4
Show me how to set up a local docOCR HTTP server on a custom port and test it with a sample image.

Frequently asked questions

What is dococr?

A Mac command line tool that turns photos or scans of documents into clean Markdown text, entirely on your own computer.

What language is dococr written in?

Mainly Swift. The stack also includes Swift, Vapor, SwiftPM.

How hard is dococr to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is dococr for?

Mainly vibe coder.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.