DeepSeek Harness plugin

dsh-local-ocr

A local OCR library and DeepSeek Harness plugin for macOS and Windows.

Jump to install

Source facts

Repository
littlewrite/dsh-local-ocr
Latest update
Aug 16, 2026
Category
Vision & Multimodal
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/littlewrite/dsh-local-ocr
Plugin: dsh-local-ocr
Author: littlewrite

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.mdSource · read only
README language

dsh-local-ocr

English | 简体中文

An independent local OCR library and DeepSeek Harness tool plugin for macOS and Windows. It does not modify deepseek-harness, own a cache, or decide when OCR should run.

The native adapter uses @napi-rs/system-ocr, which exposes macOS system OCR and Windows Media OCR through one Node.js API. Its native work credits win-ocr-rs and mac-system-ocr.

Install

Requirements: Node.js 20 or newer, pnpm, and an installed DeepSeek Harness dsh command.

Install the plugin into the Web profile directly from GitHub:

npx -y github:littlewrite/dsh-local-ocr install

The installer adds the bundle to the selected Harness profile. Restart dsh web after installation. To select another profile:

npx -y github:littlewrite/dsh-local-ocr install --profile web

To remove it:

npx -y github:littlewrite/dsh-local-ocr uninstall --profile web

For local development, clone the repository and install its dependencies:

git clone https://github.com/littlewrite/dsh-local-ocr.git
cd dsh-local-ocr
pnpm install

The current native dependency supports macOS and Windows. Linux is not supported by this MVP.

DeepSeek Harness plugin

The bundle loads dsh-plugin/index.js. It registers one model-facing tool, local_ocr_image, and creates the OCR service without loading the native addon. The addon loads only when the model calls the tool.

Start Harness normally from the Harness repository:

cd /path/to/deepseek-harness
pnpm dsh web

When the plugin is loaded from a source checkout, it expects the Harness checkout to be the current working directory. Set DSH_HARNESS_ROOT only when it is loaded from another launcher or packaged installation.

Ask the agent to call local_ocr_image with an absolute local image path:

Please call the `local_ocr_image` tool instead of `read_image`.
Read all text from this local image:
/absolute/path/to/image.png

Library API

import { createOcrService } from './src/ocr.js'

const ocr = createOcrService()
const result = await ocr.recognize({
  path: '/tmp/image.png',
  languages: ['zh-cn', 'en-US'],
  mode: 'accurate',
  signal,
})

The result contains stable fields only:

{
  "text": "recognized text",
  "confidence": 0.8,
  "engine": "darwin-system-ocr",
  "durationMs": 12
}

An image with no detectable text returns an empty text value and confidence: 0. Set emptyWhenNoText: false to preserve the native no-text error.

Development

pnpm test

Tests inject a fake engine, so they do not require a host OCR runtime. Native smoke tests should run on each supported operating system.