Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

CodeRecall

rixctrixct63 downloads

Anki + LeetCode inside Obsidian: cloze deletions in code with auto-graded active recall and spaced repetition.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates5

Anki + LeetCode inside Obsidian — spaced repetition for code, with automatic grading.

Русская версия → README.ru.md


What it is

CodeRecall turns code blocks in your Obsidian notes into spaced-repetition cards. You hide part of the code, and during review you retype it from memory. Instead of "reveal → grade yourself", the plugin runs your code against test cases and grades you automatically — a card counts as recalled only if your code actually works.

Cards without tests (or without a language) are checked by comparing your text to the hidden answer, so it works for plain snippets and prose too.

A card

{{c1::…}} is a cloze deletion — the fragment that gets hidden during review.

```coderecall
lang: python
name: Two Sum
code: |
  def two_sum(nums, target):
      seen = {}
      {{c1::for i, n in enumerate(nums):
          if target - n in seen:
              return [seen[target - n], i]
          seen[n] = i}}
tests:
  - in: "[[2, 7, 11, 15], 9]"
    out: "[0, 1]"
  - in: "[[3, 2, 4], 6]"
    out: "[1, 2]"
```

During review the hidden part becomes an input box. You type your answer, hit Run & check, and the plugin runs the tests in a sandbox and shows pass/fail.

Card format

A card is one fenced block with the coderecall info string; the body is YAML:

Field Required Meaning
code yes Your code, with one or more {{cN::…}} cloze deletions.
lang no Language id (python, javascript, c++, java). Omit it for a plain text/prose card that's graded by comparison, not execution.
tests no List of { in, out } pairs. No tests → the card is graded by comparing your answer to the hidden text.
name no A label shown in the review view.
entry no Entry function to call in tests (inferred if absent).
mode no call (invoke the entry function, compare its return) or stdio (pipe in to stdin, compare stdout). Defaults: call for JS/Python, stdio for C++/Java.
id no Stable id override (defaults to a content hash).

Instead of an inline code: | block, you can separate header / code / tests with --- lines — then the code is taken verbatim, indentation and tabs and all:

```coderecall
name: Capital of France
---
The capital of France is {{c1::Paris}}.
```

That card has no lang and no tests, so it's graded by text: your answer is compared to the hidden content, ignoring whitespace (print(x + y) and print(x+y) both match a hidden print(x + y)).

Cloze syntax: {{cN::hidden}} hides hidden as group N; the first unescaped }} closes it. To use a literal {{ or }} inside hidden content, escape it as \{{ / \}} — every other backslash (\n, \\) is left as-is.

Languages

Language Runner Notes
JavaScript Web Worker offline, call mode
Python Pyodide (WASM) downloads once on first run, call mode
C++ local g++/clang++ full STL, stdio mode; JSCPP fallback (no STL) if no compiler
Java local JDK 11+ stdio mode, single-file launcher

C++/Java run real programs on your machine via local toolchains, so the plugin is desktop-only — toggle Native execution in settings and only review notes you trust. Syntax highlighting works for these plus any language Obsidian knows (TypeScript, Go, Rust, …), even if it can't be executed.

Review and grading

Run Review current note (ribbon brain icon or command). For each card:

  • Run & check / Check — grades your answer (runs the tests, or compares text for tests-less cards) and shows the result. This doesn't change the schedule.
  • Reveal answer — shows the reference solution and switches to manual grading.
  • After a run you get an auto-verdict — Continue (all passed / partial / failed) applies quality 5 / 3 / 1, with Override buttons to overrule it. When you reveal or self-grade, pick Again / Hard / Good / Easy.

Each grade drives the SM-2 schedule stored in data.json:

Button Quality Effect
Again 1 Lapse: streak resets, due again in 1 day
Hard 3 Pass, ease −0.14 (intervals grow slower)
Good 4 Pass, ease unchanged
Easy 5 Pass, ease +0.10 (intervals grow faster)

A passing streak schedules the next review at 1 day → 6 days → previous × ease (ease starts at 2.5, floored at 1.3).

Language / localization

CodeRecall's interface is available in English and Russian. It follows Obsidian's UI language automatically; you can force a language under Settings → CodeRecall → Language (Auto / English / Русский).

Install

Not in Community Plugins yet. To run it manually, build (below) and copy manifest.json, main.js and styles.css into <vault>/.obsidian/plugins/coderecall/, then enable the plugin. A ready-made deck to try lives in examples/sample-deck.md.

Development

npm install
npm run dev     # build in watch mode
npm test        # unit tests (vitest)
npm run build   # type-check + production bundle

License

MIT — see LICENSE.

Credits

  • obsidian-spaced-repetition
  • obsidian-execute-code
  • The SM-2 algorithm (SuperMemo)
HealthExcellent
ReviewSatisfactory
About
Turn code blocks into spaced-repetition cards that hide cloze fragments and prompt you to retype missing code. Auto-grade answers by running your submission in a sandbox against reference tests and schedule the next review with an SM-2 algorithm based on pass/fail.
FlashcardsCodeReview
Details
Current version
1.1.0
Last updated
Last month
Created
Last month
Updates
5 releases
Downloads
63
Compatible with
Obsidian 1.5.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
rixctrixctrixct
www.rixct.tech
GitHubrixct
t.me
  1. Community
  2. Plugins
  3. Flashcards
  4. CodeRecall

Related plugins

LearnKit

A native study system for your Obsidian vault. LearnKit turns notes into durable knowledge with flashcards, spaced repetition, tests, and more.

CBT Exam Simulator

A robust, offline-first CBT exam simulator using FlashQuiz format.

Review

Add a link to the current note to a daily note on a future date (or a past date, you time traveller).

Repeat

Review notes using periodic or spaced repetition.

Mermaid Tools

Improved Mermaid.js experience: visual toolbar with common elements and more.

Templater

Create and use dynamic templates.

Spaced Repetition

Fight the forgetting curve by reviewing flashcards & entire notes.

PlantUML

Generate PlantUML diagrams.

Kroki

Render Kroki diagrams.

Yanki

Sync flashcards from a folder in your vault to Anki. Pure Markdown syntax. No fuss.