# Build Anki decks from code

Canonical page: https://ankiforge.dev/docs/
Language: en
Description: Choose a language, build your first deck, and learn how to add media, templates and repeatable updates.

Anki Forge turns notes, templates and media into Anki `.apkg` files. Use it when your learning content lives in code or structured data and you want to rebuild and distribute decks repeatedly.

## Start with your language

Install a public package and export your first deck; [choose your entry point](https://ankiforge.dev/docs/languages/).

| Language | First result | Continue |
| --- | --- | --- |
| Rust | [Run the first-deck example](https://ankiforge.dev/docs/quickstart/) | [Add to your application](https://ankiforge.dev/docs/installation/) |
| Node / TypeScript | [Install and build your first deck](https://ankiforge.dev/docs/node-quickstart/) | [API and async behavior](https://ankiforge.dev/docs/node-api/) |
| Python | [Install and export a deck](https://ankiforge.dev/docs/python-quickstart/) | [API and output ownership](https://ankiforge.dev/docs/python-api/) |

Prefer to see the result first? [Explore the card examples](https://ankiforge.dev/examples/) and download their generated packages.

## Understand the pieces

A note holds fields; a note type and its templates turn those fields into cards. Decks group the resulting cards in Anki. The [core concepts](https://ankiforge.dev/docs/concepts/) explain these relationships, owned Project values, and stable identity.

## Build your next feature

-   [CSV to Anki](https://ankiforge.dev/docs/csv-to-anki/): turn a vocabulary spreadsheet into an APKG with Python.
-   [JSON to Anki](https://ankiforge.dev/docs/json-to-anki/): generate cards with media and review an update in three languages.
-   [AI-assisted card generation](https://ankiforge.dev/docs/ai-anki-cards/): draft cards from your notes, review the answers and export an APKG.
-   [Basic and Cloze](https://ankiforge.dev/docs/cards/): create question/answer and fill-in-the-blank cards.
-   [Images and audio](https://ankiforge.dev/docs/media/): register real assets and attach them to cards.
-   [Custom note types](https://ankiforge.dev/docs/custom-notetypes/) and [template bundles](https://ankiforge.dev/docs/templates/): define fields, layouts and CSS.
-   [Image Occlusion](https://ankiforge.dev/docs/image-occlusion/): create questions from regions of an image.
-   [Update and distribute](https://ankiforge.dev/docs/updates/): carry identity and revision evidence between releases.

Card-type guides use runnable Rust examples; the CSV recipe uses Python and the JSON recipe covers all three languages. Node and Python API pages explain their corresponding interfaces and any differences.

## Find answers and contribute

Use [troubleshooting](https://ankiforge.dev/docs/troubleshooting/) when an operation fails, and [verified environments](https://ankiforge.dev/docs/compatibility/) for runtime support and client import conditions.

Anki Forge is licensed under [MIT](https://github.com/morehardy/anki-forge/blob/main/LICENSE). Report reproducible issues on [GitHub](https://github.com/morehardy/anki-forge/issues), or read the [contributor guide](https://github.com/morehardy/anki-forge/blob/main/docs/development.md).
