AnkiWeb
- Votes
- 0 (π 0 Β· π 0)
- Updated
- 2026-10-13
- Anki versions
- 2.1.1~
- Languages
- Python, JSON
- Description language
- en
AnkiWeb addon 2142317474
Identifies frequently failed cards, diagnoses why they lapse, requests concrete LLM rewrites, and safely applies or reverts field edits per card, deck, or collection.
Open on AnkiWeb GitHub Ask about alternatives
active
| Min Anki | Max Anki | Updated |
|---|---|---|
| 2.1.1 | + | 2026-10-13 |
Loadingβ¦
Automatically suspends and tags a card after a predefined number of lapses so difficult cards can be identified, removed from the queue, and reformatted.
Provides leech and lapse management tools including markers, reversal, custom automated actions, cross-device sync, browser options, reviewer shortcuts, and text macros.
Reduces a card's lapse countβor resets it to zeroβafter configurable consecutive correct answers, helping rehabilitate potential leech cards, with an optional notification.
Adds browser columns for initial fail rate, card age, and average daily time spent, plus leech export and age/unique-day filtering tools for faster suspension.
Provides advanced tools for handling lapse counts and leeches, including leech tag management, with a default Lapse Reverse feature that reduces cards' lapse counts.
Detects cards trending toward leech status when you press Again, checks their review history, and shows a short tooltip or popup urging you to pause and relearn without altering scheduling.
Leech Doctor finds the cards you fail most often, explains why they keep failing, asks a language model for a concrete rewrite, and lets you edit and apply those changes safely β per card, per deck, or across your whole collection.
Spaced repetition works β until a card is badly written. A card you've forgotten 30 times is usually not a memory problem; it's a card problem: it lacks a discriminating cue, buries the answer in a wall of text, tests an arbitrary label, or asks several things at once.
Anki already tracks the evidence: lapses (how many times you answered Again after learning), ease (how aggressively Anki has shortened the interval), and fail rate. Leech Doctor turns that evidence into a ranked worklist, and an LLM into a repair tool that puts fixes quickly at your fingertips.
Diagnose and repair the Anki cards you keep forgetting β with an LLM.
AnkiWeb install code: 2142317474
Leech Doctor finds the cards you fail most often, explains why they keep failing, asks a language model for a concrete rewrite, and lets you edit and apply those changes safely β per card, per deck, or across your whole collection.
Spaced repetition works β until a card is badly written. A card you've forgotten 30 times is usually not a memory problem; it's a card problem: it lacks a discriminating cue, buries the answer in a wall of text, tests an arbitrary label, or asks several things at once.
Anki already tracks the evidence: lapses (how many times you answered Again after learning), ease (how aggressively Anki has shortened the interval), and fail rate. Leech Doctor turns that evidence into a ranked worklist, and an LLM into a repair tool.
<img src="...">).Leech Doctor is deliberately conservative with a collection you care about:
interval, ease, due or queue. Scheduling is always preserved.revert_log.json, and can be undone with Revert last / Revert all.Card text is sent only to the LLM provider you configure β nothing else leaves your machine. API keys are stored locally in Anki's add-on config and are never committed to this repository (meta.json and revert_log.json are git-ignored). To keep everything offline, point the local slot at Ollama or vLLM and use Local mode.
http://localhost:11434/v1) or vLLM (http://localhost:8000/v1).21423174742142317474 and click OK.Add-on page: https://ankiweb.net/shared/info/2142317474
.ankiaddon fileleech_doctor-<version>.ankiaddon from Releases (or build it: python3 build.py).Copy this folder into your Anki addons21 directory:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Anki2/addons21/leech_doctor |
| Windows | %APPDATA%\Anki2\addons21\leech_doctor |
| Linux | ~/.local/share/Anki2/addons21/leech_doctor |
Then restart Anki.
The add-on is published on AnkiWeb with install code
2142317474. See Publishing for how updates are released.
Open Tools β Leech Doctor: Preferencesβ¦
Each provider has a base URL, model, and API key. Enter the URL and key, then click Load models to populate the dropdown β or type a model name if the endpoint can't list them.
| Provider | Kind | Default endpoint |
|---|---|---|
| Ollama | OpenAI-compatible | http://localhost:11434/v1 |
| vLLM | OpenAI-compatible | http://localhost:8000/v1 |
| OpenCode | OpenAI-compatible | configure your gateway |
| OpenAI | OpenAI-compatible | https://api.openai.com/v1 |
| Claude | Anthropic native | https://api.anthropic.com |
Requests use {base_url}/chat/completions and {base_url}/models (Anthropic uses /v1/messages and /v1/models). A full endpoint pasted into the base URL is accepted and normalised.
Two slots β local and cloud β each pointing at a provider. In Auto mode the slot is chosen by situation:
| Situation | Default slot |
|---|---|
| On AC power | local |
| On battery | cloud |
| Desktop (no battery) | local |
| Offline | local |
| Chosen provider unreachable | fallback slot |
Local inference is power-hungry, so Auto offloads to the cloud on battery and uses local when plugged in. A manual Auto / Local / Cloud toggle sits in the editor toolbar, and the live choice is always shown in the status line. An unconfigured provider is never selected silently.
<b>/<i>/<u>.rich edit) β WYSIWYG editing; only fields you modify are written back, and Qt's markup is normalised to Anki-style HTML.<img> resolved against Anki's media folder.| Shortcut | Action |
|---|---|
| βB / Ctrl+B | Bold |
| βI / Ctrl+I | Italic |
| βU / Ctrl+U | Underline |
| ββ§C / Ctrl+Shift+C | Cloze deletion (cloze notes only) |
Shortcuts are scoped to the focused field.
HTTP 403 β¦ error code 1010 β your gateway sits behind Cloudflare, which blocks known-bot user agents. Leech Doctor sends a self-identifying User-Agent that passes it; if a provider still blocks you, set a browser-style user_agent for that provider in the config.HTTP 400 β¦ MissingSessionID / x-opencode-session β OpenCode Go requires a stable session id on inference requests. Leech Doctor sends one automatically for any opencode.ai endpoint (their GET /models deliberately omits it, which is why Load models works without it). If you override that provider's headers, don't drop it β or set your own x-opencode-session value.The 'cloud' slot points to 'β¦', which is not ready β the slot references a provider with no base URL (or, for Anthropic, no API key). Fix it in Preferences β Routing.meta.json, not config.json. Always change settings through Preferences.Pure logic lives in engine/ and is unit-testable without Anki: card ranking (query.py), failure-mode diagnosis (diagnose.py), safe apply + revert (apply.py), and field-text helpers (text.py).
Provider clients live in providers/ (two shapes cover every target: OpenAI-compatible and Anthropic native).
Build a package:
python3 build.py # β leech_doctor-<version>.ankiaddon
__pycache__, which AnkiWeb rejects)."ankiweb_id": "<number>" to manifest.json.Leech Doctor follows the app's colours instead of hard-coding its own.
colors.light / colors.dark tokens) and adopts the same background, surface, text, and accent colours β including Onigiri's own light/dark choice. Catppuccin, Dracula, RosΓ© Pine, Nord, Solarized and custom Onigiri themes all work, because the palette is read from Onigiri rather than reimplemented.The whole window palette is applied through Qt's palette (not a stylesheet), so buttons, trees, text fields and scrollbars inherit it and nothing fights Anki's or Onigiri's own styling. Accent-derived tints are used for the diagnosis banner, the lapses chip, and LLM-proposal labels.
Preferences β Theme β Show resolved theme reports exactly which source was used and the resolved colours.
Licensed under the Peer Production License β a copyfarleft license created by John Magyar and Dmytri Kleiner, derived from Creative Commons BY-NC-SA 3.0. See LICENSE for the full text.
In short: you may use, share and adapt this work freely for non-commercial purposes, provided you attribute it and share alike. Commercial use is permitted only by worker-owned businesses or worker-owned collectives that distribute all financial gain among their worker-owners. Commercial use by privately owned, profit-seeking businesses is not permitted.
The Peer Production License is not currently registered with SPDX.