DeepSeek Harness plugin

dsh-maclens

Bridge Apple's on-device Vision framework (macOS) into DeepSeek Harness: OCR, image classification, face detection, and document layout as local dsh tools. No network, no API key, no daemon.

Jump to install

Source facts

Repository
Harzva/dsh-maclens
Latest update
Aug 18, 2026
Category
Models & Providers
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/Harzva/dsh-maclens
Plugin: dsh-maclens
Author: Harzva

Check the source files

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

File explorer3 files
README.mdSource ยท read only

dsh-maclens ๐ŸŽ๐Ÿ”

> Apple's on-device Vision framework, bridged into DeepSeek Harness (dsh) as local tools: OCR, image classification, face detection, document layout, and a combined read โ€” 100% offline, no API key, no daemon.

๐Ÿ”’ PrivacyEvery pixel stays on your Mac. No network, no upload, no telemetry.
โšก SpeedSub-second OCR on typical screenshots (Neural Engine).
๐Ÿ‡จ๐Ÿ‡ณ Languageszh-Hans + 30+ recognition languages out of the box.
๐Ÿ–ผ๏ธ Tall imagesslice splits long screenshots so small text survives Vision's downscale.
๐Ÿงฉ No depsSwift CLI ships in the npm package โ€” no build step to install.

---

๐Ÿ‘ค For humans โ€” quick start (30 seconds)

# 1. Install into your dsh profile
dsh plugin --profile desktop add dsh-maclens

# 2. Restart DSH. Then just ask the model:
#    "OCR this screenshot: /Users/me/Desktop/shot.png"

The five tools the model can call:

ToolOne-liner
maclens_ocr"Read all the text in this image" โ€” every line + confidence + box
maclens_classify"What kind of image is this?" โ€” document, chart, photo, โ€ฆ
maclens_faces"Are there people in this image?" โ€” face boxes + count
maclens_document"Parse this page" โ€” OCR + left/right column layout
maclens_describe"Give me everything at once" โ€” OCR + classify + faces + layout

When to pick maclens vs a VLM: maclens is a CV toolkit โ€” it transcribes, classifies, detects but does not narrate "what this image is about". Need open-ended understanding? Pair it with a VLM bridge (e.g. modlens + qwen-vl). Need fast, free, private OCR/detection? maclens.

---

๐Ÿค– For agents โ€” precise contract

TL;DR

Plugin:     dsh-maclens (npm), installs with dsh plugin add
Runtime:    macOS 14+ with Xcode Command Line Tools (Swift 6+)
Tools:      maclens_ocr | maclens_classify | maclens_faces | maclens_document | maclens_describe
Input:      absolute local image path (string) โ€” required on every tool
Output:     one JSON object on stdout; {"error": "..."} + exit 1 on failure
Binary:     bin/maclens in the package (auto-chmod'd), else MACLENS_BIN, else PATH
No network: the CLI makes zero network requests

Install (exact commands)

# From npm โ€” includes the prebuilt binary, no build step:
dsh plugin --profile desktop add dsh-maclens

# From a git checkout โ€” build the Swift bridge first:
cd dsh-maclens && bash scripts/build.sh        # produces bin/maclens
dsh plugin --profile desktop add ./dsh-maclens

Binary resolution order: bin/maclens in the package โ†’ $MACLENS_BIN โ†’ swift/.build/release/MaclensBridge โ†’ maclens on PATH. The plugin chmods the found binary to 0755 at resolve time (npm tarballs drop the exec bit).

Tool schemas

All five tools take path (required, string). OCR-family tools additionally accept:

FieldTypeDefaultMeaning
languagesstringzh-Hans,en-USComma-separated recognition languages
maxLinesnumberโ€”Cap returned OCR lines (large screenshots)
slicebooleanfalseSlice tall images into overlapping strips
sliceHeightnumber4096Strip height in px when slicing
topnumber5Classify only: how many categories to return

Output contract

maclens_ocr returns:

{
  "task": "ocr",
  "language": ["zh-Hans", "en-US"],
  "full_text": "่ทจๅขƒๅขž้•ฟ็ ”็ฉถๅฎค\nไปŽไธ€ไธช้—ฎ้ข˜๏ผŒๆŠต่พพไธ€ไธชๅ†ณๅฎšใ€‚",
  "lines": [
    {
      "text": "่ทจๅขƒๅขž้•ฟ็ ”็ฉถๅฎค",
      "confidence": 1.0,
      "bbox": { "x": 0.055, "y": 0.519, "width": 0.517, "height": 0.144 }
    }
  ],
  "line_count": 2,
  "truncated": false,
  "sliced": false
}
  • bbox is normalized (0โ€“1), origin top-left (converted from Vision's bottom-left so it is intuitive).
  • With slice: true, tall images are split into overlapping strips, each strip OCR'd, results stitched back to whole-image coordinates, and duplicate lines in the overlap band de-duplicated. Output adds "sliced": true and "slice_count": N.
  • maclens_document = ocr + layout.columns (left/right) + layout.image_dimensions.
  • maclens_describe = ocr + classification.observations + faces + layout.
  • maclens_faces โ†’ faces[] + face_count; maclens_classify โ†’ observations[] (identifier, confidence).

Error contract

ExitMeaning
0Success
1Runtime error โ€” stdout is {"error": "..."} (e.g. file does not exist: <path>)
2Usage / unknown task โ€” stdout is {"error": "usage: ..."}

Raw CLI (for testing outside dsh)

bin/maclens ocr --image /path/to/img.png
bin/maclens classify --image /path/to/img.png --top 3
bin/maclens faces --image /path/to/img.png
bin/maclens document --image /path/to/img.png --slice
bin/maclens describe --image /path/to/img.png --slice --top 2

---

๐Ÿ—๏ธ How it works

dsh (text-only model)
  โ””โ”€ maclens_* tools (lib/index.js)
       โ””โ”€ bin/maclens (Swift CLI, spawned per call โ€” no daemon, no ports)
            โ””โ”€ Apple Vision: VNRecognizeTextRequest / VNClassifyImageRequest /
               VNDetectFaceRectanglesRequest        โ† on-device, offline

๐Ÿงช Development

cd swift && swift build -c release
swift test --package-path swift      # 6 behavioral tests

CI (GitHub Actions): Swift release build + smoke tests on macOS, plugin-load + pack-contents check on Ubuntu. All green on main.

๐Ÿ“„ Docs

  • [AGENTS.md](AGENTS.md) โ€” the agent-facing quick reference (mirrors this section).
  • [CHANGELOG.md](CHANGELOG.md) โ€” version history.
  • [SECURITY.md](SECURITY.md) โ€” security model & reporting.

License

MIT โ€” see [LICENSE](LICENSE).