ankify 0.1.1

Generate and sync Anki flashcards from your Typst documents.
Documentation

[!WARNING] ankify is 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

cargo install ankify

To run it you also need:

  • the Typst CLI (typst) on your PATH;
  • Anki, running, with the AnkiConnect add-on;
  • the ankify Typst package — your documents import it to mark up cards.

Usage

ankify notes.typ
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:

cargo add ankify
use ankify::sync::{sync, SyncConfig};

let result = sync(SyncConfig::new("notes.typ")).await?;
println!("{} added, {} updated", result.notes_added, result.notes_updated);

API documentation is published on docs.rs.

License

MIT — see LICENSE.

Trademarks

Anki is a trademark of Ankitects Pty Ltd. ankify is an independent project, not affiliated with, endorsed by, or sponsored by Ankitects Pty Ltd.