Alpha —
ankifyis alpha software under active development. Expect bugs, rough edges, and breaking changes between releases.
ankify is the command-line tool — and library — at the heart of
Ankify. It reads a Typst document that uses
the ankify Typst package, renders
each flashcard, and syncs it to Anki through the
AnkiConnect add-on — adding new
cards, updating changed ones, and leaving the rest untouched.
Installation
To run it you also need:
- the Typst CLI (
typst) on yourPATH; - Anki, running, with the AnkiConnect add-on;
- the
ankifyTypst package — your documents import it to mark up cards.
Usage
ankify <FILE> [options]
-v, --verbose Verbose output
--cache-file <PATH> Custom cache file location
--ankiconnect-url <URL> AnkiConnect URL (default: http://127.0.0.1:8765)
--root <DIR> Typst project root
--font-path <PATH> Additional font path (repeatable)
Re-running ankify on the same file is incremental: a cache
(.ankify/cache.json, next to the document) records what was synced, so only
new or changed notes are sent to Anki.
The project README covers the end-to-end workflow — writing notes, the helper-function pattern, and theme-aware cards.
Library
The same crate is also a library, should you want to drive a sync programmatically:
use ;
let result = sync.await?;
println!;
API documentation is published on docs.rs.
License
MIT — see LICENSE.