Auto Anki

by ad2969
5
4
3
2
1
Score: 47/100

Description

The Auto Anki plugin automatically generates Anki flashcards from your notes using OpenAI's GPT language model, offering a frictionless way to retain knowledge through spaced repetition. You can export either the entire file or selected text to GPT, which then suggests a list of question-answer pairs for you to choose from. These selected flashcards are synced directly to Anki via AnkiConnect without the need to restructure or reformat your notes.

Reviews

No reviews yet.

Stats

55
stars
8,094
downloads
12
forks
1,239
days
17
days
26
days
11
total PRs
3
open PRs
1
closed PRs
7
merged PRs
19
total issues
15
open issues
4
closed issues
6
commits

README file from

Github

Obsidian Auto Anki

Plugin for Obsidian.md that uses OpenAI or Claude to generate Anki notes from your Obsidian notes. Anki uses each note's note type to create one or more flashcards from them.

The plugin only works on desktop.

1.0 development build: the requirements and setup below describe the current development version. See the detailed setup guide for provider, model, generation and note-type settings. The screenshots below still show the 0.3 interface.

The plugin adds two commands to Obsidian:

  • Generate notes from current file
  • Generate notes from highlighted text (only in an open note in editing view; it needs selected text)

command-palette-new-commands

Plugin Requirements

The following are required for the plugin to work:

  • Obsidian 1.13.1 or newer, on desktop
  • An API account and key for OpenAI or Claude. API usage is billed by the provider; a ChatGPT or Claude chat subscription is not a substitute for API access
  • The Anki program, installed locally
  • AnkiConnect, which exposes Anki's API for Obsidian to call

Your notes are sent to the provider you choose when you generate cards. Nothing is sent before you click Generate Anki notes.

Plugin Setup

  1. Download and install the plugin (Options > Community Plugins)
  2. Make sure you have everything in Plugin Requirements
  3. Open Settings → Auto Anki. Under AI providers, open OpenAI or Claude, enter that provider's API key and click Save key.
  4. On the provider's page, open Manage models (the settings icon beside Your models). Turn models on or off, then click Save changes; Cancel discards your changes. Only models that support text generation can be turned on (OpenAI's Responses API or Claude's Messages API). If there is no default yet, the first model you turn on becomes it. To change the default, use Use as default model on a model's page, or Default model on the main settings page. Disabling a model keeps its settings, so turning it back on restores them.
  5. Start Anki with AnkiConnect enabled, then open Settings → Auto Anki → Anki:
    • Set AnkiConnect address if needed. The default is http://127.0.0.1:8765, a full address, not just a port.
    • Under Note types, turn on the existing Anki note types the AI may generate. Use the refresh button beside Note types after you change the address or your note types in Anki. The field descriptions shown there come from Anki, so describe your fields in Anki if you want the AI to know what they are for.
    • Under Default deck, choose the deck new notes start in. You can still pick another deck each time you export.
  6. Open Generation to choose coverage, whether to send diagrams, and your extra instructions. Then run an export command.

API keys are saved in Obsidian's Keychain on this device, not in your vault. The Keychain does not sync, so enter your provider keys once on each device. Obsidian encrypts Keychain secrets using the operating system's secret store when available; Settings → Keychain reports when it is unavailable.

Upgrading

Upgrading from 0.2.1: 0.2.1 always used gpt-3.5-turbo-1106, which OpenAI shut down on 28 September 2026, so it can no longer generate Anki notes. From 0.2.2 the model is a setting; your other settings carry over unchanged.

Upgrading to 0.3.0: earlier versions stored your OpenAI API key in plain text in the plugin's data.json, inside your vault, so anything that copies your vault (sync, backups, git) copied the key too. 0.3.0 moves it into Obsidian's Keychain automatically the first time it loads, removes it from data.json, and shows a notice when it has. Older copies of your vault may still contain the key, so consider replacing it at OpenAI. On any other device where you use the same vault, enter the key once in the Auto Anki settings. If one of those devices has an Obsidian older than 1.11.4, it stays on 0.2.2, which only reads the key from data.json: update Obsidian there too, or that device will keep asking for the key.

Also in 0.3.0: the temperature, top-p, frequency penalty and presence penalty settings are gone. Current OpenAI models only accept their default values, so changing them made requests fail. Reasoning effort replaces them as the way to trade speed and cost against quality. Maximum tokens per question is replaced by Maximum output tokens, a single cap per request that includes the model's reasoning. 0.3.0 needs Obsidian 1.11.4 or newer.

Feature Details

Generating Notes from the Current File (Command: Generate notes from current file)

The command opens a dialog for the open note. The dialog says what will be sent: the note's text (with frontmatter and %%comments%% removed) and its diagrams.

  1. Choose the coverage, the note types, and optionally a model, reasoning effort, a maximum number of notes, or extra instructions. These apply to this run only; your saved settings don't change.
  2. Click Generate Anki notes. The status bar shows that generation is running.
  3. In the review, each note's fields are shown as plain text. Tick the notes you want (Select all and Deselect all help), then click Confirm selection.
  4. Choose a deck, then click Confirm and export. The default deck starts selected.

Anki adds the notes you chose. Notes that Anki refuses, for example because they are duplicates, stay in the review so you can export them again. The plugin only adds notes; it never edits or deletes notes that are already in Anki.

For a long note, the run may take a while.

Generating Notes from Highlighted Text (Command: Generate notes from highlighted text)

This command works the same way, but uses only the text you have selected. It needs an open note in editing view, with text selected. Only images embedded in the selected text are sent.

Diagrams and Images

  • Images in the text are sent when Send diagrams is on and the selected model accepts images. At most 20 diagrams are sent, and large images are scaled down first.
  • Supported formats are PNG, JPEG, GIF, WebP, BMP and AVIF.
  • A GIF is analysed as its first frame only. Anki keeps the original animated file.
  • A diagram used in a card is stored once in Anki's media. The file name comes from the image's content, so exporting the same note again does not store a second copy.

Anki Notes

  • Each field is written in Markdown and shown in Anki with its formatting. Inline maths $…$ and display maths $$…$$ are shown with Anki's built-in MathJax. Raw HTML is shown as text, not run.
  • Cloze deletions such as {{c1::…}} are kept as written.
  • The plugin only uses the note types you enabled, and it fills their fields as Anki defines them.
  • If the deck you chose is missing, Anki's Default deck is used. The plugin never creates decks.

Motivation

With the kajillion things I read and watch on a daily basis, I've recently found myself struggling to retain knowledge of the things I've consumed. Hence, I've found myself trying to find new ways to enhance my self-education. I came upon Spaced Repetition, and wanted to try to use Anki to supplement my daily learnings. Being a long-time user and lover of Obsidian.md as my PKM (Personal Knowledge Management), I wanted to see if there was a way to automate my learning using spaced repetition with my current Obsidian vaults.

I looked at other similar plugins that attempt to connect Obsidian to Anki, but a lot of require you to change how you write your notes in Obsidian, or just don't seem automated enough. What this plugin does is automate the creation of "flashcard-style" questions and answers but without needing to format your notes for this purpose.

I consider myself a complete beginner when it comes to Spaced Repetition, Anki, or the general world of learning techniques, so I am always very open to suggestions, discussions, or any comments about the topic!

Issues, Discussion, etc

I keep track of all things related to this plugin mostly in issues. Feel free to report bugs and/or requests there!

Development

Requires Node.js 24, the version the release workflow uses.

npm install
npm run dev     # rebuilds main.js on every change
npm run build   # type-checks, then makes a production build
npm run lint    # checks the code with ESLint, including Obsidian's own plugin-review rules
npm test        # runs the tests

The tests (in test/) load the plugin in Node against a stand-in for Obsidian, with a fake Keychain, fake OpenAI and Claude APIs and a fake AnkiConnect, so they need no vault, no API key and no Anki. They cover moving the API key out of data.json (including synced vaults and a Keychain that fails), reading settings saved by every earlier version, the export flow with its error messages, image handling and field rendering.

To test in a vault, point OBSIDIAN_PLUGIN_DIR at the plugin's folder inside that vault. Every build is then copied there (main.js, manifest.json, styles.css):

OBSIDIAN_PLUGIN_DIR=~/path/to/vault/.obsidian/plugins/auto-anki npm run dev

Then reload the plugin in Obsidian (Settings > Community Plugins), or install the Hot Reload plugin to have it reloaded after every build.

Releasing

npm version <new-version> updates manifest.json and versions.json. Push the tag (git push origin <new-version>): the release workflow builds the plugin and attaches main.js, manifest.json and styles.css to a GitHub release with that tag. The workflow does not run npm test, so run it before tagging. Push the branch afterwards, since Obsidian reads manifest.json from the default branch to decide which release to install.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
AI-AnkiSync
2 years ago by goev
Anki Helper
9 months ago by Dusk
Anki Integration
2 years ago by Noah Boos AKA Rift
Create flashcards from your notes with a seamless interface, structuring them with metadata and syncing effortlessly via AnkiConnect.
Anki Sync
5 years ago by debanjandhar12
Obsidian plugin to make flashcards and sync them to Anki
Aosr
4 years ago by linanwx
Aosr is Another Obsidian plugin for Spaced Repetition.
Augmented Canvas
3 years ago by Léopold Szabatura
Supercharge your Obsidian canvas experience with AI features.
Awesome Flashcard
4 years ago by AwesomeDog
Handy Anki integration for Obsidian.
Better Recall
2 years ago by FlorianWoelki
A better spaced repetition and recall plugin for Obsidian inspired by Anki.
Blue Star
2 years ago by Wang Guoshi
A plugin for Obsidian that generates Anki flashcards in various ways.
braincache
4 years ago by XSPGMike
braincache obsidian plugin
Chat Stream
3 years ago by Ryan P Smith
Obsidian canvas plugin for using AI completion with threads of canvas nodes
Come Through
a year ago by mntno
An Obsidian plugin for creating and reviewing flashcards.
Cornell Marginalia
6 months ago by Latazadehomero
A lightweight Obsidian plugin designed for students who use the Cornell Note-taking System.
Deck To Anki
a month ago by 熊猫别熬夜
Deck To Anki 是 Obsidian 中用来快速制作成Anki牌组的插件,通过 AnkiConnect 将笔记推送到 Anki。可以单向同步、更新、修改卡片,以及反向定位到 Obsidian 卡片所在的笔记、标题、块。
Decks
9 months ago by Xherdi Lika
An Obsidian Flashcards plugin
Dictionary Lexicon
9 months ago by Alvin
Look up words and improve vocabulary by using flash card style cards.
Easy Recall
3 months ago by Geno Zhou
Flashcard Generator
3 years ago by ChloeDia
Obsidian Plug-in to automatically create a set of questions/answers on your notes !
Flashcard Learning
4 years ago by Gaétan Muck
Obsidian plugin. Uses flashcard system to learn things across own notes.
Flashcards
6 years ago by Alex Colucci
🎴 An Anki plugin for Obsidian.md
Flashcards LLM
3 years ago by Marco Pampaloni
Use Large Language Models (such as ChatGPT) to automatically generate flashcards from obsidian notes
HiNote
2 years ago by Kai
Add comments to highlighted notes, use AI for thinking, and flashcards for memory.
Incremental Writing
6 years ago by Jamesb | Experimental Learning
An incremental writing plugin for Obsidian where you add notes and blocks to prioritized queues and review them incrementally over time, spaced repetition style.
Kindle Vocab
a year ago by Truong Gia Bao
Generate the markdown version of your Vocabulary Builder in Kindle, and put it in your Obsidian Vault.
Language Made Easy
2 months ago by PandoraReads
Language Made Easy — Immersive language learning for Obsidian. 沉浸式英语学习工作台:阅读时即时查词、FSRS 间隔重复闪卡、字幕同步的视频跟读、AI 智能解析——全部在同一个地方完成
Learnie
2 years ago by tankh99
Learnie is an Obsidian plugin that helps to enhance your learning with active recall and spaced repetition.
LearnKit
5 months ago by William Guy
A native study system for your Obsidian vault. LearnKit turns notes into durable knowledge with flashcards, spaced repetition, reviews, tests, and AI tools.
Local GPT
3 years ago by Pavel Frankov
Local Ollama and OpenAI-like GPT's assistance for maximum privacy and offline access
MCQ Tracker
22 days ago by Isaac Friedenson
Extract practice questions from .pdfs into individual .md files, practice questions from your notes, grade answers, and track time, confidence and spaced review in note properties.
Memodack
2 years ago by Pavlo Kobyliatskyi
Your second language memory tool
Memorization
3 years ago by Joseph Cochran
Mochi Cards Exporter
6 years ago by kalbetre
Mochi Cards Exporter Plugin for Obsidian
Mochi Cards Pro
3 years ago by Hayden Carpenter
Create flashcards on Mochi.cards using the API provided by Mochi's Pro subscription in Obsidian.
Note Synchronizer
4 years ago by Songchen Tan
Synchronizes Obsidian notes to Anki in a breeze 💨️
OpenWords
a year ago by insile
用于英语学习中背单词与单词管理的 Obsidian 插件
QB Reader Parser
3 years ago by Jacob Barta
QBReader parsing for quiz bowl answerlines
Quran Life
2 months ago by Imed Ghomari
Recall
6 years ago by Martin Jirlow
A spaced repetition system for Obsidian!
Repeat
4 years ago by Andre Perunicic
Review notes using periodic or spaced repetition.
Review
6 years ago by ryanjamurphy
Add the current note to a future daily note to remember to review it.
Simple Anki Sync
a year ago by Lukas Mayr
Simple Quiz
2 years ago by Ivan Kalmar
Creating simple quizzes.
Spaced everything
2 years ago by Zach Mueller
Obsidian plugin to apply spaced repetition to incrementally develop your notes.
Spaced Repetition
6 years ago by Stephen Mwangi
Fight the forgetting curve by reviewing flashcards & entire notes on Obsidian
Spaced Repetition AI
2 years ago by Belinda Mo, Athena Leong
AI + Spaced Repetition Plugin for Obsidian
text2anki-openai
4 years ago by Mani Batra
The Queue
2 years ago by Kolja Sam Pluemer
An Obsidian.md plugin randomly exposing you to your cards. Supports habits, to-dos, spaced repetition flashcards, iterative reading and more.
Transfer LaTeX from GPT
2 years ago by Xixia
Vocabulary Cards
3 years ago by Eugene Myazin
An easy way to display vocabulary words as flashcards and as a list
Yanki
2 years ago by Eric Mika
Obsidian plugin to sync flashcards from a folder in your vault to Anki. Pure Markdown syntax. No fuss.
Zhongwen Reader
2 years ago by natipt
This is a Chinese hover dictionary and vocabulary-building plugin for ObsidianMD.