engrami
engrami defines engrami/1, a JSON format for Anki decks that can be
published, checked and imported, and ships its reference checker: the format plus
a verifier. It does not compile decks itself; to write one from YAML, start from
engrami-template.
Layout
cli/ - the engrami checker and Python library (standard library only, MIT).
spec/ - the engrami/1 format (engrami-1.md), its JSON Schema
and examples (MIT).
action/ - a composite GitHub Action that runs engrami check (MIT).
addon/ - the Engrami Anki add-on, with an embedded copy of the library (AGPL-3.0-or-later).
hub/ - added later (AGPL-3.0-or-later).
Usage
Run the checker without installing it (needs uv):
uvx --from git+https://github.com/NayanChauveau/engrami@v0#subdirectory=cli engrami check dist
| Command |
What it does |
engrami check [DIST] |
Check compiled editions (DIST/<edition>/deck.json and media/) against engrami/1 (default dist). |
engrami --version |
Show the version. |
Errors are printed as <path>: <JSON path>: <message>; the exit code is 1 on error, 0 otherwise.
GitHub Action
- uses: NayanChauveau/engrami/action@v0
with:
path: dist
See action/README.md. To publish a deck to the Engrami hub from CI, see
Publish to the Engrami hub.
Writing a compiler
Any tool can produce engrami/1. See "Writing your own compiler" in
spec/engrami-1.md. engrami-template
is a ready-made deck repository and example compiler (YAML to engrami/1); it depends on the
engrami Python library (engrami.format, engrami.guid, engrami.issues).
Development
From cli/:
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run basedpyright
License
MIT for spec/, cli/ and action/; see LICENSE-MIT.