Rust
cargo add ankiforge@0.3.1Anki Forge is an open-source Anki APKG generation library with a Rust core and Rust, Python and Node.js interfaces. Package media, use custom templates and review updates before distribution.
Four card types. One Anki deck.
Export spanish.apkg with Anki Forge 0.3.1. You do not need to install Anki to export a deck.
cargo add ankiforge@0.3.1npm install --include=optional ankiforge@0.3.1python -m pip install ankiforge==0.3.1Choose a programming language, describe your task, then paste the prompt into your AI coding assistant.
Optional. Your request is kept only in this page.
Does your coding assistant support Skills?
Open the Anki Forge Skill
You are helping me use Anki Forge 0.3.1 in a Rust application.
Runtime requirement: Rust 1.92+
Use the published `ankiforge` package and only the public API documented for
this version. Do not use git/path dependencies, internal tools, source-only
APIs, unreleased methods, or invented methods.
My goal:
<describe your task>
Please:
1. Inspect the existing project before changing files.
2. Give the exact setup and installation command: cargo add ankiforge@0.3.1
3. Create the smallest complete runnable program and name every file to add or edit.
4. Produce a persistent `.apkg` file and use stable namespace and note keys.
5. Include the run command, expected output, and a verification step.
6. If media, custom templates, Image Occlusion, or updates are needed, use the
documented workflow instead of approximating the API. For updates, keep the
previous original distribution APKG as the baseline; do not use an Anki re-export.
7. Ask only the questions required to resolve an unknown language, input shape,
output path, or identity rule.
Quickstart reference: https://ankiforge.dev/docs/quickstart/cargo add ankiforge@0.3.1You are helping me use Anki Forge 0.3.1 in a Node / TypeScript application.
Runtime requirement: Node.js 22.13+
Use the published `ankiforge` package and only the public API documented for
this version. Do not use git/path dependencies, internal tools, source-only
APIs, unreleased methods, or invented methods.
My goal:
<describe your task>
Please:
1. Inspect the existing project before changing files.
2. Give the exact setup and installation command: npm install --include=optional ankiforge@0.3.1
3. Create the smallest complete runnable program and name every file to add or edit.
4. Produce a persistent `.apkg` file and use stable namespace and note keys.
5. Include the run command, expected output, and a verification step.
6. If media, custom templates, Image Occlusion, or updates are needed, use the
documented workflow instead of approximating the API. For updates, keep the
previous original distribution APKG as the baseline; do not use an Anki re-export.
7. Ask only the questions required to resolve an unknown language, input shape,
output path, or identity rule.
Quickstart reference: https://ankiforge.dev/docs/node-quickstart/npm install --include=optional ankiforge@0.3.1You are helping me use Anki Forge 0.3.1 in a Python application.
Runtime requirement: CPython 3.11+
Use the published `ankiforge` package and only the public API documented for
this version. Do not use git/path dependencies, internal tools, source-only
APIs, unreleased methods, or invented methods.
My goal:
<describe your task>
Please:
1. Inspect the existing project before changing files.
2. Give the exact setup and installation command: python -m pip install ankiforge==0.3.1
3. Create the smallest complete runnable program and name every file to add or edit.
4. Produce a persistent `.apkg` file and use stable namespace and note keys.
5. Include the run command, expected output, and a verification step.
6. If media, custom templates, Image Occlusion, or updates are needed, use the
documented workflow instead of approximating the API. For updates, keep the
previous original distribution APKG as the baseline; do not use an Anki re-export.
7. Ask only the questions required to resolve an unknown language, input shape,
output path, or identity rule.
Quickstart reference: https://ankiforge.dev/docs/python-quickstart/python -m pip install ankiforge==0.3.1Rust Project API / genanki 0.13.1 · 1,000 Basic notes per workload
Rust Project API · Apple M1 Pro · 10-run medians
Each test uses 1,000 Basic notes. The five tests cover text-only notes, separate media files and shared media. In these tests, the Anki Forge Rust API took 45.7–53.9% less time to export than genanki.
52.7 ms / 105.0 ms
150.7 ms / 320.2 ms
128.7 ms / 275.4 ms
110.5 ms / 239.5 ms
61.4 ms / 112.9 ms
These results measure deck generation, not Anki import or review speed; other hardware and workloads may differ. Method and original measurements
Switch between runnable Rust examples, flip the previews, and download the decks they produce.
let (front, back) = ("hola", "hello");
let mut project = Project::new("spanish")?.default_deck("Spanish");
project.add("es:hola", Note::basic(front, back))?;
let built = project.build(BuildOptions::to(output.join("spanish.apkg")))?;hola
What does this mean?Question shown.
let text = "A sound's pitch depends on its {{c1::frequency}}.";
let extra = "More cycles per second, higher pitch.";
let mut project = Project::new("website-sound")?.default_deck("Sound");
project.add("sound:pitch", Note::cloze(text).field("back_extra", extra))?;
let built = project.build(BuildOptions::to(output.join("sound.apkg")))?;A sound's pitch depends on its […].
Question shown.
let (prompt, answer) = ("Name this pitch.", "A4, 440 Hz");
let picture = Media::file(output.join("waveform.svg"))?.with_export_name("waveform.svg")?;
let audio = Media::file(output.join("concert-a.wav"))?.with_export_name("concert-a.wav")?;
project.add(
"sound:a4",
model
.note()
.field("prompt", prompt)
.field("answer", answer)
.field("picture", picture.image())
.field("audio", audio.sound()),
)?;
let built = project.build(BuildOptions::to(output.join("ear-training.apkg")))?;Name this pitch.
Question shown.
let image =
Media::file(output.join("cell-anatomy.png"))?.with_export_name("cell-anatomy.png")?;
Ok(Note::image_occlusion(image)
.mask(Mask::rect("nucleus", 296, 106, 240, 232))
.build()?
.field("header", "Cell anatomy")
.field("back_extra", "Nucleus"))Which structure is hidden?

Question shown.
Browser previews of exported content; import the APKG to check it in Anki.
Correct a definition or add an example. Keep stable note IDs and use the original APKG from the previous release so Anki Forge can match existing notes when you export again.
Understand deck updateses:holahola
hello
Try a content change.
Comparison results: RISK.NOTE_CHANGED (low). Publication policy: allows this change.
Download v1Download v2Comparison reportKeep the original distribution APKG. Import settings and newer local edits affect updates. Update guide
Inspect diagnostics for missing fields, media, and template problems. Make validation part of your build.
Explore validationStart with Basic and Cloze, or define your own note types. Keep HTML, CSS, and media in reusable template bundles.
Explore templatesStart with a CSV spreadsheet, JSON data or cards drafted with an AI assistant. Follow a complete export recipe, then add media and review updates.