Skip to main content

Image interpreter for automation workflows - local, offline, 8x fewer tokens

Project description

farscry

Image interpreter for automation workflows - local, offline, 8x fewer tokens

pip install farscry
farscry screenshot.png
from farscry import extract, diff, extract_batch

Extract VASP context from an image
vasp = extract("screenshot.png")
print(vasp)

Diff two screenshots
delta = diff("before.png", "after.png")

Batch processing (parallel)
results = extract_batch(["a.png", "b.png", "c.png"])

What it does

farscry converts screenshots into typed, coordinate-rich text that automation workflows can act on - without vision APIs, without API keys, and with 8x fewer tokens than raw image sending.

It speaks VASP (Visual Application State Protocol).

Install

pip
pip install farscry

npm
npm install -g farscry

Homebrew
brew install teles-forge/farscry/farscry

curl
curl -fsSL https://farscry.dev/install | sh

Python API

from farscry import extract, diff, extract_batch, FarscryError

From file path
vasp = extract("screenshot.png")

From bytes (PNG/JPG/WebP)
with open("screenshot.png", "rb") as f:
    vasp = extract(f.read())

JSON output
vasp_json = extract("screenshot.png", json=True)

Diff
delta = diff("before.png", "after.png")

Batch (parallel via rayon)
results = extract_batch(["a.png", "b.png"])

Error handling
try:
    vasp = extract("nonexistent.png")
except FarscryError as e:
    print(f"Failed (exit {e.exit_code}): {e}")

Platforms

Platform Architecture Notes
macOS Apple Silicon (arm64) Native CoreML, 21ms
macOS Intel (x64)
Linux x86_64
Windows x86_64

License

Apache-2.0. See NOTICES for ONNX Runtime attribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

farscry-0.4.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

farscry-0.4.0-py3-none-any.whl (10.8 MB view details)

Uploaded Python 3

File details

Details for the file farscry-0.4.0.tar.gz.

File metadata

  • Download URL: farscry-0.4.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for farscry-0.4.0.tar.gz
Algorithm Hash digest
SHA256 bf899b38b698527969bd13a9bbb3be672108f6e7cd00ef58da34cccf6b28226c
MD5 ee42707fa134e1237d64615036ba9145
BLAKE2b-256 1efb781ce554dee9f6ba66c5afa94f652cb6e5ef996c0866ddcd16b673180cc0

See more details on using hashes here.

File details

Details for the file farscry-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: farscry-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for farscry-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28071bcc97ea117b6d112b8c8735507473b25ef6e6337010bd2424222051a7c3
MD5 0cb06080919b1b8a911f51658b820d8b
BLAKE2b-256 48fc9108af29a2fbaaa8dc91aa13d8035c8ff3687938152df2b66cd7bb1f2e14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page