Metadata-Version: 2.4
Name: vexa-language
Version: 0.7.1
Summary: A small language for computer vision: checked before it runs, offline on CPU
Project-URL: Homepage, https://github.com/Dharun235/Vexa
Project-URL: Documentation, https://github.com/Dharun235/Vexa/blob/main/docs/README.md
Project-URL: Repository, https://github.com/Dharun235/Vexa
Project-URL: Issues, https://github.com/Dharun235/Vexa/issues
Project-URL: Changelog, https://github.com/Dharun235/Vexa/blob/main/CHANGELOG.md
Author: Dharunkumar Senthilkumar
License-Expression: MIT AND AGPL-3.0-only AND Apache-2.0
License-File: LICENSE
License-File: LICENSES/AGPL-3.0-yolo11n.txt
License-File: LICENSES/Apache-2.0-efficientsam.txt
License-File: LICENSES/MIT-osam.txt
Keywords: OCR,ONNX,compiler,computer vision,domain-specific language,interpreter,object detection,programming language
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Software Development :: Compilers
Classifier: Topic :: Software Development :: Interpreters
Requires-Python: <3.13,>=3.12
Requires-Dist: lark<2,>=1.2
Requires-Dist: numpy<3,>=2
Requires-Dist: onnxruntime<2,>=1.20
Requires-Dist: opencv-python-headless<5,>=4.10
Requires-Dist: platformdirs<5,>=4
Requires-Dist: rapidocr==3.10.0
Requires-Dist: zxing-cpp<4,>=3
Description-Content-Type: text/markdown

# Vexa

A small language for computer vision. Programs read like the question you are asking, are checked before they run, and run offline on a laptop CPU.

```vexa
load "street.jpg"
detect person
count person
draw boxes
show image
```

<p align="center">
  <img src="https://raw.githubusercontent.com/Dharun235/Vexa/main/docs/images/street-report.jpg" width="300" alt="The street photo with boxes around a bus and four people, and two named zones, pavement and road">
  <img src="https://raw.githubusercontent.com/Dharun235/Vexa/main/docs/images/report.svg" width="520" alt="Terminal output of examples/street-report.vexa: counts per label, people on the road, a busy-street verdict and a passed expect check">
</p>

## Try it

Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then:

```sh
uv tool install --python 3.12 vexa-language
git clone --depth 1 https://github.com/Dharun235/Vexa && cd Vexa/examples
vexa run street-report.vexa --image street.jpg
```

The object detector, segmenter and OCR models are included. Other models download once with `vexa model download NAME`; a program that needs one tells you which.

## Why a language?

- **Readable.** `count colour red car`, `blur face`, `count person in zone door`, `rank all by distance`.
- **Checked before it runs.** Mistakes are found without an image or a model, all at once, with the fix:

  <img src="https://raw.githubusercontent.com/Dharun235/Vexa/main/docs/images/check.svg" width="760" alt="vexa check reporting five mistakes at once: count car after detect person, a number used as true/false, a misspelt name and property with suggestions, and a syntax error">

- **A real language.** Variables, lists and maps, objects with properties (`car.colour`, `car.distance`), loops, functions, `try`, settings with `param`, libraries.
- **Interpreted or compiled.** `vexa run` interprets; `vexa compile` writes an optimised Python script with identical results.
- **Offline and private.** Every model is a local ONNX file on CPU. A program can only read images and write the files it names.

## What it can do

| Task | Commands |
| --- | --- |
| Find | `detect person`, `detect "sunglasses"`, `locate "red tie"`, `segment detections`, `ocr`, `scan codes`, `caption` |
| Measure | `count`, `measure`, `where`, `colour`, `estimate depth`, `estimate poses`, `check exposure` |
| Change | `blur face`, `remove background`, `style cartoon`, `translate horse to zebra`, `rotate`, `crop` |
| Batch and video | `for each image in "photos/"`, `for each frame in "clip.mp4"`, `zone`, `track`, `record`, `save csv` |
| Tools | `vexa check`, `run`, `test`, `compile`, `fmt`, `repl`, and an editor server with a [VS Code extension](https://github.com/Dharun235/Vexa/blob/main/editors/vscode/README.md) |

## Learn more

- [Tutorial](https://github.com/Dharun235/Vexa/blob/main/docs/tutorial.md): install and learn the language in ten short lessons.
- [Reference](https://github.com/Dharun235/Vexa/blob/main/docs/language-reference.md): every command and language feature, by task.
- [Specification](https://github.com/Dharun235/Vexa/blob/main/docs/specification.md): grammar, types and rules, precisely.
- [Editors](https://github.com/Dharun235/Vexa/blob/main/docs/editors.md), [How Vexa works](https://github.com/Dharun235/Vexa/blob/main/docs/architecture.md), [Examples](https://github.com/Dharun235/Vexa/blob/main/examples/), [Changelog](https://github.com/Dharun235/Vexa/blob/main/CHANGELOG.md), [Contributing](https://github.com/Dharun235/Vexa/blob/main/CONTRIBUTING.md).

Built by Dharunkumar Senthilkumar, with [Claude Code](https://claude.com/claude-code) as a co-author on the commits.

Vexa's code is [MIT licensed](https://github.com/Dharun235/Vexa/blob/main/LICENSE). The bundled models keep their own licences (YOLO11n is AGPL-3.0, EfficientSAM is Apache-2.0); see [LICENSES](https://github.com/Dharun235/Vexa/blob/main/LICENSES/README.md).
