README file from
GithubObsidian Anki Embed
An Obsidian plugin that embeds interactive Anki flashcard decks directly into your notes using AnkiConnect.
Features
- Interactive Flashcard Player: Review flashcards directly inside your Obsidian notes with flip animations, rating buttons (
Again,Hard,Good,Easy), and session summary statistics breakdown. - Interactive Deck Picker with Live Search: Choose decks dynamically via an inline picker (
select: true) or switch decks on the fly using the 📚 Change deck header action. - Ribbon Action: Click the left sidebar ribbon icon to instantly pick and insert an Anki deck into your active note.
- Full AnkiConnect API Coverage: Strongly-typed wrappers for all 40+ AnkiConnect endpoints (Decks, Cards, Notes, Models, Media, GUI, Stats, and Sync).
- AnkiConnect Integration: Connects locally to Anki via
http://127.0.0.1:8765. - Card Rating & Sync: Rate cards and sync review status directly to Anki.
- Flexible Code Block Syntax:
- Embedded specific deck:
deck: Japanese::Kanji limit: 20 filter: due randomize: true - Simple single-line deck embed:
Medical::Pharmacology - Interactive deck picker:
orselect: truedeck: ? - Custom search queries:
query: deck:"Default" is:due tag:vocab
- Embedded specific deck:
- Pasted Anki URI Auto-Conversion: Pasting
anki://deck/...oranki:...links automatically converts them into an ````anki code block. - Command Palette Tools:
Insert Anki deck embed: Fuzzy pick an Anki deck and insert code block into active editor.Insert interactive Anki deck picker: Insertsselect: trueinteractive picker block.Import Anki notes from CSV/TSV: Opens a step-by-step modal to paste and map CSV/TSV data directly into an Anki deck.Sync Anki collection: Synchronize your Anki collection directly from Obsidian.Test AnkiConnect connection: Instant connectivity check with Notice feedback.
- Keyboard Shortcuts:
Space/Enter: Reveal card answer.1,2,3,4: Rate card (1: Again,2: Hard,3: Good,4: Easy).R: Refresh deck session.
Prerequisites
- Use Obsidian 1.13.0 or newer.
- Install Anki.
- Install the AnkiConnect add-on in Anki (Add-on code:
2055492159). - Make sure Anki is open while reviewing notes in Obsidian.
[!TIP] Want to use this plugin on Obsidian Mobile or without ever keeping Anki open on your computer? You can host anki-docker-server on a remote VPS. Just point this plugin's AnkiConnect URL setting to your server's IP to unlock full headless and mobile capabilities!
Installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Place them in your vault's
.obsidian/plugins/anki-embed/folder. - Enable Anki Embed in Obsidian settings.
Known Limitations & Custom Fork Solution
- Review Time Statistics: Due to limitations in the official AnkiConnect API, it cannot record the actual time you spent reviewing a card (it logs as 0 seconds).
- The Solution: We provide a heavily modified Custom AnkiConnect Fork that adds time-tracking capabilities. If you install this custom
.ankiaddonpackage instead of the official one, simply enable "Use custom AnkiConnect" in your Obsidian settings to unlock perfectly accurate review time statistics!
- The Solution: We provide a heavily modified Custom AnkiConnect Fork that adds time-tracking capabilities. If you install this custom
License
MIT