Introduction¶
The core logic of DeepSeek Harness (DSH) is “everything is a plugin.” When developing agents, it is often necessary to process image information. If using the visual capabilities of a remote large model (VLM), this usually involves network requests and API calls. On a local Mac, Apple’s Vision framework provides powerful computer vision capabilities, but it lacks a direct interface for connecting to DeepSeek Harness.
What It Is¶
dsh-maclens is a DSH plugin maintained by Harzva. Its purpose is to wrap the macOS native Vision framework as a local DSH tool. It does not rely on any network service and does not require an API Key. It directly converts OCR, image classification, face detection, and document layout parsing into functions that DeepSeek Harness can call.
Core Features¶
The plugin provides the following local tools:
* OCR: Reads text from an image.
* Image Classification: Identifies the image type (for example, document, chart, or photo).
* Face Detection: Detects faces in an image.
* Document Layout: Parses page layout (for example, left and right columns).
* Combined Read: Calls all of the above capabilities at once.
Installation and Enablement¶
Installation requires the following system environment: macOS 14+ and Xcode Command Line Tools installed (Swift 6+).
- Run the official installation command:
dsh plugin --profile desktop add dsh-maclens
- After installation is complete, restart DSH.
Typical Usage¶
After successful installation, you can directly use the CLI to test it, or call the corresponding tools inside an Agent.
Direct CLI usage:
# OCR recognition
bin/maclens ocr --image /Users/me/Desktop/shot.png
# Image classification (returns the top 3 categories)
bin/maclens classify --image /path/to/img.png --top 3
Applicable Scenarios and Notes¶
- Privacy and Speed: All pixel processing is completed on the local Mac’s Neural Engine, with no network requests, no uploads, and no telemetry data. For typical screenshots, OCR recognition speed is usually sub-second.
- Language Support: Supports Simplified Chinese (zh-Hans) by default, as well as more than 30 other recognition languages.
- Dependencies and Environment: The plugin is published via npm and includes a precompiled Swift CLI, so it can be installed without additional build steps. It does not use a daemon or occupy ports.
- Binary Resolution Order: At runtime, the plugin looks for the
bin/maclensexecutable in the following order:bin/maclens(inside the package) →$MACLENS_BINenvironment variable →swift/.build/release/MaclensBridge→maclensin PATH.
Summary¶
dsh-maclens solves the need for purely local, privacy-friendly image processing in a Mac environment. It enables Agents to perform text recognition and basic visual analysis without contacting cloud APIs. For more details, see the plugin directory or the GitHub repository.