Eigrel
A programming language for Data, Machine Learning and AI.
Write what you want. Let the compiler decide how to run it.
Eigrel is a declarative language for data engineering, machine learning and GenAI. You describe datasets, transformations, features and models in one language; the compiler decides whether each step becomes Python, SQL, Spark or something else.
dataset customers from csv("data/customers.csv")
transform customers {
filter age >= 18
select age, income, purchases, churned
}
features customers {
age
income
purchases
}
model churn = random_forest {
trees = 100
}
train churn {
target = churned
}
evaluate churn {
metrics = [accuracy, precision, recall, f1]
}
Status
Eigrel is at v0.1 — Language: the lexer, parser and syntax tree are done, and the CLI can check files and print their tokens or AST. Nothing executes yet; the compiler, IR and Python backend come in v0.2. See the roadmap.
Getting started
Install from PyPI (Python 3.13+):
pip install eigrel
eigrel init churn
eigrel check churn/main.eig
From source
Requires uv.
make install # creates .venv and installs eigrel in editable mode
.venv/bin/eigrel init churn # creates churn/main.eig
.venv/bin/eigrel check churn/main.eig
CLI
| Command | What it does |
|---|---|
eigrel check FILE... |
Parses each file and reports syntax errors with line and column |
eigrel ast FILE |
Prints the syntax tree as JSON |
eigrel tokens FILE |
Prints the token stream |
eigrel init NAME |
Creates a project with a starter main.eig |
Errors point at the exact spot:
error: comparisons cannot be chained; combine them with 'and'
--> pipeline.eig:4:21
|
4 | filter age > 18 < 30
| ^
Docker
make docker-build
make docker-run # runs `eigrel check` on examples/ml.eig inside the container
Language
The full syntax is in docs/LANGUAGE.md. Examples live in examples/.
Project layout
src/eigrel/
├── compiler/
│ ├── tokens.py token kinds, keywords, source locations
│ ├── lexer.py source text → tokens
│ ├── ast.py syntax tree nodes and JSON export
│ ├── parser.py tokens → syntax tree (recursive descent)
│ └── errors.py diagnostics with source excerpts
└── cli.py the `eigrel` command
Development
make test # pytest
make coverage # pytest with the 90% coverage gate
make lint # ruff check + format check
make typecheck # mypy
make check-examples # eigrel check examples/*.eig
Commits follow Conventional Commits; releases and the changelog are generated by semantic-release.
License
Licensed under the Apache License 2.0.
Metadata
Release files for eigrel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eigrel-0.1.0.tar.gz | 18.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eigrel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.8 kB
Release files / eigrel-0.1.0.tar.gz
| Download URL | eigrel-0.1.0.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4a11b804f171b71839ecad0a13086f63f593242ad39a2889b100dd4be6699af
|
|
BLAKE2b-256 checksum How to use checksums |
2ecca1fb8a2ff126199b93b2e5a97fc813cddf2f44288c78afabcd5e96bd4d97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / eigrel-0.1.0-py3-none-any.whl
| Download URL | eigrel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d56352fd2b2b671c3bdb6a5b6884b6a263efba01018a8c7bc7aac3e4d1f9930
|
|
BLAKE2b-256 checksum How to use checksums |
9d91399ad4e801370507d59a13eac4b4bb7675c097c6b4439807fe910d8ce4f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency log