mac-local-vision
A single Swift binary that gives AI agents and end-to-end tests zero-token, on-device computer vision on Apple Silicon, including OCR, pixel-exact UI targeting, and face grouping.
mac-local-vision is a pure Swift command-line tool built on Apple's own Vision and FoundationModels frameworks, with no Node, Python or other runtime dependency. It performs OCR that extracts text and layout locally, returns the exact pixel center of a word for end-to-end test click targeting, decodes and generates QR and barcodes, straightens a photographed document into a flattened scan, classifies an image against a large label taxonomy, and clusters photos by the person in them without uploading anything.
Because everything runs on-device through Apple's frameworks, each call avoids the network round-trip, per-call cost and token spend of a cloud vision API, completing in roughly a third of a second end to end on recent Apple Silicon hardware. It also exposes a beta multimodal ask command for on-device reasoning about an image, which needs a newer macOS beta.