raine/anki-llm
A CLI/TUI toolkit for bulk-processing and generating Anki flashcards with LLMs.
What it solves
It simplifies the creation and improvement of Anki flashcards by automating the generation and processing of cards using Large Language Models (LLMs) and text-to-speech (TTS). It removes the manual effort of creating cards one-by-one or dealing with complex import/export files.
How it works
The tool operates as a scriptable CLI that integrates with Anki via the AnkiConnect add-on. It allows users to:
- Generate cards interactively through a terminal UI (TUI) where users can compare, edit, and select candidates.
- Bulk-process cards by exporting notes to CSV or YAML for LLM processing, or by updating decks directly with support for snapshots and rollbacks.
- Manage workspaces to store prompts, note types, and project settings in plain files for versioning.
- Synthesize audio using various TTS providers to fill audio fields in bulk.
- Edit templates by pulling HTML/CSS from Anki into a local workspace for editing with standard tools.
Who it’s for
It is designed for Anki users who want to leverage AI to speed up their learning material creation, as well as developers or AI agents who need structured access to Anki collections.
Highlights
- Multi-model support: Compatible with OpenAI, Gemini, DeepSeek, xAI, OpenRouter, Ollama, and other OpenAI-compatible endpoints.
- Interactive TUI: A terminal interface for comparing and refining AI-generated card candidates.
- Direct Deck Updates: Ability to update Anki decks in-place without needing to export/import
.apkgfiles. - Agent-friendly: Includes a
querycommand that exposes AnkiConnect via a JSON-oriented CLI for AI agents. - TTS Integration: Bulk audio synthesis with voice browsing and caching.
Related
- Project
- Project
- Project
- Project
- Project