AnkiLens — find patterns in the cards you keep missing

AnkiWeb addon 1135432140

Analyzes recently missed cards from a chosen deck and time window, using an OpenRouter API key to summarize weak areas and suggest card improvements.
AI-generated summary; may contain mistakes.

aistatisticsservice-clientbeta

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
1 (👍 1 · 👎 0)
Updated
2026-07-04
Anki versions
2.1.1~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-07-04 (120 days before the snapshot).
  • Test files: 14.
  • Commits in the last year: 276.
  • Issues: 0 open, 0 closed.
  • Pull requests: 1 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-07-04
History across monthly snapshots

Loading…

Similar addons

Description

Anki already shows you what cards you get wrong. AnkiLens helps you find patterns in the cards you keep missing.

Instead of digging through hundreds of reviews, get practical recommendations on what to study next and how to improve your cards. Improving the quality of your Anki sessions will help you learn more with less time.

What it helps with

  • Spot recurring weak areas across missed cards
  • Summarize confusing or repeatedly failed cards
  • Get suggestions on how to improve your cards to increase retention
  • Save time when working through large decks

Who is it for?

AnkiLens is especially useful for learners in medicine, law, nursing, and other high-volume subjects where large decks and daily reviews can get overwhelming.

Features

  • Analyze recently missed cards from a selected Anki deck
  • Get practical suggestions, like which cards may need to be split or cleaned up
  • Open relevant missed cards directly in Anki Browse
  • Choose a recent study window: 7, 30, or 90 days
  • Bring your own OpenRouter API Key (model is Deepseek V4 Flash)

Installation

In Anki, go to Tools → Add-ons → Get Add-ons… and paste this code: 1135432140

Usage

To use AI features, you’ll need an OpenRouter API key.

  1. Create an OpenRouter API key here.
  2. In Anki, go to Tools → AnkiLens → Set API key
  3. Paste your API key
  4. Start generating insights from your missed cards!

Privacy

AnkiLens uses OpenRouter to generate AI insights. Card content from the selected analysis may be sent to OpenRouter and the selected model provider for processing. Only analyze cards you are comfortable sending to an external AI service.

Changelog

  • V0.0 (06/28/26): Alpha is out!
  • V0.1 (07/04/26): Removed limit on # of cards analyzed.

Upcoming

Coming soon!

README

AnkiLens

AnkiLens is a read-only Anki add-on for reviewing missed cards.

Pick a deck, choose a time window, and AnkiLens shows a short summary of what has been going well and which missed cards may be worth checking next. It uses your recent review history and missed-card text, but it does not change Anki scheduling or edit any cards.

This alpha uses a bring-your-own OpenRouter API key for generated insights.

What It Does

  • Looks at recent reviews for one deck at a time.
  • Supports 7, 30, and 90 day windows.
  • Summarizes missed cards in plain language.
  • Shows what went well and where to focus.
  • Opens the relevant missed cards in Anki Browse.
  • Stays read-only: no scheduling, card, note, deck, or review-log changes.

Local Setup

Symlink the add-on into Anki:

ln -s "$(pwd)/addon" "$HOME/Library/Application Support/Anki2/addons21/ankilens"

Restart Anki after Python changes.

Alpha Setup

AnkiLens needs an OpenRouter API key for generated insights.

Create a key at:

https://openrouter.ai/keys

Advanced users can also use the OPENROUTER_API_KEY environment variable:

export OPENROUTER_API_KEY="your-key-here"
open -a Anki

On macOS, launching Anki from the Dock may not include shell environment variables. If insights do not load, quit Anki and start it from Terminal with the commands above.

You can also set the key in Anki:

Tools -> AnkiLens -> Set API key

Paste the key into the dialog and AnkiLens will save it locally.

The default model is deepseek/deepseek-v4-flash. Advanced users can change llm_model in addon/config.json, but the main alpha does not include an in-app model picker.

OpenRouter usage and billing stay in the user's OpenRouter account. AnkiLens does not show token pricing in the UI.

Privacy

When generated insights are enabled, AnkiLens sends selected missed-card text and review metadata for the chosen deck/window to the configured LLM endpoint. It does not send the whole collection.

The add-on is read-only. It does not change scheduling, notes, cards, decks, or review logs.

Configuration

Configuration lives in addon/config.json.

Useful settings:

  • llm_summary_enabled: turns generated insights on or off.
  • llm_model: model name.
  • llm_api_url: chat-completions compatible API endpoint.
  • llm_api_key_env: environment variable that contains the API key.
  • llm_api_key: local API key. Do not commit a real value.
  • llm_max_cards: maximum missed cards sent for summarization.
  • llm_max_chars: maximum prompt size.
  • demo_data_enabled: adds local demo review data.
  • count_hard_as_miss: treats both Again and Hard as misses by default. Set to false for Again-only.

The default API key environment variable is:

OPENROUTER_API_KEY

Do not commit API keys.

Development

Run tests with:

make test

The tests do not require a live Anki GUI.

To check LLM output against realistic missed-card content without opening Anki:

OPENROUTER_API_KEY="your-key-here" make llm-check

You can also pass your own card sample:

OPENROUTER_API_KEY="your-key-here" python3 scripts/check_llm_output.py --input cards.json

The JSON file should be a list of cards:

[
  {
    "label": "Smooth ER role",
    "text": "Front: Smooth ER role. Back: lipid synthesis, detoxification, calcium storage.",
    "misses": 3,
    "reviews": 5
  }
]

Build an uploadable add-on package with:

make package

The package is written to dist/ankilens.ankiaddon.

Code Map

  • addon/anki_entry.py - Anki menu, toolbar, page loading, and webview messages.
  • addon/anki_gateway.py - reads Anki review logs and cleans card text.
  • addon/anki_browser.py - builds Browse searches and opens Anki Browse.
  • addon/analytics.py - turns review logs into missed-card summaries.
  • addon/debrief.py - small data models for evidence and generated insights.
  • addon/debrief_page.py - the Insights page HTML/CSS/JS.
  • addon/llm_summary.py - prompt, API request, and response parsing.
  • addon/demo_data.py - local demo review history.
  • scripts/check_llm_output.py - queries the configured LLM with sample card content.
  • tests/ - unit tests for the core behavior.
  • docs/ - notes for verification and future work.